Changed over all deprecated GCC structure tag initializers to the standardized C99...
[pub/lufa.git] / Demos / Device / USBtoSerial / USBtoSerial.c
index 1d238aa..6bd14cc 100644 (file)
@@ -33,8 +33,8 @@
 /* Scheduler Task List */\r
 TASK_LIST\r
 {\r
-       { Task: USB_USBTask          , TaskStatus: TASK_STOP },\r
-       { Task: CDC_Task             , TaskStatus: TASK_STOP },\r
+       { .Task = USB_USBTask          , .TaskStatus = TASK_STOP },\r
+       { .Task = CDC_Task             , .TaskStatus = TASK_STOP },\r
 };\r
 \r
 /* Globals: */\r
@@ -43,10 +43,10 @@ TASK_LIST
  *  These values are set by the host via a class-specific request, and the physical USART should be reconfigured to match the\r
  *  new settings each time they are changed by the host.\r
  */\r
-CDC_Line_Coding_t LineCoding = { BaudRateBPS: 9600,\r
-                                 CharFormat:  OneStopBit,\r
-                                 ParityType:  Parity_None,\r
-                                 DataBits:    8            };\r
+CDC_Line_Coding_t LineCoding = { .BaudRateBPS = 9600,\r
+                                 .CharFormat  = OneStopBit,\r
+                                 .ParityType  = Parity_None,\r
+                                 .DataBits    = 8            };\r
 \r
 /** Ring (circular) buffer to hold the RX data - data from the host to the attached device on the serial port. */\r
 RingBuff_t Rx_Buffer;\r
@@ -224,11 +224,11 @@ TASK(CDC_Task)
 \r
                USB_Notification_Header_t Notification = (USB_Notification_Header_t)\r
                        {\r
-                               NotificationType: (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),\r
-                               Notification:     NOTIF_SerialState,\r
-                               wValue:           0,\r
-                               wIndex:           0,\r
-                               wLength:          sizeof(uint16_t),\r
+                               .NotificationType = (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),\r
+                               .Notification     = NOTIF_SerialState,\r
+                               .wValue           = 0,\r
+                               .wIndex           = 0,\r
+                               .wLength          = sizeof(uint16_t),\r
                        };\r
                        \r
                uint16_t LineStateMask;\r
@@ -244,6 +244,7 @@ TASK(CDC_Task)
                /* Select the Serial Rx Endpoint */\r
                Endpoint_SelectEndpoint(CDC_RX_EPNUM);\r
                \r
+               /* Check to see if a packet has been received from the host */\r
                if (Endpoint_IsOUTReceived())\r
                {\r
                        /* Read the bytes in from the endpoint into the buffer while space is available */\r