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
 #define PENDING(NOW,SOON) ((long)(NOW-(SOON))<0)
60
 #define PENDING(NOW,SOON) ((long)(NOW-(SOON))<0)
61
 #define ELAPSED(NOW,SOON) (!PENDING(NOW,SOON))
61
 #define ELAPSED(NOW,SOON) (!PENDING(NOW,SOON))
62
 
62
 
63
+#define NOOP do{}while(0)
64
+
63
 #endif //__MACROS_H
65
 #endif //__MACROS_H

+ 2
- 2
Marlin/ultralcd.h View File

156
   FORCE_INLINE void lcd_reset_alert_level() {}
156
   FORCE_INLINE void lcd_reset_alert_level() {}
157
   FORCE_INLINE bool lcd_detected(void) { return true; }
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
 #endif //ULTRA_LCD
162
 #endif //ULTRA_LCD
163
 
163
 

Loading…
Cancel
Save