Ver código fonte

Improve VIRTSER performance (#7528)

xyzz 5 anos atrás
pai
commit
eb309be6f0
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      tmk_core/protocol/lufa/lufa.c

+ 1 - 1
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);
     }