diff options
Diffstat (limited to 'tmk_core/protocol/chibios/usb_main.c')
-rw-r--r-- | tmk_core/protocol/chibios/usb_main.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index 5a5354416f..b798a8d1cb 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -21,10 +21,6 @@ #include "host.h" #include "suspend.h" #include "timer.h" -#ifdef SLEEP_LED_ENABLE -# include "sleep_led.h" -# include "led.h" -#endif #include "wait.h" #include "usb_endpoints.h" #include "usb_device_state.h" @@ -32,6 +28,10 @@ #include "usb_driver.h" #include "usb_types.h" +#ifdef RAW_ENABLE +# include "raw_hid.h" +#endif + #ifdef NKRO_ENABLE # include "keycode_config.h" @@ -127,19 +127,11 @@ static inline bool usb_event_queue_dequeue(usbevent_t *event) { static inline void usb_event_suspend_handler(void) { usb_device_state_set_suspend(USB_DRIVER.configuration != 0, USB_DRIVER.configuration); -#ifdef SLEEP_LED_ENABLE - sleep_led_enable(); -#endif /* SLEEP_LED_ENABLE */ } static inline void usb_event_wakeup_handler(void) { suspend_wakeup_init(); usb_device_state_set_resume(USB_DRIVER.configuration != 0, USB_DRIVER.configuration); -#ifdef SLEEP_LED_ENABLE - sleep_led_disable(); - // NOTE: converters may not accept this - led_set(host_keyboard_leds()); -#endif /* SLEEP_LED_ENABLE */ } bool last_suspend_state = false; @@ -515,19 +507,13 @@ void console_task(void) { #endif /* CONSOLE_ENABLE */ #ifdef RAW_ENABLE -void raw_hid_send(uint8_t *data, uint8_t length) { +void send_raw_hid(uint8_t *data, uint8_t length) { if (length != RAW_EPSIZE) { return; } send_report(USB_ENDPOINT_IN_RAW, data, length); } -__attribute__((weak)) void raw_hid_receive(uint8_t *data, uint8_t length) { - // Users should #include "raw_hid.h" in their own code - // and implement this function there. Leave this as weak linkage - // so users can opt to not handle data coming in. -} - void raw_hid_task(void) { uint8_t buffer[RAW_EPSIZE]; while (receive_report(USB_ENDPOINT_OUT_RAW, buffer, sizeof(buffer))) { |