Skip to content
Snippets Groups Projects
Commit d90ef9aa authored by Dean Camera's avatar Dean Camera
Browse files

Only deque from the USBtoSerial's USB->USART buffer when the USART is idle.

parent 3d818fbb
No related branches found
No related tags found
No related merge requests found
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
* - Fixed missing HID report ID prefix on HID class driver GetReport request responses (thanks to Bert van Hall) * - Fixed missing HID report ID prefix on HID class driver GetReport request responses (thanks to Bert van Hall)
* - Library Applications: * - Library Applications:
* - Fixed spurious 0xFE USART byte sent in the USBtoSerial project when the baud rate is changed (thanks to Carl Kjeldsen) * - Fixed spurious 0xFE USART byte sent in the USBtoSerial project when the baud rate is changed (thanks to Carl Kjeldsen)
* - Fixed blocking USART reads causing low throughput on slow baud rates in the USBtoSerial project (thanks to Nevada Smith)
* *
* \section Sec_ChangeLog140302 Version 140302 * \section Sec_ChangeLog140302 Version 140302
* <b>New:</b> * <b>New:</b>
......
...@@ -133,8 +133,8 @@ int main(void) ...@@ -133,8 +133,8 @@ int main(void)
} }
} }
/* Load the next byte from the USART transmit buffer into the USART */ /* Load the next byte from the USART transmit buffer into the USART if transmit buffer space is available */
if (!(RingBuffer_IsEmpty(&USBtoUSART_Buffer))) if (Serial_IsSendReady() && !(RingBuffer_IsEmpty(&USBtoUSART_Buffer)))
Serial_SendByte(RingBuffer_Remove(&USBtoUSART_Buffer)); Serial_SendByte(RingBuffer_Remove(&USBtoUSART_Buffer));
CDC_Device_USBTask(&VirtualSerial_CDC_Interface); CDC_Device_USBTask(&VirtualSerial_CDC_Interface);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment