Browse Source

Add suspend support to the ChibiOS visualizer

Fred Sundvik 9 years ago
parent
commit
bcbd8f1c50
1 changed files with 7 additions and 0 deletions
  1. 7 0
      tmk_core/protocol/chibios/main.c

+ 7 - 0
tmk_core/protocol/chibios/main.c

@@ -155,6 +155,9 @@ int main(void) {
 
 
     if(USB_DRIVER.state == USB_SUSPENDED) {
     if(USB_DRIVER.state == USB_SUSPENDED) {
       print("[s]");
       print("[s]");
+#ifdef VISUALIZER_ENABLE
+      visualizer_suspend();
+#endif
       while(USB_DRIVER.state == USB_SUSPENDED) {
       while(USB_DRIVER.state == USB_SUSPENDED) {
         /* Do this in the suspended state */
         /* Do this in the suspended state */
 #ifdef SERIAL_LINK_ENABLE
 #ifdef SERIAL_LINK_ENABLE
@@ -172,6 +175,10 @@ int main(void) {
 #ifdef MOUSEKEY_ENABLE
 #ifdef MOUSEKEY_ENABLE
       mousekey_send();
       mousekey_send();
 #endif /* MOUSEKEY_ENABLE */
 #endif /* MOUSEKEY_ENABLE */
+
+#ifdef VISUALIZER_ENABLE
+      visualizer_resume();
+#endif
     }
     }
 
 
     keyboard_task();
     keyboard_task();