Browse Source

Fix compilation errors. Followup to #12439 (#12481)

Marcio Teixeira 6 years ago
parent
commit
50ee747787

+ 0
- 1
Marlin/src/lcd/extensible_ui/ui_api.cpp View File

@@ -134,7 +134,6 @@ namespace ExtUI {
134 134
       // The ms count is
135 135
       return (uint32_t)(currTime / (F_CPU / 8000));
136 136
     }
137
-
138 137
   #endif // __SAM3X8E__
139 138
 
140 139
   void delay_us(unsigned long us) {

+ 1
- 1
Marlin/src/lcd/extensible_ui/ui_api.h View File

@@ -179,7 +179,7 @@ namespace ExtUI {
179 179
   #ifdef __SAM3X8E__
180 180
     uint32_t safe_millis();
181 181
   #else
182
-    #define safe_millis() millis() // TODO: Implement for AVR
182
+    FORCE_INLINE uint32_t safe_millis() { return millis(); } // TODO: Implement for AVR
183 183
   #endif
184 184
 
185 185
   void delay_us(unsigned long us);

+ 20
- 19
Marlin/src/lcd/ultralcd.cpp View File

@@ -29,13 +29,32 @@
29 29
   #if ENABLED(SDSUPPORT)
30 30
     #include "../sd/cardreader.h"
31 31
   #endif
32
-
33 32
   #if ENABLED(EXTENSIBLE_UI)
34 33
     #define START_OF_UTF8_CHAR(C) (((C) & 0xC0u) != 0x80u)
35 34
   #endif
36 35
 #endif
37 36
 
38 37
 #if HAS_SPI_LCD
38
+  #if ENABLED(STATUS_MESSAGE_SCROLLING)
39
+    uint8_t MarlinUI::status_scroll_offset; // = 0
40
+    #if LONG_FILENAME_LENGTH > CHARSIZE * 2 * (LCD_WIDTH)
41
+      #define MAX_MESSAGE_LENGTH LONG_FILENAME_LENGTH
42
+    #else
43
+      #define MAX_MESSAGE_LENGTH CHARSIZE * 2 * (LCD_WIDTH)
44
+    #endif
45
+  #else
46
+    #define MAX_MESSAGE_LENGTH CHARSIZE * (LCD_WIDTH)
47
+  #endif
48
+#elif ENABLED(EXTENSIBLE_UI)
49
+  #define MAX_MESSAGE_LENGTH 63
50
+#endif
51
+
52
+#ifdef MAX_MESSAGE_LENGTH
53
+  uint8_t MarlinUI::status_message_level; // = 0
54
+  char MarlinUI::status_message[MAX_MESSAGE_LENGTH + 1];
55
+#endif
56
+
57
+#if HAS_SPI_LCD
39 58
 
40 59
 #if HAS_GRAPHICAL_LCD
41 60
   #include "dogm/ultralcd_DOGM.h"
@@ -75,24 +94,6 @@
75 94
   uint8_t lcd_sd_status;
76 95
 #endif
77 96
 
78
-#if ENABLED(STATUS_MESSAGE_SCROLLING)
79
-  uint8_t MarlinUI::status_scroll_offset; // = 0
80
-  #if LONG_FILENAME_LENGTH > CHARSIZE * 2 * (LCD_WIDTH)
81
-    #define MAX_MESSAGE_LENGTH LONG_FILENAME_LENGTH
82
-  #else
83
-    #define MAX_MESSAGE_LENGTH CHARSIZE * 2 * (LCD_WIDTH)
84
-  #endif
85
-#elif ENABLED(EXTENSIBLE_UI)
86
-  #define MAX_MESSAGE_LENGTH 63
87
-#else
88
-  #define MAX_MESSAGE_LENGTH CHARSIZE * (LCD_WIDTH)
89
-#endif
90
-
91
-#if HAS_SPI_LCD || ENABLED(EXTENSIBLE_UI)
92
-  uint8_t MarlinUI::status_message_level; // = 0
93
-  char MarlinUI::status_message[MAX_MESSAGE_LENGTH + 1];
94
-#endif
95
-
96 97
 #if HAS_LCD_MENU && LCD_TIMEOUT_TO_STATUS
97 98
   bool MarlinUI::defer_return_to_status;
98 99
 #endif

Loading…
Cancel
Save