diff options
| author | Fred Sundvik <fsundvik@gmail.com> | 2016-07-07 14:01:20 +0300 |
|---|---|---|
| committer | Fred Sundvik <fsundvik@gmail.com> | 2016-07-07 14:01:20 +0300 |
| commit | 7229751ba9d402b2a6c9dc1b7b29385b5162fe41 (patch) | |
| tree | e3bfc81e5853b6bc1729058cdb114d72bf372ce0 | |
| parent | 07d0d5cbe48d7afaf0bc8c9916d40179ec51cb42 (diff) | |
| download | qmk_firmware-7229751ba9d402b2a6c9dc1b7b29385b5162fe41.tar.gz qmk_firmware-7229751ba9d402b2a6c9dc1b7b29385b5162fe41.zip | |
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
| -rw-r--r-- | quantum/visualizer/visualizer.c | 2 | ||||
| -rw-r--r-- | quantum/visualizer/visualizer.mk | 2 | ||||
| -rw-r--r-- | tmk_core/protocol/chibios/main.c | 7 |
3 files changed, 5 insertions, 6 deletions
diff --git a/quantum/visualizer/visualizer.c b/quantum/visualizer/visualizer.c index abca22d85..dfa2ff4ee 100644 --- a/quantum/visualizer/visualizer.c +++ b/quantum/visualizer/visualizer.c | |||
| @@ -456,9 +456,7 @@ static DECLARE_THREAD_FUNCTION(visualizerThread, arg) { | |||
| 456 | } | 456 | } |
| 457 | 457 | ||
| 458 | void visualizer_init(void) { | 458 | void visualizer_init(void) { |
| 459 | #ifdef LCD_ENABLE | ||
| 460 | gfxInit(); | 459 | gfxInit(); |
| 461 | #endif | ||
| 462 | 460 | ||
| 463 | #ifdef LCD_BACKLIGHT_ENABLE | 461 | #ifdef LCD_BACKLIGHT_ENABLE |
| 464 | lcd_backlight_init(); | 462 | lcd_backlight_init(); |
diff --git a/quantum/visualizer/visualizer.mk b/quantum/visualizer/visualizer.mk index 149968de7..379496fb6 100644 --- a/quantum/visualizer/visualizer.mk +++ b/quantum/visualizer/visualizer.mk | |||
| @@ -42,7 +42,7 @@ endif | |||
| 42 | 42 | ||
| 43 | ifdef LED_ENABLE | 43 | ifdef LED_ENABLE |
| 44 | SRC += $(VISUALIZER_DIR)/led_test.c | 44 | SRC += $(VISUALIZER_DIR)/led_test.c |
| 45 | UDEFS += -DLED_ENABLE | 45 | OPT_DEFS += -DLED_ENABLE |
| 46 | endif | 46 | endif |
| 47 | 47 | ||
| 48 | include $(GFXLIB)/gfx.mk | 48 | include $(GFXLIB)/gfx.mk |
diff --git a/tmk_core/protocol/chibios/main.c b/tmk_core/protocol/chibios/main.c index 6bf9c1668..36fd45d45 100644 --- a/tmk_core/protocol/chibios/main.c +++ b/tmk_core/protocol/chibios/main.c | |||
| @@ -104,13 +104,14 @@ int main(void) { | |||
| 104 | /* init printf */ | 104 | /* init printf */ |
| 105 | init_printf(NULL,sendchar_pf); | 105 | init_printf(NULL,sendchar_pf); |
| 106 | 106 | ||
| 107 | #ifdef SERIAL_LINK_ENABLE | ||
| 108 | init_serial_link(); | ||
| 109 | #endif | ||
| 110 | |||
| 107 | #ifdef VISUALIZER_ENABLE | 111 | #ifdef VISUALIZER_ENABLE |
| 108 | visualizer_init(); | 112 | visualizer_init(); |
| 109 | #endif | 113 | #endif |
| 110 | 114 | ||
| 111 | #ifdef SERIAL_LINK_ENABLE | ||
| 112 | init_serial_link(); | ||
| 113 | #endif | ||
| 114 | 115 | ||
| 115 | host_driver_t* driver = NULL; | 116 | host_driver_t* driver = NULL; |
| 116 | 117 | ||
