From 9134c688d923bc776c939db5c6824e0871b71991 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Wed, 17 May 2023 09:10:13 -0400 Subject: scroll: Eliminate a warning when building a bootloader Bootloaders don't support scrolling, so don't even try to compile the scroll_thread stuff Change-Id: I6bd4f901a2c3e9b79654d27c0349be7e7aa3fa1a --- firmware/scroll_engine.c | 12 ++++-------- 1 file 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] = { 100, 80, 64, 50, 40, 32, 25, 20, 16, 12, 10, 8, 6, 5, 4, 3, 2, 1 }; +#include "drivers/lcd-scroll.c" + +#ifndef BOOTLOADER static void scroll_thread(void); static const char scroll_name[] = "scroll"; -#include "drivers/lcd-scroll.c" - #ifdef HAVE_REMOTE_LCD static struct event_queue scroll_queue SHAREDBSS_ATTR; @@ -58,7 +59,7 @@ static struct event_queue scroll_queue SHAREDBSS_ATTR; #undef LCDM #define LCDM(ma) LCD_REMOTE_ ## ma -#include "drivers/lcd-scroll.c" +#include "drivers/lcd-scroll.c" // Yes, a second time. static void sync_display_ticks(void) { @@ -105,7 +106,6 @@ static bool scroll_process_message(int delay) static void scroll_thread(void) NORETURN_ATTR; #ifdef HAVE_REMOTE_LCD - static void scroll_thread(void) { enum @@ -176,18 +176,14 @@ static void scroll_thread(void) while (1) { sleep(lcd_scroll_info.ticks); -#if !defined(BOOTLOADER) #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) if (lcd_active()) #endif lcd_scroll_worker(); -#endif /* !BOOTLOADER */ } } #endif /* HAVE_REMOTE_LCD */ - -#ifndef BOOTLOADER void scroll_init(void) { static char scroll_stack[DEFAULT_STACK_SIZE*3]; -- cgit v1.2.3