Device mode class driver callbacks are now fired before the control request status...
[pub/USBasp.git] / Projects / XPLAINBridge / USARTDescriptors.c
index d8587f2..ca98b33 100644 (file)
@@ -98,7 +98,7 @@ USART_USB_Descriptor_Configuration_t PROGMEM USART_ConfigurationDescriptor =
                        .MaxPowerConsumption    = USB_CONFIG_POWER_MA(100)\r
                },\r
                \r
                        .MaxPowerConsumption    = USB_CONFIG_POWER_MA(100)\r
                },\r
                \r
-       .CCI_Interface = \r
+       .CDC_CCI_Interface = \r
                {\r
                        .Header                 = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
 \r
                {\r
                        .Header                 = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
 \r
@@ -122,14 +122,6 @@ USART_USB_Descriptor_Configuration_t PROGMEM USART_ConfigurationDescriptor =
                        .Data                   = {0x01, 0x10}\r
                },\r
 \r
                        .Data                   = {0x01, 0x10}\r
                },\r
 \r
-       .CDC_Functional_CallManagement = \r
-               {\r
-                       .Header                 = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},\r
-                       .SubType                = 0x01,\r
-                       \r
-                       .Data                   = {0x03, 0x01}\r
-               },\r
-\r
        .CDC_Functional_AbstractControlManagement = \r
                {\r
                        .Header                 = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), .Type = 0x24},\r
        .CDC_Functional_AbstractControlManagement = \r
                {\r
                        .Header                 = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), .Type = 0x24},\r
@@ -146,7 +138,7 @@ USART_USB_Descriptor_Configuration_t PROGMEM USART_ConfigurationDescriptor =
                        .Data                   = {0x00, 0x01}\r
                },\r
 \r
                        .Data                   = {0x00, 0x01}\r
                },\r
 \r
-       .ManagementEndpoint = \r
+       .CDC_ManagementEndpoint = \r
                {\r
                        .Header                 = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
                        \r
                {\r
                        .Header                 = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
                        \r
@@ -156,7 +148,7 @@ USART_USB_Descriptor_Configuration_t PROGMEM USART_ConfigurationDescriptor =
                        .PollingIntervalMS      = 0xFF\r
                },\r
 \r
                        .PollingIntervalMS      = 0xFF\r
                },\r
 \r
-       .DCI_Interface = \r
+       .CDC_DCI_Interface = \r
                {\r
                        .Header                 = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
 \r
                {\r
                        .Header                 = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
 \r
@@ -172,7 +164,7 @@ USART_USB_Descriptor_Configuration_t PROGMEM USART_ConfigurationDescriptor =
                        .InterfaceStrIndex      = NO_DESCRIPTOR\r
                },\r
 \r
                        .InterfaceStrIndex      = NO_DESCRIPTOR\r
                },\r
 \r
-       .DataOutEndpoint = \r
+       .CDC_DataOutEndpoint = \r
                {\r
                        .Header                 = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
                        \r
                {\r
                        .Header                 = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
                        \r
@@ -182,7 +174,7 @@ USART_USB_Descriptor_Configuration_t PROGMEM USART_ConfigurationDescriptor =
                        .PollingIntervalMS      = 0x00\r
                },\r
                \r
                        .PollingIntervalMS      = 0x00\r
                },\r
                \r
-       .DataInEndpoint = \r
+       .CDC_DataInEndpoint = \r
                {\r
                        .Header                 = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
                        \r
                {\r
                        .Header                 = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
                        \r
@@ -226,6 +218,9 @@ USB_Descriptor_String_t PROGMEM USART_ProductString =
        .UnicodeString          = L"LUFA XPLAIN Bridge"\r
 };\r
 \r
        .UnicodeString          = L"LUFA XPLAIN Bridge"\r
 };\r
 \r
+/** Descriptior retrieval function for the USART Bridge descriptors. This function is in turn called by the GetDescriptor\r
+ *  callback function in the main source file, to retrieve the device's descriptors when in USART bridge mode.\r
+ */\r
 uint16_t USART_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)\r
 {\r
        const uint8_t  DescriptorType   = (wValue >> 8);\r
 uint16_t USART_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)\r
 {\r
        const uint8_t  DescriptorType   = (wValue >> 8);\r