aboutsummaryrefslogtreecommitdiff
path: root/Projects
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2010-03-16 12:14:09 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2010-03-16 12:14:09 +0000
commita422c1e2fa051cae5f813362c78bb82047bea968 (patch)
tree41424e12986e1783c4187ce2b48610f551eacdc3 /Projects
parent24bc556c662ccfe906a91d689be2e4263ebefb5e (diff)
Increased throughput of the USBtoSerial demo on systems that send multiple bytes per packet (thanks to Opendous Inc.).
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1167 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Projects')
-rw-r--r--Projects/USBtoSerial/USBtoSerial.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Projects/USBtoSerial/USBtoSerial.c b/Projects/USBtoSerial/USBtoSerial.c
index 1f70f349..73be33e1 100644
--- a/Projects/USBtoSerial/USBtoSerial.c
+++ b/Projects/USBtoSerial/USBtoSerial.c
@@ -90,11 +90,11 @@ int main(void)
}
/* Read bytes from the USART receive buffer into the USB IN endpoint */
- if (USARTtoUSB_Buffer.Elements)
+ while (USARTtoUSB_Buffer.Elements)
CDC_Device_SendByte(&VirtualSerial_CDC_Interface, Buffer_GetElement(&USARTtoUSB_Buffer));
/* Load bytes from the USART transmit buffer into the USART */
- if (USBtoUSART_Buffer.Elements)
+ while (USBtoUSART_Buffer.Elements)
Serial_TxByte(Buffer_GetElement(&USBtoUSART_Buffer));
CDC_Device_USBTask(&VirtualSerial_CDC_Interface);