瀏覽代碼

Add suspend support to the ChibiOS visualizer

Fred Sundvik 9 年之前
父節點
當前提交
bcbd8f1c50
共有 1 個文件被更改,包括 7 次插入0 次删除
  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) {
       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();