aboutsummaryrefslogtreecommitdiff
path: root/tmk_core/protocol/chibios/main.c
diff options
context:
space:
mode:
authorskullydazed <skullydazed@users.noreply.github.com>2017-09-29 16:17:30 -0700
committerGitHub <noreply@github.com>2017-09-29 16:17:30 -0700
commit5fd68266f5d90b2c7045f44f678d71b782907752 (patch)
tree443e70a3f0dcebadd39a0c96857130546cc690a7 /tmk_core/protocol/chibios/main.c
parentb736f25e85171fceb06f01cf45a45f84dd0a4911 (diff)
downloadqmk_firmware-5fd68266f5d90b2c7045f44f678d71b782907752.tar.gz
qmk_firmware-5fd68266f5d90b2c7045f44f678d71b782907752.zip
Clueboard 60% support (#1746)
* initial clueboard_60 support * LED lighting support * fix the clueboard->clueboard_66 rename * Add layout support to clueboard_60 * Fix the 60_iso layout so it's actually iso * add a default keymap for AEK layout * fix clueboard_17 * Fixup the ISO layouts * Fix the `wait_ms()/wait_us()` definitions for chibios * Fix up the wait_ms/wait_us hack. Reduce stack size. * Add a missing #include "wait.h" * commit files that should have already been comitted
Diffstat (limited to 'tmk_core/protocol/chibios/main.c')
-rw-r--r--tmk_core/protocol/chibios/main.c32
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