diff options
Diffstat (limited to 'tmk_core/protocol/chibios/main.c')
-rw-r--r-- | tmk_core/protocol/chibios/main.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/tmk_core/protocol/chibios/main.c b/tmk_core/protocol/chibios/main.c index b0eb9aef8..7138b5535 100644 --- a/tmk_core/protocol/chibios/main.c +++ b/tmk_core/protocol/chibios/main.c | |||
@@ -42,7 +42,7 @@ | |||
42 | #include "visualizer/visualizer.h" | 42 | #include "visualizer/visualizer.h" |
43 | #endif | 43 | #endif |
44 | #include "suspend.h" | 44 | #include "suspend.h" |
45 | 45 | #include "wait.h" | |
46 | 46 | ||
47 | /* ------------------------- | 47 | /* ------------------------- |
48 | * TMK host driver defs | 48 | * TMK host driver defs |
@@ -70,19 +70,19 @@ host_driver_t chibios_driver = { | |||
70 | * Amber LED blinker thread, times are in milliseconds. | 70 | * Amber LED blinker thread, times are in milliseconds. |
71 | */ | 71 | */ |
72 | /* set this variable to non-zero anywhere to blink once */ | 72 | /* set this variable to non-zero anywhere to blink once */ |
73 | // uint8_t blinkLed = 0; | 73 | // static THD_WORKING_AREA(waThread1, 128); |
74 | // static THD_WORKING_AREA(waBlinkerThread, 128); | 74 | // static THD_FUNCTION(Thread1, arg) { |
75 | // static THD_FUNCTION(blinkerThread, arg) { | 75 | |
76 | // (void)arg; | 76 | // (void)arg; |
77 | // chRegSetThreadName("blinkOrange"); | 77 | // chRegSetThreadName("blinker"); |
78 | // while(true) { | 78 | // while (true) { |
79 | // if(blinkLed) { | 79 | // systime_t time; |
80 | // blinkLed = 0; | 80 | |
81 | // palSetPad(TEENSY_PIN13_IOPORT, TEENSY_PIN13); | 81 | // time = USB_DRIVER.state == USB_ACTIVE ? 250 : 500; |
82 | // chThdSleepMilliseconds(100); | 82 | // palClearLine(LINE_CAPS_LOCK); |
83 | // palClearPad(TEENSY_PIN13_IOPORT, TEENSY_PIN13); | 83 | // chSysPolledDelayX(MS2RTC(STM32_HCLK, time)); |
84 | // } | 84 | // palSetLine(LINE_CAPS_LOCK); |
85 | // chThdSleepMilliseconds(100); | 85 | // chSysPolledDelayX(MS2RTC(STM32_HCLK, time)); |
86 | // } | 86 | // } |
87 | // } | 87 | // } |
88 | 88 | ||
@@ -96,7 +96,7 @@ int main(void) { | |||
96 | chSysInit(); | 96 | chSysInit(); |
97 | 97 | ||
98 | // TESTING | 98 | // TESTING |
99 | // chThdCreateStatic(waBlinkerThread, sizeof(waBlinkerThread), NORMALPRIO, blinkerThread, NULL); | 99 | // chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL); |
100 | 100 | ||
101 | /* Init USB */ | 101 | /* Init USB */ |
102 | init_usb_driver(&USB_DRIVER); | 102 | init_usb_driver(&USB_DRIVER); |
@@ -128,7 +128,7 @@ int main(void) { | |||
128 | } | 128 | } |
129 | serial_link_update(); | 129 | serial_link_update(); |
130 | #endif | 130 | #endif |
131 | chThdSleepMilliseconds(50); | 131 | wait_ms(50); |
132 | } | 132 | } |
133 | 133 | ||
134 | /* Do need to wait here! | 134 | /* Do need to wait here! |
@@ -136,7 +136,7 @@ int main(void) { | |||
136 | * before the USB is completely ready, which sometimes causes | 136 | * before the USB is completely ready, which sometimes causes |
137 | * HardFaults. | 137 | * HardFaults. |
138 | */ | 138 | */ |
139 | chThdSleepMilliseconds(50); | 139 | wait_ms(50); |
140 | 140 | ||
141 | print("USB configured.\n"); | 141 | print("USB configured.\n"); |
142 | 142 | ||