mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-17 13:12:08 +00:00
Fixed USART reception overrun corrupting the internal buffers in the USBtoSerial project.
This commit is contained in:
parent
4c06a9c88f
commit
b6899bb987
@ -24,6 +24,7 @@
|
|||||||
* - 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)
|
* - Fixed blocking USART reads causing low throughput on slow baud rates in the USBtoSerial project (thanks to Nevada Smith)
|
||||||
|
* - Fixed USART reception overrun corrupting the internal buffers in the USBtoSerial project (thanks to Nevada Smith)
|
||||||
*
|
*
|
||||||
* \section Sec_ChangeLog140302 Version 140302
|
* \section Sec_ChangeLog140302 Version 140302
|
||||||
* <b>New:</b>
|
* <b>New:</b>
|
||||||
|
@ -194,7 +194,7 @@ ISR(USART1_RX_vect, ISR_BLOCK)
|
|||||||
{
|
{
|
||||||
uint8_t ReceivedByte = UDR1;
|
uint8_t ReceivedByte = UDR1;
|
||||||
|
|
||||||
if (USB_DeviceState == DEVICE_STATE_Configured)
|
if ((USB_DeviceState == DEVICE_STATE_Configured) && !(RingBuffer_IsFull(&USARTtoUSB_Buffer)))
|
||||||
RingBuffer_Insert(&USARTtoUSB_Buffer, ReceivedByte);
|
RingBuffer_Insert(&USARTtoUSB_Buffer, ReceivedByte);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user