diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-03-16 12:14:09 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-03-16 12:14:09 +0000 |
commit | 7d51e51c79c3af7791f4c3e8c7e5e8196a2c3f93 (patch) | |
tree | 41424e12986e1783c4187ce2b48610f551eacdc3 | |
parent | 2b74b517ea48507a0ab3fee5628a363ab0dcd3fb (diff) | |
download | lufa-7d51e51c79c3af7791f4c3e8c7e5e8196a2c3f93.tar.gz lufa-7d51e51c79c3af7791f4c3e8c7e5e8196a2c3f93.tar.bz2 lufa-7d51e51c79c3af7791f4c3e8c7e5e8196a2c3f93.zip |
Increased throughput of the USBtoSerial demo on systems that send multiple bytes per packet (thanks to Opendous Inc.).
-rw-r--r-- | LUFA/ManPages/ChangeLog.txt | 1 | ||||
-rw-r--r-- | Projects/USBtoSerial/USBtoSerial.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt index d2c852548..b776175d6 100644 --- a/LUFA/ManPages/ChangeLog.txt +++ b/LUFA/ManPages/ChangeLog.txt @@ -18,6 +18,7 @@ * - Added a timeout value to the TWI_StartTransmission() function, within which the addressed device must respond
* - Webserver project now uses the board LEDs to indicate the current IP configuration state
* - Added ENABLE_TELNET_SERVER compile time option to the Webserver project to disable the TELNET server if desired
+ * - Increased throughput of the USBtoSerial demo on systems that send multiple bytes per packet (thanks to Opendous Inc.)
*
* <b>Fixed:</b>
* - Fixed software PDI/TPI programming mode in the AVRISP project not correctly toggling just the clock pin
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);
|