From eb309be6f009a9f3923ea49cec3653b75ec47e69 Mon Sep 17 00:00:00 2001 From: xyzz <1065521+xyzz@users.noreply.github.com> Date: Thu, 30 Jan 2020 19:30:41 -0500 Subject: [PATCH] Improve VIRTSER performance (#7528) --- tmk_core/protocol/lufa/lufa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 7d325a9ba..db66a0722 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); }