Browse Source

NOOP macro for do-nothing macros

Scott Lahteine 8 years ago
parent
commit
c6f1337f5c
2 changed files with 4 additions and 2 deletions
  1. 2
    0
      Marlin/macros.h
  2. 2
    2
      Marlin/ultralcd.h

+ 2
- 0
Marlin/macros.h View File

@@ -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 View File

@@ -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…
Cancel
Save