aboutsummaryrefslogtreecommitdiffstats
path: root/tmk_core
diff options
context:
space:
mode:
authorfishsoupisgood <github@madingley.org>2020-10-02 09:48:01 +0100
committerfishsoupisgood <github@madingley.org>2020-10-02 09:48:01 +0100
commit91f71bc582f184043df851ead61b636442663b83 (patch)
treedf10f87b86dd2889cc596cff6ff97ef049e0eb36 /tmk_core
parent28bd394eb775b5f3180ada278d69f3ddadd28ec1 (diff)
downloadfirmware-91f71bc582f184043df851ead61b636442663b83.tar.gz
firmware-91f71bc582f184043df851ead61b636442663b83.tar.bz2
firmware-91f71bc582f184043df851ead61b636442663b83.zip
fish
Diffstat (limited to 'tmk_core')
-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
}