diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/drivers/lcd-scroll.c | 2 | ||||
-rw-r--r-- | firmware/scroll_engine.c | 26 |
2 files changed, 15 insertions, 13 deletions
diff --git a/firmware/drivers/lcd-scroll.c b/firmware/drivers/lcd-scroll.c index dfdf78ecda..cd8fc4587e 100644 --- a/firmware/drivers/lcd-scroll.c +++ b/firmware/drivers/lcd-scroll.c | |||
@@ -180,7 +180,7 @@ bool LCDFN(scroll_now)(struct scrollinfo *s) | |||
180 | return ended; | 180 | return ended; |
181 | } | 181 | } |
182 | 182 | ||
183 | #if !defined(BOOTLOADER) || defined(HAVE_REMOTE_LCD) | 183 | #if !defined(BOOTLOADER) |
184 | static void LCDFN(scroll_worker)(void) | 184 | static void LCDFN(scroll_worker)(void) |
185 | { | 185 | { |
186 | int index; | 186 | int index; |
diff --git a/firmware/scroll_engine.c b/firmware/scroll_engine.c index 11355d1872..c32f4632e2 100644 --- a/firmware/scroll_engine.c +++ b/firmware/scroll_engine.c | |||
@@ -45,13 +45,7 @@ static const char scroll_tick_table[18] = { | |||
45 | 45 | ||
46 | #include "drivers/lcd-scroll.c" | 46 | #include "drivers/lcd-scroll.c" |
47 | 47 | ||
48 | #ifndef BOOTLOADER | ||
49 | static void scroll_thread(void); | ||
50 | static const char scroll_name[] = "scroll"; | ||
51 | |||
52 | #ifdef HAVE_REMOTE_LCD | 48 | #ifdef HAVE_REMOTE_LCD |
53 | static struct event_queue scroll_queue SHAREDBSS_ATTR; | ||
54 | |||
55 | /* copied from lcd-remote-1bit.c */ | 49 | /* copied from lcd-remote-1bit.c */ |
56 | /* Compile 1 bit vertical packing LCD driver for remote LCD */ | 50 | /* Compile 1 bit vertical packing LCD driver for remote LCD */ |
57 | #undef LCDFN | 51 | #undef LCDFN |
@@ -59,7 +53,11 @@ static struct event_queue scroll_queue SHAREDBSS_ATTR; | |||
59 | #undef LCDM | 53 | #undef LCDM |
60 | #define LCDM(ma) LCD_REMOTE_ ## ma | 54 | #define LCDM(ma) LCD_REMOTE_ ## ma |
61 | 55 | ||
62 | #include "drivers/lcd-scroll.c" // Yes, a second time. | 56 | #include "drivers/lcd-scroll.c" |
57 | #endif /* HAVE_REMOTE_LCD */ | ||
58 | |||
59 | #if defined(HAVE_REMOTE_LCD) && !defined(BOOTLOADER) | ||
60 | static struct event_queue scroll_queue SHAREDBSS_ATTR; | ||
63 | 61 | ||
64 | static void sync_display_ticks(void) | 62 | static void sync_display_ticks(void) |
65 | { | 63 | { |
@@ -102,9 +100,13 @@ static bool scroll_process_message(int delay) | |||
102 | 100 | ||
103 | return false; | 101 | return false; |
104 | } | 102 | } |
105 | #endif /* HAVE_REMOTE_LCD */ | 103 | #endif /* HAVE_REMOTE_LCD && !BOOTLOADER */ |
106 | 104 | ||
105 | #if !defined(BOOTLOADER) | ||
106 | static void scroll_thread(void); | ||
107 | static const char scroll_name[] = "scroll"; | ||
107 | static void scroll_thread(void) NORETURN_ATTR; | 108 | static void scroll_thread(void) NORETURN_ATTR; |
109 | |||
108 | #ifdef HAVE_REMOTE_LCD | 110 | #ifdef HAVE_REMOTE_LCD |
109 | static void scroll_thread(void) | 111 | static void scroll_thread(void) |
110 | { | 112 | { |
@@ -170,7 +172,7 @@ static void scroll_thread(void) | |||
170 | } | 172 | } |
171 | } | 173 | } |
172 | } | 174 | } |
173 | #else | 175 | #else /* !HAVE_REMOTE_LCD */ |
174 | static void scroll_thread(void) | 176 | static void scroll_thread(void) |
175 | { | 177 | { |
176 | while (1) | 178 | while (1) |
@@ -182,7 +184,7 @@ static void scroll_thread(void) | |||
182 | lcd_scroll_worker(); | 184 | lcd_scroll_worker(); |
183 | } | 185 | } |
184 | } | 186 | } |
185 | #endif /* HAVE_REMOTE_LCD */ | 187 | #endif /* !HAVE_REMOTE_LCD */ |
186 | 188 | ||
187 | void scroll_init(void) | 189 | void scroll_init(void) |
188 | { | 190 | { |
@@ -195,9 +197,9 @@ void scroll_init(void) | |||
195 | IF_PRIO(, PRIORITY_USER_INTERFACE) | 197 | IF_PRIO(, PRIORITY_USER_INTERFACE) |
196 | IF_COP(, CPU)); | 198 | IF_COP(, CPU)); |
197 | } | 199 | } |
198 | #else | 200 | #else /* BOOTLOADER */ |
199 | void scroll_init(void) | 201 | void scroll_init(void) |
200 | { | 202 | { |
201 | /* DUMMY */ | 203 | /* DUMMY */ |
202 | } | 204 | } |
203 | #endif /* ndef BOOTLOADER*/ | 205 | #endif /* BOOTLOADER*/ |