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/protocol/chibios/main.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tmk_core/protocol') 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-24-g4f1b From 7229751ba9d402b2a6c9dc1b7b29385b5162fe41 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Thu, 7 Jul 2016 14:01:20 +0300 Subject: 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 --- tmk_core/protocol/chibios/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tmk_core/protocol') 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) { /* 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; -- cgit v1.2.3-24-g4f1b From bcbd8f1c50c6bc6169fe8afadafd6a21e182fa1f Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Thu, 7 Jul 2016 14:22:45 +0300 Subject: Add suspend support to the ChibiOS visualizer --- tmk_core/protocol/chibios/main.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tmk_core/protocol') diff --git a/tmk_core/protocol/chibios/main.c b/tmk_core/protocol/chibios/main.c index 36fd45d45..b0eb9aef8 100644 --- a/tmk_core/protocol/chibios/main.c +++ b/tmk_core/protocol/chibios/main.c @@ -155,6 +155,9 @@ int main(void) { if(USB_DRIVER.state == USB_SUSPENDED) { print("[s]"); +#ifdef VISUALIZER_ENABLE + visualizer_suspend(); +#endif while(USB_DRIVER.state == USB_SUSPENDED) { /* Do this in the suspended state */ #ifdef SERIAL_LINK_ENABLE @@ -172,6 +175,10 @@ int main(void) { #ifdef MOUSEKEY_ENABLE mousekey_send(); #endif /* MOUSEKEY_ENABLE */ + +#ifdef VISUALIZER_ENABLE + visualizer_resume(); +#endif } keyboard_task(); -- cgit v1.2.3-24-g4f1b