Explorar el Código

NOOP macro for do-nothing macros

Scott Lahteine hace 8 años
padre
commit
c6f1337f5c
Se han modificado 2 ficheros con 4 adiciones y 2 borrados
  1. 2
    0
      Marlin/macros.h
  2. 2
    2
      Marlin/ultralcd.h

+ 2
- 0
Marlin/macros.h Ver fichero

@@ -60,4 +60,6 @@
60 60
 #define PENDING(NOW,SOON) ((long)(NOW-(SOON))<0)
61 61
 #define ELAPSED(NOW,SOON) (!PENDING(NOW,SOON))
62 62
 
63
+#define NOOP do{}while(0)
64
+
63 65
 #endif //__MACROS_H

+ 2
- 2
Marlin/ultralcd.h Ver fichero

@@ -156,8 +156,8 @@
156 156
   FORCE_INLINE void lcd_reset_alert_level() {}
157 157
   FORCE_INLINE bool lcd_detected(void) { return true; }
158 158
 
159
-  #define LCD_MESSAGEPGM(x) do{}while(0)
160
-  #define LCD_ALERTMESSAGEPGM(x) do{}while(0)
159
+  #define LCD_MESSAGEPGM(x) NOOP
160
+  #define LCD_ALERTMESSAGEPGM(x) NOOP
161 161
 
162 162
 #endif //ULTRA_LCD
163 163
 

Loading…
Cancelar
Guardar