Fix visualizer crash at startup

Visualizer and serial link initialized in the wrong order.
The LED_ENABLED define wasn't set properly
uGfx is always initialized
example_keyboards
Fred Sundvik 8 years ago
parent 07d0d5cbe4
commit 7229751ba9

@ -456,9 +456,7 @@ static DECLARE_THREAD_FUNCTION(visualizerThread, arg) {
}
void visualizer_init(void) {
#ifdef LCD_ENABLE
gfxInit();
#endif
#ifdef LCD_BACKLIGHT_ENABLE
lcd_backlight_init();

@ -42,7 +42,7 @@ endif
ifdef LED_ENABLE
SRC += $(VISUALIZER_DIR)/led_test.c
UDEFS += -DLED_ENABLE
OPT_DEFS += -DLED_ENABLE
endif
include $(GFXLIB)/gfx.mk

@ -104,13 +104,14 @@ int main(void) {
/* init printf */
init_printf(NULL,sendchar_pf);
#ifdef SERIAL_LINK_ENABLE
init_serial_link();
#endif
#ifdef VISUALIZER_ENABLE
visualizer_init();
#endif
#ifdef SERIAL_LINK_ENABLE
init_serial_link();
#endif
host_driver_t* driver = NULL;

Loading…
Cancel
Save