X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/f1076ac4d6e56bff7fb6d2126746af1108211370..2a0c28e6e47c8a173f32fc99cd8666a2633c5c12:/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c diff --git a/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c b/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c index ac63f0f9f..637071a7e 100644 --- a/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c +++ b/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c @@ -95,7 +95,7 @@ int main(void) if (Tx_Buffer.Elements) CDC_Device_SendByte(&VirtualSerial_CDC_Interface, Buffer_GetElement(&Tx_Buffer)); - /* Read bytes from the USART transmit buffer into the USART */ + /* Load bytes from the USART transmit buffer into the USART */ if (Rx_Buffer.Elements) Serial_TxByte(Buffer_GetElement(&Rx_Buffer)); @@ -152,7 +152,7 @@ void EVENT_USB_UnhandledControlPacket(void) */ ISR(USART1_RX_vect, ISR_BLOCK) { - if (USB_IsConnected) + if (USB_DeviceState == DEVICE_STATE_Configured) Buffer_StoreElement(&Tx_Buffer, UDR1); }