Minor updates to the Benito programmer - remove redundant PORT register manipulations.
[pub/USBasp.git] / Demos / Device / ClassDriver / USBtoSerial / USBtoSerial.c
index a2ba253..637071a 100644 (file)
@@ -95,7 +95,7 @@ int main(void)
                if (Tx_Buffer.Elements)\r
                  CDC_Device_SendByte(&VirtualSerial_CDC_Interface, Buffer_GetElement(&Tx_Buffer));\r
                \r
-               /* Read bytes from the USART transmit buffer into the USART */\r
+               /* Load bytes from the USART transmit buffer into the USART */\r
                if (Rx_Buffer.Elements)\r
                  Serial_TxByte(Buffer_GetElement(&Rx_Buffer));\r
                \r
@@ -152,15 +152,15 @@ void EVENT_USB_UnhandledControlPacket(void)
  */\r
 ISR(USART1_RX_vect, ISR_BLOCK)\r
 {\r
-       if (USB_IsConnected)\r
+       if (USB_DeviceState == DEVICE_STATE_Configured)\r
          Buffer_StoreElement(&Tx_Buffer, UDR1);\r
 }\r
 \r
 /** Event handler for the CDC Class driver Line Encoding Changed event.\r
  *\r
- *  \param CDCInterfaceInfo  Pointer to the CDC class interface configuration structure being referenced\r
+ *  \param[in] CDCInterfaceInfo  Pointer to the CDC class interface configuration structure being referenced\r
  */\r
-void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* CDCInterfaceInfo)\r
+void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo)\r
 {\r
        uint8_t ConfigMask = 0;\r
 \r