From 8b29b83dacc442b7d42c1dbf6a4b50e53047b27e Mon Sep 17 00:00:00 2001 From: Drashna Jael're Date: Tue, 25 Jun 2024 18:38:50 -0700 Subject: [PATCH] Revert "[RAW HID] Make send func a bool" This reverts commit e5fb4085c830b6ebd09d4ad568c9b08263b22efe. --- quantum/raw_hid.h | 2 +- tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c | 4 +--- tmk_core/protocol/chibios/usb_main.c | 6 +++--- tmk_core/protocol/lufa/lufa.c | 6 +++--- tmk_core/protocol/vusb/vusb.c | 5 ++--- 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/quantum/raw_hid.h b/quantum/raw_hid.h index 3a51bedeb2..16830833cc 100644 --- a/quantum/raw_hid.h +++ b/quantum/raw_hid.h @@ -26,6 +26,6 @@ void raw_hid_receive(uint8_t *data, uint8_t length); * \param data A pointer to the data to send. Must always be 32 bytes in length. * \param length The length of the buffer. Must always be 32. */ -bool raw_hid_send(uint8_t *data, uint8_t length); +void raw_hid_send(uint8_t *data, uint8_t length); /** \} */ diff --git a/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c b/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c index 2cc7e27c27..bf190b1f18 100644 --- a/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c +++ b/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c @@ -715,13 +715,11 @@ static void udi_hid_raw_report_sent(udd_ep_status_t status, iram_size_t nb_sent, static void udi_hid_raw_setreport_valid(void) {} -bool raw_hid_send(uint8_t *data, uint8_t length) { +void raw_hid_send(uint8_t *data, uint8_t length) { if (main_b_raw_enable && !udi_hid_raw_b_report_trans_ongoing && length == UDI_HID_RAW_REPORT_SIZE) { memcpy(udi_hid_raw_report, data, UDI_HID_RAW_REPORT_SIZE); udi_hid_raw_send_report(); - return true; } - return false; } bool udi_hid_raw_receive_report(void) { diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index 365f5a3923..2024a3bc7f 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -529,11 +529,11 @@ void console_task(void) { #endif /* CONSOLE_ENABLE */ #ifdef RAW_ENABLE -bool raw_hid_send(uint8_t *data, uint8_t length) { +void raw_hid_send(uint8_t *data, uint8_t length) { if (length != RAW_EPSIZE) { - return false; + return; } - return send_report(USB_ENDPOINT_IN_RAW, data, length); + send_report(USB_ENDPOINT_IN_RAW, data, length); } __attribute__((weak)) void raw_hid_receive(uint8_t *data, uint8_t length) { diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 86b1bc47d4..26c0892773 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -138,9 +138,9 @@ USB_ClassInfo_CDC_Device_t cdc_device = { * * FIXME: Needs doc */ -bool raw_hid_send(uint8_t *data, uint8_t length) { - if (length != RAW_EPSIZE) return false; - return send_report(RAW_IN_EPNUM, data, RAW_EPSIZE); +void raw_hid_send(uint8_t *data, uint8_t length) { + if (length != RAW_EPSIZE) return; + send_report(RAW_IN_EPNUM, data, RAW_EPSIZE); } /** \brief Raw HID Receive diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c index c7e45016da..c8ab494253 100644 --- a/tmk_core/protocol/vusb/vusb.c +++ b/tmk_core/protocol/vusb/vusb.c @@ -147,13 +147,12 @@ static void send_report(uint8_t endpoint, void *report, size_t size) { static uint8_t raw_output_buffer[RAW_BUFFER_SIZE]; static uint8_t raw_output_received_bytes = 0; -bool raw_hid_send(uint8_t *data, uint8_t length) { +void raw_hid_send(uint8_t *data, uint8_t length) { if (length != RAW_BUFFER_SIZE) { - return false; + return; } send_report(4, data, 32); - return true; } __attribute__((weak)) void raw_hid_receive(uint8_t *data, uint8_t length) {