forked from mirror/qmk_firmware
Fixed USART reception overrun corrupting the internal buffers in the USBtoSerial project.
This commit is contained in:
@@ -194,7 +194,7 @@ ISR(USART1_RX_vect, ISR_BLOCK)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user