aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
m---------lib/chibios0
-rw-r--r--tmk_core/protocol/chibios/usb_main.c11
2 files changed, 5 insertions, 6 deletions
diff --git a/lib/chibios b/lib/chibios
Subproject 8fce03b3a75c743e5d5c40b9d59c1637c59d22a Subproject e26cb16a7296a196d7c74eae22cbee00989cb7b
diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c
index 9bfdf572a..6173d3ad1 100644
--- a/tmk_core/protocol/chibios/usb_main.c
+++ b/tmk_core/protocol/chibios/usb_main.c
@@ -778,10 +778,6 @@ static const USBEndpointConfig nkro_ep_config = {
778 * TODO: maybe disable some things when connection is lost? */ 778 * TODO: maybe disable some things when connection is lost? */
779static void usb_event_cb(USBDriver *usbp, usbevent_t event) { 779static void usb_event_cb(USBDriver *usbp, usbevent_t event) {
780 switch(event) { 780 switch(event) {
781 case USB_EVENT_RESET:
782 //TODO: from ISR! print("[R]");
783 return;
784
785 case USB_EVENT_ADDRESS: 781 case USB_EVENT_ADDRESS:
786 return; 782 return;
787 783
@@ -804,12 +800,15 @@ static void usb_event_cb(USBDriver *usbp, usbevent_t event) {
804#endif /* NKRO_ENABLE */ 800#endif /* NKRO_ENABLE */
805 osalSysUnlockFromISR(); 801 osalSysUnlockFromISR();
806 return; 802 return;
807
808 case USB_EVENT_SUSPEND: 803 case USB_EVENT_SUSPEND:
809 //TODO: from ISR! print("[S]"); 804 //TODO: from ISR! print("[S]");
810#ifdef SLEEP_LED_ENABLE 805#ifdef SLEEP_LED_ENABLE
811 sleep_led_enable(); 806 sleep_led_enable();
812#endif /* SLEEP_LED_ENABLE */ 807#endif /* SLEEP_LED_ENABLE */
808 /* Falls into.*/
809 case USB_EVENT_UNCONFIGURED:
810 /* Falls into.*/
811 case USB_EVENT_RESET:
813 return; 812 return;
814 813
815 case USB_EVENT_WAKEUP: 814 case USB_EVENT_WAKEUP:
@@ -1032,7 +1031,7 @@ void init_usb_driver(USBDriver *usbp) {
1032 1031
1033 chVTObjectInit(&keyboard_idle_timer); 1032 chVTObjectInit(&keyboard_idle_timer);
1034#ifdef CONSOLE_ENABLE 1033#ifdef CONSOLE_ENABLE
1035 obqObjectInit(&console_buf_queue, console_queue_buffer, CONSOLE_EPSIZE, CONSOLE_QUEUE_CAPACITY, console_queue_onotify, (void*)usbp); 1034 obqObjectInit(&console_buf_queue, false, console_queue_buffer, CONSOLE_EPSIZE, CONSOLE_QUEUE_CAPACITY, console_queue_onotify, (void*)usbp);
1036 chVTObjectInit(&console_flush_timer); 1035 chVTObjectInit(&console_flush_timer);
1037#endif 1036#endif
1038} 1037}