diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/scroll_engine.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/firmware/scroll_engine.c b/firmware/scroll_engine.c index 913b4778a7..11355d1872 100644 --- a/firmware/scroll_engine.c +++ b/firmware/scroll_engine.c | |||
@@ -43,11 +43,12 @@ static const char scroll_tick_table[18] = { | |||
43 | 100, 80, 64, 50, 40, 32, 25, 20, 16, 12, 10, 8, 6, 5, 4, 3, 2, 1 | 43 | 100, 80, 64, 50, 40, 32, 25, 20, 16, 12, 10, 8, 6, 5, 4, 3, 2, 1 |
44 | }; | 44 | }; |
45 | 45 | ||
46 | #include "drivers/lcd-scroll.c" | ||
47 | |||
48 | #ifndef BOOTLOADER | ||
46 | static void scroll_thread(void); | 49 | static void scroll_thread(void); |
47 | static const char scroll_name[] = "scroll"; | 50 | static const char scroll_name[] = "scroll"; |
48 | 51 | ||
49 | #include "drivers/lcd-scroll.c" | ||
50 | |||
51 | #ifdef HAVE_REMOTE_LCD | 52 | #ifdef HAVE_REMOTE_LCD |
52 | static struct event_queue scroll_queue SHAREDBSS_ATTR; | 53 | static struct event_queue scroll_queue SHAREDBSS_ATTR; |
53 | 54 | ||
@@ -58,7 +59,7 @@ static struct event_queue scroll_queue SHAREDBSS_ATTR; | |||
58 | #undef LCDM | 59 | #undef LCDM |
59 | #define LCDM(ma) LCD_REMOTE_ ## ma | 60 | #define LCDM(ma) LCD_REMOTE_ ## ma |
60 | 61 | ||
61 | #include "drivers/lcd-scroll.c" | 62 | #include "drivers/lcd-scroll.c" // Yes, a second time. |
62 | 63 | ||
63 | static void sync_display_ticks(void) | 64 | static void sync_display_ticks(void) |
64 | { | 65 | { |
@@ -105,7 +106,6 @@ static bool scroll_process_message(int delay) | |||
105 | 106 | ||
106 | static void scroll_thread(void) NORETURN_ATTR; | 107 | static void scroll_thread(void) NORETURN_ATTR; |
107 | #ifdef HAVE_REMOTE_LCD | 108 | #ifdef HAVE_REMOTE_LCD |
108 | |||
109 | static void scroll_thread(void) | 109 | static void scroll_thread(void) |
110 | { | 110 | { |
111 | enum | 111 | enum |
@@ -176,18 +176,14 @@ static void scroll_thread(void) | |||
176 | while (1) | 176 | while (1) |
177 | { | 177 | { |
178 | sleep(lcd_scroll_info.ticks); | 178 | sleep(lcd_scroll_info.ticks); |
179 | #if !defined(BOOTLOADER) | ||
180 | #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) | 179 | #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) |
181 | if (lcd_active()) | 180 | if (lcd_active()) |
182 | #endif | 181 | #endif |
183 | lcd_scroll_worker(); | 182 | lcd_scroll_worker(); |
184 | #endif /* !BOOTLOADER */ | ||
185 | } | 183 | } |
186 | } | 184 | } |
187 | #endif /* HAVE_REMOTE_LCD */ | 185 | #endif /* HAVE_REMOTE_LCD */ |
188 | 186 | ||
189 | |||
190 | #ifndef BOOTLOADER | ||
191 | void scroll_init(void) | 187 | void scroll_init(void) |
192 | { | 188 | { |
193 | static char scroll_stack[DEFAULT_STACK_SIZE*3]; | 189 | static char scroll_stack[DEFAULT_STACK_SIZE*3]; |