X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/f896c00c48f04fb9273555ab8d9b1af99f865d25..2a0c28e6e47c8a173f32fc99cd8666a2633c5c12:/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c?ds=sidebyside diff --git a/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c b/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c index a2ba253d2..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,15 +152,15 @@ 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); } /** Event handler for the CDC Class driver Line Encoding Changed event. * - * \param CDCInterfaceInfo Pointer to the CDC class interface configuration structure being referenced + * \param[in] CDCInterfaceInfo Pointer to the CDC class interface configuration structure being referenced */ -void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* CDCInterfaceInfo) +void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo) { uint8_t ConfigMask = 0;