فهرست منبع

Initialize backlight and LCD during visualizer_init

Fred Sundvik 9 سال پیش
والد
کامیت
8ce60649c8
2فایلهای تغییر یافته به همراه8 افزوده شده و 0 حذف شده
  1. 7 0
      visualizer.c
  2. 1 0
      visualizer.mk

+ 7 - 0
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);

+ 1 - 0
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)