Commit 49b09a20 authored by Dean Camera's avatar Dean Camera
Browse files

Standardized the naming scheme given to configuration descriptor sub-elements...

Standardized the naming scheme given to configuration descriptor sub-elements in the Device mode demos, bootloaders and projects.

Fix errors in the MouseHostWithParser demo from incorrect use of the HID_ALIGN_DATA() macro.
parent 5227ca4c
......@@ -86,7 +86,7 @@ USB_Descriptor_Configuration_t ConfigurationDescriptor =
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
.CCI_Interface =
.CDC_CCI_Interface =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
......@@ -134,7 +134,7 @@ USB_Descriptor_Configuration_t ConfigurationDescriptor =
.Data = {0x00, 0x01}
},
.ManagementEndpoint =
.CDC_ManagementEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
......@@ -144,7 +144,7 @@ USB_Descriptor_Configuration_t ConfigurationDescriptor =
.PollingIntervalMS = 0x02
},
.DCI_Interface =
.CDC_DCI_Interface =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
......@@ -160,7 +160,7 @@ USB_Descriptor_Configuration_t ConfigurationDescriptor =
.InterfaceStrIndex = NO_DESCRIPTOR
},
.DataOutEndpoint =
.CDC_DataOutEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
......@@ -170,7 +170,7 @@ USB_Descriptor_Configuration_t ConfigurationDescriptor =
.PollingIntervalMS = 0x00
},
.DataInEndpoint =
.CDC_DataInEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
......
......@@ -129,15 +129,15 @@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
USB_Descriptor_Interface_t CCI_Interface;
USB_Descriptor_Interface_t CDC_CCI_Interface;
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_IntHeader;
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_CallManagement;
CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement;
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union;
USB_Descriptor_Endpoint_t ManagementEndpoint;
USB_Descriptor_Interface_t DCI_Interface;
USB_Descriptor_Endpoint_t DataOutEndpoint;
USB_Descriptor_Endpoint_t DataInEndpoint;
USB_Descriptor_Endpoint_t CDC_ManagementEndpoint;
USB_Descriptor_Interface_t CDC_DCI_Interface;
USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
} USB_Descriptor_Configuration_t;
/* Function Prototypes: */
......
......@@ -86,7 +86,7 @@ USB_Descriptor_Configuration_t ConfigurationDescriptor =
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
.DFUInterface =
.DFU_Interface =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
......@@ -102,7 +102,7 @@ USB_Descriptor_Configuration_t ConfigurationDescriptor =
.InterfaceStrIndex = NO_DESCRIPTOR
},
.DFUFunctional =
.DFU_Functional =
{
.Header = {.Size = sizeof(USB_DFU_Functional_Descriptor_t), .Type = DTYPE_DFUFunctional},
......
......@@ -161,8 +161,8 @@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
USB_Descriptor_Interface_t DFUInterface;
USB_DFU_Functional_Descriptor_t DFUFunctional;
USB_Descriptor_Interface_t DFU_Interface;
USB_DFU_Functional_Descriptor_t DFU_Functional;
} USB_Descriptor_Configuration_t;
/* Function Prototypes: */
......
......@@ -106,7 +106,7 @@ USB_Descriptor_Configuration_t ConfigurationDescriptor =
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
.Interface =
.HID_Interface =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
......@@ -122,7 +122,7 @@ USB_Descriptor_Configuration_t ConfigurationDescriptor =
.InterfaceStrIndex = NO_DESCRIPTOR
},
.HIDDescriptor =
.HID_VendorHID =
{
.Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},
......@@ -133,7 +133,7 @@ USB_Descriptor_Configuration_t ConfigurationDescriptor =
.HIDReportLength = sizeof(HIDReport)
},
.HIDEndpoint =
.HID_ReportINEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
......@@ -168,7 +168,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex,
Size = sizeof(USB_Descriptor_Configuration_t);
break;
case DTYPE_HID:
Address = (void*)&ConfigurationDescriptor.HIDDescriptor;
Address = (void*)&ConfigurationDescriptor.HID_VendorHID;
Size = sizeof(USB_Descriptor_HID_t);
break;
case DTYPE_Report:
......
......@@ -66,9 +66,9 @@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
USB_Descriptor_Interface_t Interface;
USB_Descriptor_HID_t HIDDescriptor;
USB_Descriptor_Endpoint_t HIDEndpoint;
USB_Descriptor_Interface_t HID_Interface;
USB_Descriptor_HID_t HID_VendorHID;
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
/* Macros: */
......
......@@ -86,7 +86,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
.AudioControlInterface =
.Audio_ControlInterface =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
......@@ -102,7 +102,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.InterfaceStrIndex = NO_DESCRIPTOR
},
.AudioControlInterface_SPC =
.Audio_ControlInterface_SPC =
{
.Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_AudioInterface},
.Subtype = DSUBTYPE_Header,
......@@ -116,7 +116,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.InterfaceNumbers = {1},
},
.InputTerminal =
.Audio_InputTerminal =
{
.Header = {.Size = sizeof(USB_Audio_InputTerminal_t), .Type = DTYPE_AudioInterface},
.Subtype = DSUBTYPE_InputTerminal,
......@@ -132,7 +132,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TerminalStrIndex = NO_DESCRIPTOR
},
.OutputTerminal =
.Audio_OutputTerminal =
{
.Header = {.Size = sizeof(USB_Audio_OutputTerminal_t), .Type = DTYPE_AudioInterface},
.Subtype = DSUBTYPE_OutputTerminal,
......@@ -146,7 +146,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TerminalStrIndex = NO_DESCRIPTOR
},
.AudioStreamInterface_Alt0 =
.Audio_StreamInterface_Alt0 =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
......@@ -162,7 +162,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.InterfaceStrIndex = NO_DESCRIPTOR
},
.AudioStreamInterface_Alt1 =
.Audio_StreamInterface_Alt1 =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
......@@ -178,7 +178,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.InterfaceStrIndex = NO_DESCRIPTOR
},
.AudioStreamInterface_SPC =
.Audio_StreamInterface_SPC =
{
.Header = {.Size = sizeof(USB_Audio_Interface_AS_t), .Type = DTYPE_AudioInterface},
.Subtype = DSUBTYPE_General,
......@@ -189,7 +189,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.AudioFormat = 0x0001
},
.AudioFormat =
.Audio_AudioFormat =
{
.Header = {.Size = sizeof(USB_Audio_Format_t), .Type = DTYPE_AudioInterface},
.Subtype = DSUBTYPE_Format,
......@@ -204,7 +204,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.SampleFrequencies = {AUDIO_SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY)}
},
.AudioEndpoint =
.Audio_StreamEndpoint =
{
.Endpoint =
{
......@@ -220,7 +220,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.SyncEndpointNumber = 0
},
.AudioEndpoint_SPC =
.Audio_StreamEndpoint_SPC =
{
.Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint},
.Subtype = DSUBTYPE_General,
......
......@@ -63,16 +63,16 @@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
USB_Descriptor_Interface_t AudioControlInterface;
USB_Audio_Interface_AC_t AudioControlInterface_SPC;
USB_Audio_InputTerminal_t InputTerminal;
USB_Audio_OutputTerminal_t OutputTerminal;
USB_Descriptor_Interface_t AudioStreamInterface_Alt0;
USB_Descriptor_Interface_t AudioStreamInterface_Alt1;
USB_Audio_Interface_AS_t AudioStreamInterface_SPC;
USB_Audio_Format_t AudioFormat;
USB_Audio_StreamEndpoint_Std_t AudioEndpoint;
USB_Audio_StreamEndpoint_Spc_t AudioEndpoint_SPC;
USB_Descriptor_Interface_t Audio_ControlInterface;
USB_Audio_Interface_AC_t Audio_ControlInterface_SPC;
USB_Audio_InputTerminal_t Audio_InputTerminal;
USB_Audio_OutputTerminal_t Audio_OutputTerminal;
USB_Descriptor_Interface_t Audio_StreamInterface_Alt0;
USB_Descriptor_Interface_t Audio_StreamInterface_Alt1;
USB_Audio_Interface_AS_t Audio_StreamInterface_SPC;
USB_Audio_Format_t Audio_AudioFormat;
USB_Audio_StreamEndpoint_Std_t Audio_StreamEndpoint;
USB_Audio_StreamEndpoint_Spc_t Audio_StreamEndpoint_SPC;
} USB_Descriptor_Configuration_t;
/* Function Prototypes: */
......
......@@ -86,7 +86,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
.AudioControlInterface =
.Audio_ControlInterface =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
......@@ -102,7 +102,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.InterfaceStrIndex = NO_DESCRIPTOR
},
.AudioControlInterface_SPC =
.Audio_ControlInterface_SPC =
{
.Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_AudioInterface},
.Subtype = DSUBTYPE_Header,
......@@ -116,7 +116,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.InterfaceNumbers = {1},
},
.InputTerminal =
.Audio_InputTerminal =
{
.Header = {.Size = sizeof(USB_Audio_InputTerminal_t), .Type = DTYPE_AudioInterface},
.Subtype = DSUBTYPE_InputTerminal,
......@@ -132,7 +132,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TerminalStrIndex = NO_DESCRIPTOR
},
.OutputTerminal =
.Audio_OutputTerminal =
{
.Header = {.Size = sizeof(USB_Audio_OutputTerminal_t), .Type = DTYPE_AudioInterface},
.Subtype = DSUBTYPE_OutputTerminal,
......@@ -146,7 +146,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TerminalStrIndex = NO_DESCRIPTOR
},
.AudioStreamInterface_Alt0 =
.Audio_StreamInterface_Alt0 =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
......@@ -162,7 +162,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.InterfaceStrIndex = NO_DESCRIPTOR
},
.AudioStreamInterface_Alt1 =
.Audio_StreamInterface_Alt1 =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
......@@ -178,7 +178,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.InterfaceStrIndex = NO_DESCRIPTOR
},
.AudioStreamInterface_SPC =
.Audio_StreamInterface_SPC =
{
.Header = {.Size = sizeof(USB_Audio_Interface_AS_t), .Type = DTYPE_AudioInterface},
.Subtype = DSUBTYPE_General,
......@@ -189,7 +189,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.AudioFormat = 0x0001
},
.AudioFormat =
.Audio_AudioFormat =
{
.Header = {.Size = sizeof(USB_Audio_Format_t), .Type = DTYPE_AudioInterface},
.Subtype = DSUBTYPE_Format,
......@@ -204,7 +204,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.SampleFrequencies = {AUDIO_SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY)}
},
.AudioEndpoint =
.Audio_StreamEndpoint =
{
.Endpoint =
{
......@@ -220,7 +220,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.SyncEndpointNumber = 0
},
.AudioEndpoint_SPC =
.Audio_StreamEndpoint_SPC =
{
.Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint},
.Subtype = DSUBTYPE_General,
......
......@@ -63,16 +63,16 @@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
USB_Descriptor_Interface_t AudioControlInterface;
USB_Audio_Interface_AC_t AudioControlInterface_SPC;
USB_Audio_InputTerminal_t InputTerminal;
USB_Audio_OutputTerminal_t OutputTerminal;
USB_Descriptor_Interface_t AudioStreamInterface_Alt0;
USB_Descriptor_Interface_t AudioStreamInterface_Alt1;
USB_Audio_Interface_AS_t AudioStreamInterface_SPC;
USB_Audio_Format_t AudioFormat;
USB_Audio_StreamEndpoint_Std_t AudioEndpoint;
USB_Audio_StreamEndpoint_Spc_t AudioEndpoint_SPC;
USB_Descriptor_Interface_t Audio_ControlInterface;
USB_Audio_Interface_AC_t Audio_ControlInterface_SPC;
USB_Audio_InputTerminal_t Audio_InputTerminal;
USB_Audio_OutputTerminal_t Audio_OutputTerminal;
USB_Descriptor_Interface_t Audio_StreamInterface_Alt0;
USB_Descriptor_Interface_t Audio_StreamInterface_Alt1;
USB_Audio_Interface_AS_t Audio_StreamInterface_SPC;
USB_Audio_Format_t Audio_AudioFormat;
USB_Audio_StreamEndpoint_Std_t Audio_StreamEndpoint;
USB_Audio_StreamEndpoint_Spc_t Audio_StreamEndpoint_SPC;
} USB_Descriptor_Configuration_t;
/* Function Prototypes: */
......
......@@ -98,7 +98,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
.IAD1 =
.CDC1_IAD =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_Association_t), .Type = DTYPE_InterfaceAssociation},
......@@ -206,7 +206,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.PollingIntervalMS = 0x00
},
.IAD2 =
.CDC2_IAD =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_Association_t), .Type = DTYPE_InterfaceAssociation},
......
......@@ -75,7 +75,7 @@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
USB_Descriptor_Interface_Association_t IAD1;
USB_Descriptor_Interface_Association_t CDC1_IAD;
USB_Descriptor_Interface_t CDC1_CCI_Interface;
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC1_Functional_IntHeader;
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC1_Functional_CallManagement;
......@@ -85,7 +85,7 @@
USB_Descriptor_Interface_t CDC1_DCI_Interface;
USB_Descriptor_Endpoint_t CDC1_DataOutEndpoint;
USB_Descriptor_Endpoint_t CDC1_DataInEndpoint;
USB_Descriptor_Interface_Association_t IAD2;
USB_Descriptor_Interface_Association_t CDC2_IAD;
USB_Descriptor_Interface_t CDC2_CCI_Interface;
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC2_Functional_IntHeader;
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC2_Functional_CallManagement;
......
......@@ -112,7 +112,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
.Interface =
.HID_Interface =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
......@@ -128,7 +128,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.InterfaceStrIndex = NO_DESCRIPTOR
},
.GenericHID =
.HID_GenericHID =
{
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
......@@ -139,7 +139,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.HIDReportLength = sizeof(GenericReport)
},
.GenericINEndpoint =
.HID_ReportINEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
......@@ -226,7 +226,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex,
break;
case DTYPE_HID:
Address = (void*)&ConfigurationDescriptor.GenericHID;
Address = (void*)&ConfigurationDescriptor.HID_GenericHID;
Size = sizeof(USB_HID_Descriptor_t);
break;
case DTYPE_Report:
......
......@@ -50,9 +50,9 @@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
USB_Descriptor_Interface_t Interface;
USB_HID_Descriptor_t GenericHID;
USB_Descriptor_Endpoint_t GenericINEndpoint;
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_t HID_GenericHID;
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
/* Macros: */
......
......@@ -122,7 +122,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
.Interface =
.HID_Interface =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
......@@ -138,7 +138,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.InterfaceStrIndex = NO_DESCRIPTOR
},
.JoystickHID =
.HID_JoystickHID =
{
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
......@@ -149,7 +149,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.HIDReportLength = sizeof(JoystickReport)
},
.JoystickEndpoint =
.HID_ReportINEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
......@@ -236,7 +236,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex,
break;
case DTYPE_HID:
Address = (void*)&ConfigurationDescriptor.JoystickHID;
Address = (void*)&ConfigurationDescriptor.HID_JoystickHID;
Size = sizeof(USB_HID_Descriptor_t);
break;
case DTYPE_Report:
......
......@@ -50,9 +50,9 @@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
USB_Descriptor_Interface_t Interface;
USB_HID_Descriptor_t JoystickHID;
USB_Descriptor_Endpoint_t JoystickEndpoint;
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_t HID_JoystickHID;
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
/* Macros: */
......
......@@ -129,7 +129,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
.Interface =
.HID_Interface =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
......@@ -145,7 +145,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.InterfaceStrIndex = NO_DESCRIPTOR
},
.KeyboardHID =
.HID_KeyboardHID =
{
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
......@@ -156,7 +156,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.HIDReportLength = sizeof(KeyboardReport)
},
.KeyboardEndpoint =
.HID_ReportINEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
......@@ -243,7 +243,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex,
break;
case DTYPE_HID:
Address = (void*)&ConfigurationDescriptor.KeyboardHID;
Address = (void*)&ConfigurationDescriptor.HID_KeyboardHID;
Size = sizeof(USB_HID_Descriptor_t);
break;
case DTYPE_Report:
......
......@@ -51,9 +51,9 @@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
USB_Descriptor_Interface_t Interface;
USB_HID_Descriptor_t KeyboardHID;
USB_Descriptor_Endpoint_t KeyboardEndpoint;
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_t HID_KeyboardHID;
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
/* Macros: */
......
......@@ -162,7 +162,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
.KeyboardInterface =
.HID1_KeyboardInterface =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
......@@ -178,7 +178,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.InterfaceStrIndex = NO_DESCRIPTOR
},
.KeyboardHID =
.HID1_KeyboardHID =
{
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
......@@ -189,7 +189,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.HIDReportLength = sizeof(KeyboardReport)
},
.KeyboardInEndpoint =
.HID1_ReportINEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
......@@ -199,7 +199,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.PollingIntervalMS = 0x0A
},
.MouseInterface =
.HID2_MouseInterface =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
......@@ -215,7 +215,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.InterfaceStrIndex = NO_DESCRIPTOR
},
.MouseHID =
.HID2_MouseHID =
{
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
......@@ -226,7 +226,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.HIDReportLength = sizeof(MouseReport)
},
.MouseInEndpoint =
.HID2_ReportINEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
......@@ -315,12 +315,12 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex,
case DTYPE_HID:
if (!(wIndex))