summaryrefslogtreecommitdiff
path: root/tmk_core/protocol/lufa/lufa.c
diff options
context:
space:
mode:
authorxyzz <1065521+xyzz@users.noreply.github.com>2020-01-30 19:30:41 -0500
committerFlorian Didron <fdidron@users.noreply.github.com>2020-02-26 10:15:12 +0900
commit67d285a1a1d4e3b85b4c07bf5c55f936aa567c52 (patch)
treeaffbdbe9c84534dba33fcc257316b50b711c5b9d /tmk_core/protocol/lufa/lufa.c
parentccbeb616a607aaa2889f0cf3563ff4bc798be1b4 (diff)
Improve VIRTSER performance (#7528)
Diffstat (limited to 'tmk_core/protocol/lufa/lufa.c')
-rw-r--r--tmk_core/protocol/lufa/lufa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c
index 5538f0e245..4f9ab4f62c 100644
--- a/tmk_core/protocol/lufa/lufa.c
+++ b/tmk_core/protocol/lufa/lufa.c
@@ -981,7 +981,7 @@ void virtser_recv(uint8_t c) {
void virtser_task(void) {
uint16_t count = CDC_Device_BytesReceived(&cdc_device);
uint8_t ch;
- if (count) {
+ for (; count; --count) {
ch = CDC_Device_ReceiveByte(&cdc_device);
virtser_recv(ch);
}