diff options
author | Joel Challis <[email protected]> | 2025-05-11 23:38:48 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2025-05-12 08:38:48 +1000 |
commit | 88c094908bb94324e28876f2beb8028a9fad086d (patch) | |
tree | 4e47c513470873b59ac20735bdec99afb903fd5a /tmk_core/protocol/chibios/usb_main.c | |
parent | c045c3e00c41597fbc82239376611d3ac8a7a52e (diff) | |
download | qmk_firmware-88c094908bb94324e28876f2beb8028a9fad086d.tar.gz qmk_firmware-88c094908bb94324e28876f2beb8028a9fad086d.zip |
Add raw_hid support to host driver (#25255)
Diffstat (limited to 'tmk_core/protocol/chibios/usb_main.c')
-rw-r--r-- | tmk_core/protocol/chibios/usb_main.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index 5a5354416f..f9d7f5c4d6 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -32,6 +32,10 @@ #include "usb_driver.h" #include "usb_types.h" +#ifdef RAW_ENABLE +# include "raw_hid.h" +#endif + #ifdef NKRO_ENABLE # include "keycode_config.h" @@ -515,19 +519,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))) { |