summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxyzz <1065521+xyzz@users.noreply.github.com>2020-01-30 19:30:41 -0500
committerGitHub <noreply@github.com>2020-01-31 11:30:41 +1100
commiteb309be6f009a9f3923ea49cec3653b75ec47e69 (patch)
tree89a31127d96ccafc57708701801c452ccbc2c1d5
parent4139de3cc9c56a157d78e1e418893d08e3f23bde (diff)
Improve VIRTSER performance (#7528)
-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 7d325a9ba2..db66a07222 100644
--- a/tmk_core/protocol/lufa/lufa.c
+++ b/tmk_core/protocol/lufa/lufa.c
@@ -869,7 +869,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);
}