From 91f71bc582f184043df851ead61b636442663b83 Mon Sep 17 00:00:00 2001 From: fishsoupisgood Date: Fri, 2 Oct 2020 09:48:01 +0100 Subject: fish --- tmk_core/protocol/vusb/vusb.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'tmk_core') diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c index 77bbbd7bd..7d1a0a7a2 100644 --- a/tmk_core/protocol/vusb/vusb.c +++ b/tmk_core/protocol/vusb/vusb.c @@ -107,12 +107,13 @@ void vusb_transfer_keyboard(void) { * RAW HID *------------------------------------------------------------------*/ #ifdef RAW_ENABLE -# define RAW_BUFFER_SIZE 32 +# define RAW_BUFFER_SIZE 8 # define RAW_EPSIZE 8 static uint8_t raw_output_buffer[RAW_BUFFER_SIZE]; static uint8_t raw_output_received_bytes = 0; +#if 0 void raw_hid_send(uint8_t *data, uint8_t length) { if (length != RAW_BUFFER_SIZE) { return; @@ -131,6 +132,7 @@ void raw_hid_send(uint8_t *data, uint8_t length) { } usbSetInterrupt4(0, 0); } +#endif __attribute__((weak)) void raw_hid_receive(uint8_t *data, uint8_t length) { // Users should #include "raw_hid.h" in their own code @@ -344,15 +346,10 @@ void usbFunctionWriteOut(uchar *data, uchar len) { return; } - if (raw_output_received_bytes + len > RAW_BUFFER_SIZE) { - dprint("RAW: buffer full\n"); - raw_output_received_bytes = 0; - } else { - for (uint8_t i = 0; i < 8; i++) { - raw_output_buffer[raw_output_received_bytes + i] = data[i]; - } - raw_output_received_bytes += len; + for (uint8_t i = 0; i < 8; i++) { + raw_output_buffer[i] = data[i]; } + raw_output_received_bytes = len; #endif } -- cgit v1.2.3