diff options
Diffstat (limited to 'Demos/Device/ClassDriver')
-rw-r--r-- | Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c b/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c index 0c83cd8dd..8ef07f1c3 100644 --- a/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c +++ b/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c @@ -147,8 +147,10 @@ void EVENT_USB_Device_UnhandledControlPacket(void) */
ISR(USART1_RX_vect, ISR_BLOCK)
{
+ uint8_t ReceivedByte = UDR1;
+
if (USB_DeviceState == DEVICE_STATE_Configured)
- Buffer_StoreElement(&Tx_Buffer, UDR1);
+ Buffer_StoreElement(&Tx_Buffer, ReceivedByte);
}
/** Event handler for the CDC Class driver Line Encoding Changed event.
|