scroll: Fix red from previous commit.

Targets with remote LCDs need to have the lcd scroll driver instantiated,
even in the bootloader.

This is because lcd_remote_scroll_stop() is called, in addition to
lcd_scroll_stop().  This could probably be excised.

Change-Id: I475269f9361eb469c62ad0f74abc1eb3baa4c134
This commit is contained in:
Solomon Peachy 2023-05-17 11:50:38 -04:00
parent 9134c688d9
commit 72c0e49b41
2 changed files with 15 additions and 13 deletions

View file

@ -180,7 +180,7 @@ bool LCDFN(scroll_now)(struct scrollinfo *s)
return ended; return ended;
} }
#if !defined(BOOTLOADER) || defined(HAVE_REMOTE_LCD) #if !defined(BOOTLOADER)
static void LCDFN(scroll_worker)(void) static void LCDFN(scroll_worker)(void)
{ {
int index; int index;

View file

@ -45,13 +45,7 @@ static const char scroll_tick_table[18] = {
#include "drivers/lcd-scroll.c" #include "drivers/lcd-scroll.c"
#ifndef BOOTLOADER
static void scroll_thread(void);
static const char scroll_name[] = "scroll";
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
static struct event_queue scroll_queue SHAREDBSS_ATTR;
/* copied from lcd-remote-1bit.c */ /* copied from lcd-remote-1bit.c */
/* Compile 1 bit vertical packing LCD driver for remote LCD */ /* Compile 1 bit vertical packing LCD driver for remote LCD */
#undef LCDFN #undef LCDFN
@ -59,7 +53,11 @@ static struct event_queue scroll_queue SHAREDBSS_ATTR;
#undef LCDM #undef LCDM
#define LCDM(ma) LCD_REMOTE_ ## ma #define LCDM(ma) LCD_REMOTE_ ## ma
#include "drivers/lcd-scroll.c" // Yes, a second time. #include "drivers/lcd-scroll.c"
#endif /* HAVE_REMOTE_LCD */
#if defined(HAVE_REMOTE_LCD) && !defined(BOOTLOADER)
static struct event_queue scroll_queue SHAREDBSS_ATTR;
static void sync_display_ticks(void) static void sync_display_ticks(void)
{ {
@ -102,9 +100,13 @@ static bool scroll_process_message(int delay)
return false; return false;
} }
#endif /* HAVE_REMOTE_LCD */ #endif /* HAVE_REMOTE_LCD && !BOOTLOADER */
#if !defined(BOOTLOADER)
static void scroll_thread(void);
static const char scroll_name[] = "scroll";
static void scroll_thread(void) NORETURN_ATTR; static void scroll_thread(void) NORETURN_ATTR;
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
static void scroll_thread(void) static void scroll_thread(void)
{ {
@ -170,7 +172,7 @@ static void scroll_thread(void)
} }
} }
} }
#else #else /* !HAVE_REMOTE_LCD */
static void scroll_thread(void) static void scroll_thread(void)
{ {
while (1) while (1)
@ -182,7 +184,7 @@ static void scroll_thread(void)
lcd_scroll_worker(); lcd_scroll_worker();
} }
} }
#endif /* HAVE_REMOTE_LCD */ #endif /* !HAVE_REMOTE_LCD */
void scroll_init(void) void scroll_init(void)
{ {
@ -195,9 +197,9 @@ void scroll_init(void)
IF_PRIO(, PRIORITY_USER_INTERFACE) IF_PRIO(, PRIORITY_USER_INTERFACE)
IF_COP(, CPU)); IF_COP(, CPU));
} }
#else #else /* BOOTLOADER */
void scroll_init(void) void scroll_init(void)
{ {
/* DUMMY */ /* DUMMY */
} }
#endif /* ndef BOOTLOADER*/ #endif /* BOOTLOADER*/