diff options
| author | Joshua Colbeck <Skrymir@users.noreply.github.com> | 2016-07-12 23:14:30 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-12 23:14:30 -0500 |
| commit | 68ceffe53e299fb504bdd4733b1555a8558b472b (patch) | |
| tree | ae9cc958d239374478338fee2783c203517d6762 /tmk_core/protocol/chibios/main.c | |
| parent | ac978a50a2f523f2de7f928a6b41ac40469911c2 (diff) | |
| parent | a998a48673372e409991066d7d2d9ba282f79d59 (diff) | |
| download | qmk_firmware-68ceffe53e299fb504bdd4733b1555a8558b472b.tar.gz qmk_firmware-68ceffe53e299fb504bdd4733b1555a8558b472b.zip | |
Merge pull request #2 from jackhumbert/master
Pull from upstream
Diffstat (limited to 'tmk_core/protocol/chibios/main.c')
| -rw-r--r-- | tmk_core/protocol/chibios/main.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tmk_core/protocol/chibios/main.c b/tmk_core/protocol/chibios/main.c index aeb11752f..b0eb9aef8 100644 --- a/tmk_core/protocol/chibios/main.c +++ b/tmk_core/protocol/chibios/main.c | |||
| @@ -38,6 +38,9 @@ | |||
| 38 | #ifdef SERIAL_LINK_ENABLE | 38 | #ifdef SERIAL_LINK_ENABLE |
| 39 | #include "serial_link/system/serial_link.h" | 39 | #include "serial_link/system/serial_link.h" |
| 40 | #endif | 40 | #endif |
| 41 | #ifdef VISUALIZER_ENABLE | ||
| 42 | #include "visualizer/visualizer.h" | ||
| 43 | #endif | ||
| 41 | #include "suspend.h" | 44 | #include "suspend.h" |
| 42 | 45 | ||
| 43 | 46 | ||
| @@ -105,6 +108,11 @@ int main(void) { | |||
| 105 | init_serial_link(); | 108 | init_serial_link(); |
| 106 | #endif | 109 | #endif |
| 107 | 110 | ||
| 111 | #ifdef VISUALIZER_ENABLE | ||
| 112 | visualizer_init(); | ||
| 113 | #endif | ||
| 114 | |||
| 115 | |||
| 108 | host_driver_t* driver = NULL; | 116 | host_driver_t* driver = NULL; |
| 109 | 117 | ||
| 110 | /* Wait until the USB or serial link is active */ | 118 | /* Wait until the USB or serial link is active */ |
| @@ -147,6 +155,9 @@ int main(void) { | |||
| 147 | 155 | ||
| 148 | if(USB_DRIVER.state == USB_SUSPENDED) { | 156 | if(USB_DRIVER.state == USB_SUSPENDED) { |
| 149 | print("[s]"); | 157 | print("[s]"); |
| 158 | #ifdef VISUALIZER_ENABLE | ||
| 159 | visualizer_suspend(); | ||
| 160 | #endif | ||
| 150 | while(USB_DRIVER.state == USB_SUSPENDED) { | 161 | while(USB_DRIVER.state == USB_SUSPENDED) { |
| 151 | /* Do this in the suspended state */ | 162 | /* Do this in the suspended state */ |
| 152 | #ifdef SERIAL_LINK_ENABLE | 163 | #ifdef SERIAL_LINK_ENABLE |
| @@ -164,6 +175,10 @@ int main(void) { | |||
| 164 | #ifdef MOUSEKEY_ENABLE | 175 | #ifdef MOUSEKEY_ENABLE |
| 165 | mousekey_send(); | 176 | mousekey_send(); |
| 166 | #endif /* MOUSEKEY_ENABLE */ | 177 | #endif /* MOUSEKEY_ENABLE */ |
| 178 | |||
| 179 | #ifdef VISUALIZER_ENABLE | ||
| 180 | visualizer_resume(); | ||
| 181 | #endif | ||
| 167 | } | 182 | } |
| 168 | 183 | ||
| 169 | keyboard_task(); | 184 | keyboard_task(); |
