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.
This commit is contained in:
Dean Camera 2010-03-22 07:12:25 +00:00
parent 5227ca4ce2
commit 49b09a2042
86 changed files with 416 additions and 408 deletions

View file

@ -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_Descriptor_HID_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
},
.KeyboardOutEndpoint =
.HID1_ReportOUTEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
@ -209,7 +209,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.PollingIntervalMS = 0x0A
},
.MouseInterface =
.HID2_MouseInterface =
{
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
@ -225,7 +225,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.InterfaceStrIndex = NO_DESCRIPTOR
},
.MouseHID =
.HID2_MouseHID =
{
.Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},
@ -236,7 +236,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.HIDReportLength = sizeof(MouseReport)
},
.MouseInEndpoint =
.HID2_ReportINEndpoint =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
@ -325,12 +325,12 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex,
case DTYPE_HID:
if (!(wIndex))
{
Address = (void*)&ConfigurationDescriptor.KeyboardHID;
Address = (void*)&ConfigurationDescriptor.HID1_KeyboardHID;
Size = sizeof(USB_Descriptor_HID_t);
}
else
{
Address = (void*)&ConfigurationDescriptor.MouseHID;
Address = (void*)&ConfigurationDescriptor.HID2_MouseHID;
Size = sizeof(USB_Descriptor_HID_t);
}
break;

View file

@ -69,13 +69,13 @@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
USB_Descriptor_Interface_t KeyboardInterface;
USB_Descriptor_HID_t KeyboardHID;
USB_Descriptor_Endpoint_t KeyboardInEndpoint;
USB_Descriptor_Endpoint_t KeyboardOutEndpoint;
USB_Descriptor_Interface_t MouseInterface;
USB_Descriptor_HID_t MouseHID;
USB_Descriptor_Endpoint_t MouseInEndpoint;
USB_Descriptor_Interface_t HID1_KeyboardInterface;
USB_Descriptor_HID_t HID1_KeyboardHID;
USB_Descriptor_Endpoint_t HID1_ReportINEndpoint;
USB_Descriptor_Endpoint_t HID1_ReportOUTEndpoint;
USB_Descriptor_Interface_t HID2_MouseInterface;
USB_Descriptor_HID_t HID2_MouseHID;
USB_Descriptor_Endpoint_t HID2_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
/* Macros: */