Commit c166dfc6 authored by Dean Camera's avatar Dean Camera

Added class specific descriptor type defines with standard USB-IF element naming.

parent 66f14d44
......@@ -104,13 +104,13 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Audio_ControlInterface_SPC =
{
.Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_AudioInterface},
.Header = {.Size = sizeof(USB_Audio_Descriptor_Interface_AC_t), .Type = DTYPE_AudioInterface},
.Subtype = DSUBTYPE_Header,
.ACSpecification = VERSION_BCD(01.00),
.TotalLength = (sizeof(USB_Audio_Interface_AC_t) +
sizeof(USB_Audio_InputTerminal_t) +
sizeof(USB_Audio_OutputTerminal_t)),
.TotalLength = (sizeof(USB_Audio_Descriptor_Interface_AC_t) +
sizeof(USB_Audio_Descriptor_InputTerminal_t) +
sizeof(USB_Audio_Descriptor_OutputTerminal_t)),
.InCollection = 1,
.InterfaceNumbers = {1},
......@@ -118,7 +118,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Audio_InputTerminal =
{
.Header = {.Size = sizeof(USB_Audio_InputTerminal_t), .Type = DTYPE_AudioInterface},
.Header = {.Size = sizeof(USB_Audio_Descriptor_InputTerminal_t), .Type = DTYPE_AudioInterface},
.Subtype = DSUBTYPE_InputTerminal,
.TerminalID = 0x01,
......@@ -134,7 +134,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Audio_OutputTerminal =
{
.Header = {.Size = sizeof(USB_Audio_OutputTerminal_t), .Type = DTYPE_AudioInterface},
.Header = {.Size = sizeof(USB_Audio_Descriptor_OutputTerminal_t), .Type = DTYPE_AudioInterface},
.Subtype = DSUBTYPE_OutputTerminal,
.TerminalID = 0x02,
......@@ -180,7 +180,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Audio_StreamInterface_SPC =
{
.Header = {.Size = sizeof(USB_Audio_Interface_AS_t), .Type = DTYPE_AudioInterface},
.Header = {.Size = sizeof(USB_Audio_Descriptor_Interface_AS_t), .Type = DTYPE_AudioInterface},
.Subtype = DSUBTYPE_General,
.TerminalLink = 0x02,
......@@ -191,7 +191,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Audio_AudioFormat =
{
.Header = {.Size = sizeof(USB_Audio_Format_t), .Type = DTYPE_AudioInterface},
.Header = {.Size = sizeof(USB_Audio_Descriptor_Format_t), .Type = DTYPE_AudioInterface},
.Subtype = DSUBTYPE_Format,
.FormatType = 0x01,
......@@ -208,7 +208,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Endpoint =
{
.Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
.Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
.EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | AUDIO_STREAM_EPNUM),
.Attributes = (EP_TYPE_ISOCHRONOUS | ENDPOINT_ATTR_SYNC | ENDPOINT_USAGE_DATA),
......@@ -222,7 +222,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Audio_StreamEndpoint_SPC =
{
.Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint},
.Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint},
.Subtype = DSUBTYPE_General,
.Attributes = 0x00,
......
......@@ -62,17 +62,17 @@
*/
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
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_Header_t Config;
USB_Descriptor_Interface_t Audio_ControlInterface;
USB_Audio_Descriptor_Interface_AC_t Audio_ControlInterface_SPC;
USB_Audio_Descriptor_InputTerminal_t Audio_InputTerminal;
USB_Audio_Descriptor_OutputTerminal_t Audio_OutputTerminal;
USB_Descriptor_Interface_t Audio_StreamInterface_Alt0;
USB_Descriptor_Interface_t Audio_StreamInterface_Alt1;
USB_Audio_Descriptor_Interface_AS_t Audio_StreamInterface_SPC;
USB_Audio_Descriptor_Format_t Audio_AudioFormat;
USB_Audio_Descriptor_StreamEndpoint_Std_t Audio_StreamEndpoint;
USB_Audio_Descriptor_StreamEndpoint_Spc_t Audio_StreamEndpoint_SPC;
} USB_Descriptor_Configuration_t;
/* Function Prototypes: */
......
......@@ -104,13 +104,13 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Audio_ControlInterface_SPC =
{
.Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_AudioInterface},
.Header = {.Size = sizeof(USB_Audio_Descriptor_Interface_AC_t), .Type = DTYPE_AudioInterface},
.Subtype = DSUBTYPE_Header,
.ACSpecification = VERSION_BCD(01.00),
.TotalLength = (sizeof(USB_Audio_Interface_AC_t) +
sizeof(USB_Audio_InputTerminal_t) +
sizeof(USB_Audio_OutputTerminal_t)),
.TotalLength = (sizeof(USB_Audio_Descriptor_Interface_AC_t) +
sizeof(USB_Audio_Descriptor_InputTerminal_t) +
sizeof(USB_Audio_Descriptor_OutputTerminal_t)),
.InCollection = 1,
.InterfaceNumbers = {1},
......@@ -118,7 +118,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Audio_InputTerminal =
{
.Header = {.Size = sizeof(USB_Audio_InputTerminal_t), .Type = DTYPE_AudioInterface},
.Header = {.Size = sizeof(USB_Audio_Descriptor_InputTerminal_t), .Type = DTYPE_AudioInterface},
.Subtype = DSUBTYPE_InputTerminal,
.TerminalID = 0x01,
......@@ -134,7 +134,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Audio_OutputTerminal =
{
.Header = {.Size = sizeof(USB_Audio_OutputTerminal_t), .Type = DTYPE_AudioInterface},
.Header = {.Size = sizeof(USB_Audio_Descriptor_OutputTerminal_t), .Type = DTYPE_AudioInterface},
.Subtype = DSUBTYPE_OutputTerminal,
.TerminalID = 0x02,
......@@ -180,7 +180,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Audio_StreamInterface_SPC =
{
.Header = {.Size = sizeof(USB_Audio_Interface_AS_t), .Type = DTYPE_AudioInterface},
.Header = {.Size = sizeof(USB_Audio_Descriptor_Interface_AS_t), .Type = DTYPE_AudioInterface},
.Subtype = DSUBTYPE_General,
.TerminalLink = 0x01,
......@@ -191,7 +191,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Audio_AudioFormat =
{
.Header = {.Size = sizeof(USB_Audio_Format_t), .Type = DTYPE_AudioInterface},
.Header = {.Size = sizeof(USB_Audio_Descriptor_Format_t), .Type = DTYPE_AudioInterface},
.Subtype = DSUBTYPE_Format,
.FormatType = 0x01,
......@@ -208,7 +208,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Endpoint =
{
.Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
.Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
.EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | AUDIO_STREAM_EPNUM),
.Attributes = (EP_TYPE_ISOCHRONOUS | ENDPOINT_ATTR_SYNC | ENDPOINT_USAGE_DATA),
......@@ -222,7 +222,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Audio_StreamEndpoint_SPC =
{
.Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint},
.Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint},
.Subtype = DSUBTYPE_General,
.Attributes = EP_ACCEPTS_SMALL_PACKETS,
......
......@@ -62,17 +62,17 @@
*/
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
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_Header_t Config;
USB_Descriptor_Interface_t Audio_ControlInterface;
USB_Audio_Descriptor_Interface_AC_t Audio_ControlInterface_SPC;
USB_Audio_Descriptor_InputTerminal_t Audio_InputTerminal;
USB_Audio_Descriptor_OutputTerminal_t Audio_OutputTerminal;
USB_Descriptor_Interface_t Audio_StreamInterface_Alt0;
USB_Descriptor_Interface_t Audio_StreamInterface_Alt1;
USB_Audio_Descriptor_Interface_AS_t Audio_StreamInterface_SPC;
USB_Audio_Descriptor_Format_t Audio_AudioFormat;
USB_Audio_Descriptor_StreamEndpoint_Std_t Audio_StreamEndpoint;
USB_Audio_Descriptor_StreamEndpoint_Spc_t Audio_StreamEndpoint_SPC;
} USB_Descriptor_Configuration_t;
/* Function Prototypes: */
......
......@@ -130,7 +130,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.HID_GenericHID =
{
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
.Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = DTYPE_HID},
.HIDSpec = VERSION_BCD(01.11),
.CountryCode = 0x00,
......@@ -229,7 +229,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
break;
case DTYPE_HID:
Address = &ConfigurationDescriptor.HID_GenericHID;
Size = sizeof(USB_HID_Descriptor_t);
Size = sizeof(USB_HID_Descriptor_HID_t);
break;
case DTYPE_Report:
Address = &GenericReport;
......
......@@ -51,7 +51,7 @@
{
USB_Descriptor_Configuration_Header_t Config;
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_t HID_GenericHID;
USB_HID_Descriptor_HID_t HID_GenericHID;
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
......
......@@ -140,7 +140,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.HID_JoystickHID =
{
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
.Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = DTYPE_HID},
.HIDSpec = VERSION_BCD(01.11),
.CountryCode = 0x00,
......@@ -239,7 +239,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
break;
case DTYPE_HID:
Address = &ConfigurationDescriptor.HID_JoystickHID;
Size = sizeof(USB_HID_Descriptor_t);
Size = sizeof(USB_HID_Descriptor_HID_t);
break;
case DTYPE_Report:
Address = &JoystickReport;
......
......@@ -51,7 +51,7 @@
{
USB_Descriptor_Configuration_Header_t Config;
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_t HID_JoystickHID;
USB_HID_Descriptor_HID_t HID_JoystickHID;
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
......
......@@ -146,7 +146,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.HID_KeyboardHID =
{
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
.Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = DTYPE_HID},
.HIDSpec = VERSION_BCD(01.11),
.CountryCode = 0x00,
......@@ -245,7 +245,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
break;
case DTYPE_HID:
Address = &ConfigurationDescriptor.HID_KeyboardHID;
Size = sizeof(USB_HID_Descriptor_t);
Size = sizeof(USB_HID_Descriptor_HID_t);
break;
case DTYPE_Report:
Address = &KeyboardReport;
......
......@@ -51,7 +51,7 @@
{
USB_Descriptor_Configuration_Header_t Config;
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_t HID_KeyboardHID;
USB_HID_Descriptor_HID_t HID_KeyboardHID;
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
......
......@@ -179,7 +179,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.HID1_KeyboardHID =
{
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
.Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = DTYPE_HID},
.HIDSpec = VERSION_BCD(01.11),
.CountryCode = 0x00,
......@@ -216,7 +216,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.HID2_MouseHID =
{
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
.Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = DTYPE_HID},
.HIDSpec = VERSION_BCD(01.11),
.CountryCode = 0x00,
......@@ -317,12 +317,12 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
if (!(wIndex))
{
Address = &ConfigurationDescriptor.HID1_KeyboardHID;
Size = sizeof(USB_HID_Descriptor_t);
Size = sizeof(USB_HID_Descriptor_HID_t);
}
else
{
Address = &ConfigurationDescriptor.HID2_MouseHID;
Size = sizeof(USB_HID_Descriptor_t);
Size = sizeof(USB_HID_Descriptor_HID_t);
}
break;
case DTYPE_Report:
......
......@@ -51,10 +51,10 @@
{
USB_Descriptor_Configuration_Header_t Config;
USB_Descriptor_Interface_t HID1_KeyboardInterface;
USB_HID_Descriptor_t HID1_KeyboardHID;
USB_HID_Descriptor_HID_t HID1_KeyboardHID;
USB_Descriptor_Endpoint_t HID1_ReportINEndpoint;
USB_Descriptor_Interface_t HID2_MouseInterface;
USB_HID_Descriptor_t HID2_MouseHID;
USB_HID_Descriptor_HID_t HID2_MouseHID;
USB_Descriptor_Endpoint_t HID2_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
......
......@@ -104,11 +104,11 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Audio_ControlInterface_SPC =
{
.Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_AudioInterface},
.Header = {.Size = sizeof(USB_Audio_Descriptor_Interface_AC_t), .Type = DTYPE_AudioInterface},
.Subtype = DSUBTYPE_Header,
.ACSpecification = VERSION_BCD(01.00),
.TotalLength = sizeof(USB_Audio_Interface_AC_t),
.TotalLength = sizeof(USB_Audio_Descriptor_Interface_AC_t),
.InCollection = 1,
.InterfaceNumbers = {1},
......@@ -132,7 +132,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Audio_StreamInterface_SPC =
{
.Header = {.Size = sizeof(USB_MIDI_AudioInterface_AS_t), .Type = DTYPE_AudioInterface},
.Header = {.Size = sizeof(USB_MIDI_Descriptor_AudioInterface_AS_t), .Type = DTYPE_AudioInterface},
.Subtype = DSUBTYPE_General,
.AudioSpecification = VERSION_BCD(01.00),
......@@ -143,7 +143,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.MIDI_In_Jack_Emb =
{
.Header = {.Size = sizeof(USB_MIDI_In_Jack_t), .Type = DTYPE_AudioInterface},
.Header = {.Size = sizeof(USB_MIDI_Descriptor_InputJack_t), .Type = DTYPE_AudioInterface},
.Subtype = DSUBTYPE_InputJack,
.JackType = MIDI_JACKTYPE_EMBEDDED,
......@@ -154,7 +154,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.MIDI_In_Jack_Ext =
{
.Header = {.Size = sizeof(USB_MIDI_In_Jack_t), .Type = DTYPE_AudioInterface},
.Header = {.Size = sizeof(USB_MIDI_Descriptor_InputJack_t), .Type = DTYPE_AudioInterface},
.Subtype = DSUBTYPE_InputJack,
.JackType = MIDI_JACKTYPE_EXTERNAL,
......@@ -165,7 +165,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.MIDI_Out_Jack_Emb =
{
.Header = {.Size = sizeof(USB_MIDI_Out_Jack_t), .Type = DTYPE_AudioInterface},
.Header = {.Size = sizeof(USB_MIDI_Descriptor_OutputJack_t), .Type = DTYPE_AudioInterface},
.Subtype = DSUBTYPE_OutputJack,
.JackType = MIDI_JACKTYPE_EMBEDDED,
......@@ -180,7 +180,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.MIDI_Out_Jack_Ext =
{
.Header = {.Size = sizeof(USB_MIDI_Out_Jack_t), .Type = DTYPE_AudioInterface},
.Header = {.Size = sizeof(USB_MIDI_Descriptor_OutputJack_t), .Type = DTYPE_AudioInterface},
.Subtype = DSUBTYPE_OutputJack,
.JackType = MIDI_JACKTYPE_EXTERNAL,
......@@ -197,7 +197,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Endpoint =
{
.Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
.Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
.EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | MIDI_STREAM_OUT_EPNUM),
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
......@@ -211,7 +211,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.MIDI_In_Jack_Endpoint_SPC =
{
.Header = {.Size = sizeof(USB_MIDI_Jack_Endpoint_t), .Type = DTYPE_AudioEndpoint},
.Header = {.Size = sizeof(USB_MIDI_Descriptor_Jack_Endpoint_t), .Type = DTYPE_AudioEndpoint},
.Subtype = DSUBTYPE_General,
.TotalEmbeddedJacks = 0x01,
......@@ -222,7 +222,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Endpoint =
{
.Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
.Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
.EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | MIDI_STREAM_IN_EPNUM),
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
......@@ -236,7 +236,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.MIDI_Out_Jack_Endpoint_SPC =
{
.Header = {.Size = sizeof(USB_MIDI_Jack_Endpoint_t), .Type = DTYPE_AudioEndpoint},
.Header = {.Size = sizeof(USB_MIDI_Descriptor_Jack_Endpoint_t), .Type = DTYPE_AudioEndpoint},
.Subtype = DSUBTYPE_General,
.TotalEmbeddedJacks = 0x01,
......
......@@ -59,19 +59,19 @@
*/
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
USB_Descriptor_Interface_t Audio_ControlInterface;
USB_Audio_Interface_AC_t Audio_ControlInterface_SPC;
USB_Descriptor_Interface_t Audio_StreamInterface;
USB_MIDI_AudioInterface_AS_t Audio_StreamInterface_SPC;
USB_MIDI_In_Jack_t MIDI_In_Jack_Emb;
USB_MIDI_In_Jack_t MIDI_In_Jack_Ext;
USB_MIDI_Out_Jack_t MIDI_Out_Jack_Emb;
USB_MIDI_Out_Jack_t MIDI_Out_Jack_Ext;
USB_Audio_StreamEndpoint_Std_t MIDI_In_Jack_Endpoint;
USB_MIDI_Jack_Endpoint_t MIDI_In_Jack_Endpoint_SPC;
USB_Audio_StreamEndpoint_Std_t MIDI_Out_Jack_Endpoint;
USB_MIDI_Jack_Endpoint_t MIDI_Out_Jack_Endpoint_SPC;
USB_Descriptor_Configuration_Header_t Config;
USB_Descriptor_Interface_t Audio_ControlInterface;
USB_Audio_Descriptor_Interface_AC_t Audio_ControlInterface_SPC;
USB_Descriptor_Interface_t Audio_StreamInterface;
USB_MIDI_Descriptor_AudioInterface_AS_t Audio_StreamInterface_SPC;
USB_MIDI_Descriptor_InputJack_t MIDI_In_Jack_Emb;
USB_MIDI_Descriptor_InputJack_t MIDI_In_Jack_Ext;
USB_MIDI_Descriptor_OutputJack_t MIDI_Out_Jack_Emb;
USB_MIDI_Descriptor_OutputJack_t MIDI_Out_Jack_Ext;
USB_Audio_Descriptor_StreamEndpoint_Std_t MIDI_In_Jack_Endpoint;
USB_MIDI_Descriptor_Jack_Endpoint_t MIDI_In_Jack_Endpoint_SPC;
USB_Audio_Descriptor_StreamEndpoint_Std_t MIDI_Out_Jack_Endpoint;
USB_MIDI_Descriptor_Jack_Endpoint_t MIDI_Out_Jack_Endpoint_SPC;
} USB_Descriptor_Configuration_t;
/* Function Prototypes: */
......
......@@ -195,7 +195,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.HID_KeyboardHID =
{
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
.Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = DTYPE_HID},
.HIDSpec = VERSION_BCD(01.11),
.CountryCode = 0x00,
......@@ -294,7 +294,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
break;
case DTYPE_HID:
Address = &ConfigurationDescriptor.HID_KeyboardHID;
Size = sizeof(USB_HID_Descriptor_t);
Size = sizeof(USB_HID_Descriptor_HID_t);
break;
case DTYPE_Report:
Address = &KeyboardReport;
......
......@@ -72,7 +72,7 @@
USB_Descriptor_Endpoint_t MS_DataInEndpoint;
USB_Descriptor_Endpoint_t MS_DataOutEndpoint;
USB_Descriptor_Interface_t HID_KeyboardInterface;
USB_HID_Descriptor_t HID_KeyboardHID;
USB_HID_Descriptor_HID_t HID_KeyboardHID;
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
......
......@@ -140,7 +140,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.HID_MouseHID =
{
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
.Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = DTYPE_HID},
.HIDSpec = VERSION_BCD(01.11),
.CountryCode = 0x00,
......@@ -239,7 +239,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
break;
case DTYPE_HID:
Address = &ConfigurationDescriptor.HID_MouseHID;
Size = sizeof(USB_HID_Descriptor_t);
Size = sizeof(USB_HID_Descriptor_HID_t);
break;
case DTYPE_Report:
Address = &MouseReport;
......
......@@ -51,7 +51,7 @@
{
USB_Descriptor_Configuration_Header_t Config;
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_t HID_MouseHID;
USB_HID_Descriptor_HID_t HID_MouseHID;
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
......
......@@ -252,7 +252,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.HID_MouseHID =
{
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
.Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = DTYPE_HID},
.HIDSpec = VERSION_BCD(01.11),
.CountryCode = 0x00,
......@@ -351,7 +351,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
break;
case DTYPE_HID:
Address = &ConfigurationDescriptor.HID_MouseHID;
Size = sizeof(USB_HID_Descriptor_t);
Size = sizeof(USB_HID_Descriptor_HID_t);
break;
case DTYPE_Report:
Address = &MouseReport;
......
......@@ -83,7 +83,7 @@
USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_t HID_MouseHID;
USB_HID_Descriptor_HID_t HID_MouseHID;
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
......
......@@ -140,7 +140,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.HID_MouseHID =
{
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
.Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = DTYPE_HID},
.HIDSpec = VERSION_BCD(01.11),
.CountryCode = 0x00,
......@@ -239,7 +239,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
break;
case DTYPE_HID:
Address = &ConfigurationDescriptor.HID_MouseHID;
Size = sizeof(USB_HID_Descriptor_t);
Size = sizeof(USB_HID_Descriptor_HID_t);
break;
case DTYPE_Report:
Address = &MouseReport;
......
......@@ -51,7 +51,7 @@
{
USB_Descriptor_Configuration_Header_t Config;
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_t HID_MouseHID;
USB_HID_Descriptor_HID_t HID_MouseHID;
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
......
......@@ -129,7 +129,7 @@ int main(void)
printf_P(PSTR("Device ID: %s.\r\n"), DeviceIDString);
char TestPageData[] = "\033%-12345X\033E" "LUFA PCL Test Page" "\033E\033%-12345X";
char TestPageData[] = "\033%-12345X\033E" "LUFA PCL Test Page" "\033E\033%-12345X";
uint16_t TestPageLength = strlen(TestPageData);
printf_P(PSTR("Sending Test Page (%d bytes)...\r\n"), TestPageLength);
......
This diff is collapsed.
......@@ -145,23 +145,49 @@
REPORT_ITEM_TYPE_Feature = 2, /**< Indicates that the item is a FEATURE report type. */
};
/** \brief HID class-specific HID Descriptor.
/** \brief HID class-specific HID Descriptor (LUFA naming conventions).
*
* Type define for the HID class-specific HID descriptor, to describe the HID device's specifications. Refer to the HID
* specification for details on the structure elements.
*
* \see \ref USB_HID_StdDescriptor_HID_t for the version of this type with standard element names.
*/
typedef struct
{
USB_Descriptor_Header_t Header; /**< Regular descriptor header containing the descriptor's type and length. */
uint16_t HIDSpec; /**< BCD encoded version that the HID descriptor and device complies to. */
uint8_t CountryCode; /**< Country code of the localized device, or zero if universal. */
uint8_t TotalReportDescriptors; /**< Total number of HID report descriptors for the interface. */
uint8_t HIDReportType; /**< Type of HID report, set to \ref DTYPE_Report. */
uint16_t HIDReportLength; /**< Length of the associated HID report descriptor, in bytes. */
} USB_HID_Descriptor_HID_t;
/** \brief HID class-specific HID Descriptor (USB-IF naming conventions).
*
* Type define for the HID class-specific HID descriptor, to describe the HID device's specifications. Refer to the HID
* specification for details on the structure elements.
*
* \see \ref USB_HID_Descriptor_HID_t for the version of this type with non-standard LUFA specific
* element names.
*/
typedef struct
{
USB_Descriptor_Header_t Header; /**< Regular descriptor header containing the descriptor's type and length. */
uint8_t bLength; /**< Size of the descriptor, in bytes. */
uint8_t bDescriptorType; /**< Type of the descriptor, either a value in \ref USB_DescriptorTypes_t or a value