aboutsummaryrefslogtreecommitdiffstats
path: root/tmk_core/protocol/vusb/vusb.c
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/protocol/vusb/vusb.c')
-rw-r--r--tmk_core/protocol/vusb/vusb.c15
1 files changed, 6 insertions, 9 deletions
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
}