Seperate out the device demos and project's configuration descriptor structure definitions to clearly indicate what descriptors belong to which interface.
This commit is contained in:
parent
b162540099
commit
04660d3793
49 changed files with 179 additions and 20 deletions
|
@ -59,10 +59,14 @@
|
|||
typedef struct
|
||||
{
|
||||
USB_Descriptor_Configuration_Header_t Config;
|
||||
|
||||
// Audio Control Interface
|
||||
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;
|
||||
|
||||
// Audio Streaming Interface
|
||||
USB_Descriptor_Interface_t Audio_StreamInterface_Alt0;
|
||||
USB_Descriptor_Interface_t Audio_StreamInterface_Alt1;
|
||||
USB_Audio_Descriptor_Interface_AS_t Audio_StreamInterface_SPC;
|
||||
|
|
|
@ -59,10 +59,14 @@
|
|||
typedef struct
|
||||
{
|
||||
USB_Descriptor_Configuration_Header_t Config;
|
||||
|
||||
// Audio Control Interface
|
||||
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;
|
||||
|
||||
// Audio Streaming Interface
|
||||
USB_Descriptor_Interface_t Audio_StreamInterface_Alt0;
|
||||
USB_Descriptor_Interface_t Audio_StreamInterface_Alt1;
|
||||
USB_Audio_Descriptor_Interface_AS_t Audio_StreamInterface_SPC;
|
||||
|
|
|
@ -74,21 +74,29 @@
|
|||
typedef struct
|
||||
{
|
||||
USB_Descriptor_Configuration_Header_t Config;
|
||||
|
||||
// First CDC Control Interface
|
||||
USB_Descriptor_Interface_Association_t CDC1_IAD;
|
||||
USB_Descriptor_Interface_t CDC1_CCI_Interface;
|
||||
USB_CDC_Descriptor_FunctionalHeader_t CDC1_Functional_Header;
|
||||
USB_CDC_Descriptor_FunctionalACM_t CDC1_Functional_ACM;
|
||||
USB_CDC_Descriptor_FunctionalUnion_t CDC1_Functional_Union;
|
||||
USB_Descriptor_Endpoint_t CDC1_ManagementEndpoint;
|
||||
|
||||
// First CDC Data Interface
|
||||
USB_Descriptor_Interface_t CDC1_DCI_Interface;
|
||||
USB_Descriptor_Endpoint_t CDC1_DataOutEndpoint;
|
||||
USB_Descriptor_Endpoint_t CDC1_DataInEndpoint;
|
||||
|
||||
// Second CDC Control Interface
|
||||
USB_Descriptor_Interface_Association_t CDC2_IAD;
|
||||
USB_Descriptor_Interface_t CDC2_CCI_Interface;
|
||||
USB_CDC_Descriptor_FunctionalHeader_t CDC2_Functional_Header;
|
||||
USB_CDC_Descriptor_FunctionalACM_t CDC2_Functional_ACM;
|
||||
USB_CDC_Descriptor_FunctionalUnion_t CDC2_Functional_Union;
|
||||
USB_Descriptor_Endpoint_t CDC2_ManagementEndpoint;
|
||||
|
||||
// Second CDC Data Interface
|
||||
USB_Descriptor_Interface_t CDC2_DCI_Interface;
|
||||
USB_Descriptor_Endpoint_t CDC2_DataOutEndpoint;
|
||||
USB_Descriptor_Endpoint_t CDC2_DataInEndpoint;
|
||||
|
|
|
@ -49,6 +49,8 @@
|
|||
typedef struct
|
||||
{
|
||||
USB_Descriptor_Configuration_Header_t Config;
|
||||
|
||||
// Generic HID Interface
|
||||
USB_Descriptor_Interface_t HID_Interface;
|
||||
USB_HID_Descriptor_HID_t HID_GenericHID;
|
||||
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
|
||||
|
|
|
@ -49,6 +49,8 @@
|
|||
typedef struct
|
||||
{
|
||||
USB_Descriptor_Configuration_Header_t Config;
|
||||
|
||||
// Joystick HID Interface
|
||||
USB_Descriptor_Interface_t HID_Interface;
|
||||
USB_HID_Descriptor_HID_t HID_JoystickHID;
|
||||
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
|
||||
|
|
|
@ -49,6 +49,8 @@
|
|||
typedef struct
|
||||
{
|
||||
USB_Descriptor_Configuration_Header_t Config;
|
||||
|
||||
// Keyboard HID Interface
|
||||
USB_Descriptor_Interface_t HID_Interface;
|
||||
USB_HID_Descriptor_HID_t HID_KeyboardHID;
|
||||
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
|
||||
|
|
|
@ -49,9 +49,13 @@
|
|||
typedef struct
|
||||
{
|
||||
USB_Descriptor_Configuration_Header_t Config;
|
||||
|
||||
// Keyboard HID Interface
|
||||
USB_Descriptor_Interface_t HID1_KeyboardInterface;
|
||||
USB_HID_Descriptor_HID_t HID1_KeyboardHID;
|
||||
USB_Descriptor_Endpoint_t HID1_ReportINEndpoint;
|
||||
|
||||
// Mouse HID Interface
|
||||
USB_Descriptor_Interface_t HID2_MouseInterface;
|
||||
USB_HID_Descriptor_HID_t HID2_MouseHID;
|
||||
USB_Descriptor_Endpoint_t HID2_ReportINEndpoint;
|
||||
|
|
|
@ -49,6 +49,8 @@
|
|||
typedef struct
|
||||
{
|
||||
USB_Descriptor_Configuration_Header_t Config;
|
||||
|
||||
// Combined Keyboard/Mouse HID Interface
|
||||
USB_Descriptor_Interface_t HID_Interface;
|
||||
USB_HID_Descriptor_HID_t HID_HIDData;
|
||||
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
|
||||
|
|
|
@ -59,8 +59,12 @@
|
|||
typedef struct
|
||||
{
|
||||
USB_Descriptor_Configuration_Header_t Config;
|
||||
|
||||
// MIDI Audio Control Interface
|
||||
USB_Descriptor_Interface_t Audio_ControlInterface;
|
||||
USB_Audio_Descriptor_Interface_AC_t Audio_ControlInterface_SPC;
|
||||
|
||||
// MIDI Audio Streaming Interface
|
||||
USB_Descriptor_Interface_t Audio_StreamInterface;
|
||||
USB_MIDI_Descriptor_AudioInterface_AS_t Audio_StreamInterface_SPC;
|
||||
USB_MIDI_Descriptor_InputJack_t MIDI_In_Jack_Emb;
|
||||
|
|
|
@ -59,6 +59,8 @@
|
|||
typedef struct
|
||||
{
|
||||
USB_Descriptor_Configuration_Header_t Config;
|
||||
|
||||
// Mass Storage Interface
|
||||
USB_Descriptor_Interface_t MS_Interface;
|
||||
USB_Descriptor_Endpoint_t MS_DataInEndpoint;
|
||||
USB_Descriptor_Endpoint_t MS_DataOutEndpoint;
|
||||
|
|
|
@ -66,9 +66,13 @@
|
|||
typedef struct
|
||||
{
|
||||
USB_Descriptor_Configuration_Header_t Config;
|
||||
|
||||
// Mass Storage Interface
|
||||
USB_Descriptor_Interface_t MS_Interface;
|
||||
USB_Descriptor_Endpoint_t MS_DataInEndpoint;
|
||||
USB_Descriptor_Endpoint_t MS_DataOutEndpoint;
|
||||
|
||||
// Generic HID Interface
|
||||
USB_Descriptor_Interface_t HID_KeyboardInterface;
|
||||
USB_HID_Descriptor_HID_t HID_KeyboardHID;
|
||||
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
|
||||
|
|
|
@ -49,6 +49,8 @@
|
|||
typedef struct
|
||||
{
|
||||
USB_Descriptor_Configuration_Header_t Config;
|
||||
|
||||
// Mouse HID Interface
|
||||
USB_Descriptor_Interface_t HID_Interface;
|
||||
USB_HID_Descriptor_HID_t HID_MouseHID;
|
||||
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
|
||||
|
|
|
@ -65,11 +65,15 @@
|
|||
typedef struct
|
||||
{
|
||||
USB_Descriptor_Configuration_Header_t Config;
|
||||
|
||||
// RNDIS CDC Control Interface
|
||||
USB_Descriptor_Interface_t CDC_CCI_Interface;
|
||||
USB_CDC_Descriptor_FunctionalHeader_t CDC_Functional_Header;
|
||||
USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM;
|
||||
USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union;
|
||||
USB_Descriptor_Endpoint_t CDC_NotificationEndpoint;
|
||||
|
||||
// RNDIS CDC Data Interface
|
||||
USB_Descriptor_Interface_t CDC_DCI_Interface;
|
||||
USB_Descriptor_Endpoint_t RNDIS_DataOutEndpoint;
|
||||
USB_Descriptor_Endpoint_t RNDIS_DataInEndpoint;
|
||||
|
|
|
@ -65,11 +65,15 @@
|
|||
typedef struct
|
||||
{
|
||||
USB_Descriptor_Configuration_Header_t Config;
|
||||
|
||||
// CDC Control Interface
|
||||
USB_Descriptor_Interface_t CDC_CCI_Interface;
|
||||
USB_CDC_Descriptor_FunctionalHeader_t CDC_Functional_Header;
|
||||
USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM;
|
||||
USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union;
|
||||
USB_Descriptor_Endpoint_t CDC_NotificationEndpoint;
|
||||
|
||||
// CDC Data Interface
|
||||
USB_Descriptor_Interface_t CDC_DCI_Interface;
|
||||
USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
|
||||
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
|
||||
|
|
|
@ -74,15 +74,21 @@
|
|||
typedef struct
|
||||
{
|
||||
USB_Descriptor_Configuration_Header_t Config;
|
||||
|
||||
// CDC Control Interface
|
||||
USB_Descriptor_Interface_Association_t CDC_IAD;
|
||||
USB_Descriptor_Interface_t CDC_CCI_Interface;
|
||||
USB_CDC_Descriptor_FunctionalHeader_t CDC_Functional_Header;
|
||||
USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM;
|
||||
USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union;
|
||||
USB_Descriptor_Endpoint_t CDC_NotificationEndpoint;
|
||||
|
||||
// CDC Data Interface
|
||||
USB_Descriptor_Interface_t CDC_DCI_Interface;
|
||||
USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
|
||||
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
|
||||
|
||||
// Mass Storage Interface
|
||||
USB_Descriptor_Interface_t MS_Interface;
|
||||
USB_Descriptor_Endpoint_t MS_DataInEndpoint;
|
||||
USB_Descriptor_Endpoint_t MS_DataOutEndpoint;
|
||||
|
|
|
@ -71,15 +71,21 @@
|
|||
typedef struct
|
||||
{
|
||||
USB_Descriptor_Configuration_Header_t Config;
|
||||
|
||||
// CDC Control Interface
|
||||
USB_Descriptor_Interface_Association_t CDC_IAD;
|
||||
USB_Descriptor_Interface_t CDC_CCI_Interface;
|
||||
USB_CDC_Descriptor_FunctionalHeader_t CDC_Functional_Header;
|
||||
USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM;
|
||||
USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union;
|
||||
USB_Descriptor_Endpoint_t CDC_NotificationEndpoint;
|
||||
|
||||
// CDC Data Interface
|
||||
USB_Descriptor_Interface_t CDC_DCI_Interface;
|
||||
USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
|
||||
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
|
||||
|
||||
// Mouse HID Interface
|
||||
USB_Descriptor_Interface_t HID_Interface;
|
||||
USB_HID_Descriptor_HID_t HID_MouseHID;
|
||||
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue