From 07d0d5cbe48d7afaf0bc8c9916d40179ec51cb42 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Thu, 7 Jul 2016 12:46:10 +0300 Subject: Makefile fixes and update of Visualizer --- tmk_core/common/keyboard.c | 8 ++++++++ tmk_core/protocol/chibios/main.c | 7 +++++++ 2 files changed, 15 insertions(+) (limited to 'tmk_core') diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index 3a1262a9f..c46a701b3 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -29,6 +29,7 @@ along with this program. If not, see . #include "sendchar.h" #include "eeconfig.h" #include "backlight.h" +#include "action_layer.h" #ifdef BOOTMAGIC_ENABLE # include "bootmagic.h" #else @@ -52,6 +53,9 @@ along with this program. If not, see . #ifdef SERIAL_LINK_ENABLE # include "serial_link/system/serial_link.h" #endif +#ifdef VISUALIZER_ENABLE +# include "visualizer/visualizer.h" +#endif #ifdef MATRIX_HAS_GHOST static bool has_ghost_in_row(uint8_t row) @@ -181,6 +185,10 @@ MATRIX_LOOP_END: serial_link_update(); #endif +#ifdef VISUALIZER_ENABLE + visualizer_update(default_layer_state, layer_state, host_keyboard_leds()); +#endif + // update LED if (led_status != host_keyboard_leds()) { led_status = host_keyboard_leds(); diff --git a/tmk_core/protocol/chibios/main.c b/tmk_core/protocol/chibios/main.c index aeb11752f..6bf9c1668 100644 --- a/tmk_core/protocol/chibios/main.c +++ b/tmk_core/protocol/chibios/main.c @@ -38,6 +38,9 @@ #ifdef SERIAL_LINK_ENABLE #include "serial_link/system/serial_link.h" #endif +#ifdef VISUALIZER_ENABLE +#include "visualizer/visualizer.h" +#endif #include "suspend.h" @@ -101,6 +104,10 @@ int main(void) { /* init printf */ init_printf(NULL,sendchar_pf); +#ifdef VISUALIZER_ENABLE + visualizer_init(); +#endif + #ifdef SERIAL_LINK_ENABLE init_serial_link(); #endif -- cgit v1.2.3