From 7d51e51c79c3af7791f4c3e8c7e5e8196a2c3f93 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Tue, 16 Mar 2010 12:14:09 +0000 Subject: Increased throughput of the USBtoSerial demo on systems that send multiple bytes per packet (thanks to Opendous Inc.). --- Projects/USBtoSerial/USBtoSerial.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Projects/USBtoSerial') diff --git a/Projects/USBtoSerial/USBtoSerial.c b/Projects/USBtoSerial/USBtoSerial.c index 1f70f3493..73be33e1f 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); -- cgit v1.2.3