From 8ce60649c85f1ad5371d443675f91c8fc36c3d2e Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sat, 13 Feb 2016 20:29:49 +0200 Subject: [PATCH] Initialize backlight and LCD during visualizer_init --- visualizer.c | 7 +++++++ visualizer.mk | 1 + 2 files changed, 8 insertions(+) diff --git a/visualizer.c b/visualizer.c index 2a92524e25..402bbd1517 100644 --- a/visualizer.c +++ b/visualizer.c @@ -321,6 +321,13 @@ static THD_FUNCTION(visualizerThread, arg) { } void visualizer_init(void) { +#ifdef LCD_ENABLE + gfxInit(); +#endif + +#ifdef LCD_BACKLIGHT_ENABLE + lcd_backlight_init(); +#endif // We are using a low priority thread, the idea is to have it run only // when the main thread is sleeping during the matrix scanning chEvtObjectInit(&layer_changed_event); diff --git a/visualizer.mk b/visualizer.mk index e6e0d63d03..eef2d5cc8a 100644 --- a/visualizer.mk +++ b/visualizer.mk @@ -24,6 +24,7 @@ GFXLIB = $(VISUALIZER_DIR)/ugfx ifdef LCD_ENABLE include $(GFXLIB)/gfx.mk OPT_DEFS += -DLCD_ENABLE +OPT_LIBS += -lm endif SRC += $(GFXSRC) $(VISUALIZER_DIR)/visualizer.c INC += $(GFXINC) $(VISUALIZER_DIR)