diff options
| author | Fred Sundvik <fsundvik@gmail.com> | 2016-02-13 20:29:49 +0200 |
|---|---|---|
| committer | Fred Sundvik <fsundvik@gmail.com> | 2016-02-13 20:29:49 +0200 |
| commit | 8ce60649c85f1ad5371d443675f91c8fc36c3d2e (patch) | |
| tree | 45d09313d0aaba325f1af5de43211ed563034257 | |
| parent | 209167d4d6a7e65a728fab5d996904cc5fb33a3c (diff) | |
| download | qmk_firmware-8ce60649c85f1ad5371d443675f91c8fc36c3d2e.tar.gz qmk_firmware-8ce60649c85f1ad5371d443675f91c8fc36c3d2e.zip | |
Initialize backlight and LCD during visualizer_init
| -rw-r--r-- | visualizer.c | 7 | ||||
| -rw-r--r-- | visualizer.mk | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/visualizer.c b/visualizer.c index 2a92524e2..402bbd151 100644 --- a/visualizer.c +++ b/visualizer.c | |||
| @@ -321,6 +321,13 @@ static THD_FUNCTION(visualizerThread, arg) { | |||
| 321 | } | 321 | } |
| 322 | 322 | ||
| 323 | void visualizer_init(void) { | 323 | void visualizer_init(void) { |
| 324 | #ifdef LCD_ENABLE | ||
| 325 | gfxInit(); | ||
| 326 | #endif | ||
| 327 | |||
| 328 | #ifdef LCD_BACKLIGHT_ENABLE | ||
| 329 | lcd_backlight_init(); | ||
| 330 | #endif | ||
| 324 | // We are using a low priority thread, the idea is to have it run only | 331 | // We are using a low priority thread, the idea is to have it run only |
| 325 | // when the main thread is sleeping during the matrix scanning | 332 | // when the main thread is sleeping during the matrix scanning |
| 326 | chEvtObjectInit(&layer_changed_event); | 333 | chEvtObjectInit(&layer_changed_event); |
diff --git a/visualizer.mk b/visualizer.mk index e6e0d63d0..eef2d5cc8 100644 --- a/visualizer.mk +++ b/visualizer.mk | |||
| @@ -24,6 +24,7 @@ GFXLIB = $(VISUALIZER_DIR)/ugfx | |||
| 24 | ifdef LCD_ENABLE | 24 | ifdef LCD_ENABLE |
| 25 | include $(GFXLIB)/gfx.mk | 25 | include $(GFXLIB)/gfx.mk |
| 26 | OPT_DEFS += -DLCD_ENABLE | 26 | OPT_DEFS += -DLCD_ENABLE |
| 27 | OPT_LIBS += -lm | ||
| 27 | endif | 28 | endif |
| 28 | SRC += $(GFXSRC) $(VISUALIZER_DIR)/visualizer.c | 29 | SRC += $(GFXSRC) $(VISUALIZER_DIR)/visualizer.c |
| 29 | INC += $(GFXINC) $(VISUALIZER_DIR) | 30 | INC += $(GFXINC) $(VISUALIZER_DIR) |
