summaryrefslogtreecommitdiff
path: root/firmware/scroll_engine.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/scroll_engine.c')
-rw-r--r--firmware/scroll_engine.c26
1 files changed, 14 insertions, 12 deletions
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
49static void scroll_thread(void);
50static const char scroll_name[] = "scroll";
51
52#ifdef HAVE_REMOTE_LCD 48#ifdef HAVE_REMOTE_LCD
53static 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)
60static struct event_queue scroll_queue SHAREDBSS_ATTR;
63 61
64static void sync_display_ticks(void) 62static 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)
106static void scroll_thread(void);
107static const char scroll_name[] = "scroll";
107static void scroll_thread(void) NORETURN_ATTR; 108static void scroll_thread(void) NORETURN_ATTR;
109
108#ifdef HAVE_REMOTE_LCD 110#ifdef HAVE_REMOTE_LCD
109static void scroll_thread(void) 111static 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 */
174static void scroll_thread(void) 176static 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
187void scroll_init(void) 189void 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 */
199void scroll_init(void) 201void scroll_init(void)
200{ 202{
201 /* DUMMY */ 203 /* DUMMY */
202} 204}
203#endif /* ndef BOOTLOADER*/ 205#endif /* BOOTLOADER*/