forked from mfulz_github/qmk_firmware
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:
parent
5227ca4ce2
commit
49b09a2042
|
@ -86,7 +86,7 @@ USB_Descriptor_Configuration_t ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.CCI_Interface =
|
.CDC_CCI_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ USB_Descriptor_Configuration_t ConfigurationDescriptor =
|
||||||
.Data = {0x00, 0x01}
|
.Data = {0x00, 0x01}
|
||||||
},
|
},
|
||||||
|
|
||||||
.ManagementEndpoint =
|
.CDC_ManagementEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ USB_Descriptor_Configuration_t ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x02
|
.PollingIntervalMS = 0x02
|
||||||
},
|
},
|
||||||
|
|
||||||
.DCI_Interface =
|
.CDC_DCI_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ USB_Descriptor_Configuration_t ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataOutEndpoint =
|
.CDC_DataOutEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ USB_Descriptor_Configuration_t ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x00
|
.PollingIntervalMS = 0x00
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataInEndpoint =
|
.CDC_DataInEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
|
|
@ -129,15 +129,15 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
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_IntHeader;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_CallManagement;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_CallManagement;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement;
|
CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union;
|
||||||
USB_Descriptor_Endpoint_t ManagementEndpoint;
|
USB_Descriptor_Endpoint_t CDC_ManagementEndpoint;
|
||||||
USB_Descriptor_Interface_t DCI_Interface;
|
USB_Descriptor_Interface_t CDC_DCI_Interface;
|
||||||
USB_Descriptor_Endpoint_t DataOutEndpoint;
|
USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
|
||||||
USB_Descriptor_Endpoint_t DataInEndpoint;
|
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Function Prototypes: */
|
/* Function Prototypes: */
|
||||||
|
|
|
@ -86,7 +86,7 @@ USB_Descriptor_Configuration_t ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.DFUInterface =
|
.DFU_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ USB_Descriptor_Configuration_t ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.DFUFunctional =
|
.DFU_Functional =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_DFU_Functional_Descriptor_t), .Type = DTYPE_DFUFunctional},
|
.Header = {.Size = sizeof(USB_DFU_Functional_Descriptor_t), .Type = DTYPE_DFUFunctional},
|
||||||
|
|
||||||
|
|
|
@ -161,8 +161,8 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
USB_Descriptor_Configuration_Header_t Config;
|
||||||
USB_Descriptor_Interface_t DFUInterface;
|
USB_Descriptor_Interface_t DFU_Interface;
|
||||||
USB_DFU_Functional_Descriptor_t DFUFunctional;
|
USB_DFU_Functional_Descriptor_t DFU_Functional;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Function Prototypes: */
|
/* Function Prototypes: */
|
||||||
|
|
|
@ -106,7 +106,7 @@ USB_Descriptor_Configuration_t ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.Interface =
|
.HID_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ USB_Descriptor_Configuration_t ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.HIDDescriptor =
|
.HID_VendorHID =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},
|
.Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ USB_Descriptor_Configuration_t ConfigurationDescriptor =
|
||||||
.HIDReportLength = sizeof(HIDReport)
|
.HIDReportLength = sizeof(HIDReport)
|
||||||
},
|
},
|
||||||
|
|
||||||
.HIDEndpoint =
|
.HID_ReportINEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.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);
|
Size = sizeof(USB_Descriptor_Configuration_t);
|
||||||
break;
|
break;
|
||||||
case DTYPE_HID:
|
case DTYPE_HID:
|
||||||
Address = (void*)&ConfigurationDescriptor.HIDDescriptor;
|
Address = (void*)&ConfigurationDescriptor.HID_VendorHID;
|
||||||
Size = sizeof(USB_Descriptor_HID_t);
|
Size = sizeof(USB_Descriptor_HID_t);
|
||||||
break;
|
break;
|
||||||
case DTYPE_Report:
|
case DTYPE_Report:
|
||||||
|
|
|
@ -66,9 +66,9 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
USB_Descriptor_Configuration_Header_t Config;
|
||||||
USB_Descriptor_Interface_t Interface;
|
USB_Descriptor_Interface_t HID_Interface;
|
||||||
USB_Descriptor_HID_t HIDDescriptor;
|
USB_Descriptor_HID_t HID_VendorHID;
|
||||||
USB_Descriptor_Endpoint_t HIDEndpoint;
|
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Macros: */
|
/* Macros: */
|
||||||
|
|
|
@ -86,7 +86,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioControlInterface =
|
.Audio_ControlInterface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioControlInterface_SPC =
|
.Audio_ControlInterface_SPC =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_AudioInterface},
|
.Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_AudioInterface},
|
||||||
.Subtype = DSUBTYPE_Header,
|
.Subtype = DSUBTYPE_Header,
|
||||||
|
@ -116,7 +116,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceNumbers = {1},
|
.InterfaceNumbers = {1},
|
||||||
},
|
},
|
||||||
|
|
||||||
.InputTerminal =
|
.Audio_InputTerminal =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Audio_InputTerminal_t), .Type = DTYPE_AudioInterface},
|
.Header = {.Size = sizeof(USB_Audio_InputTerminal_t), .Type = DTYPE_AudioInterface},
|
||||||
.Subtype = DSUBTYPE_InputTerminal,
|
.Subtype = DSUBTYPE_InputTerminal,
|
||||||
|
@ -132,7 +132,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.TerminalStrIndex = NO_DESCRIPTOR
|
.TerminalStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.OutputTerminal =
|
.Audio_OutputTerminal =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Audio_OutputTerminal_t), .Type = DTYPE_AudioInterface},
|
.Header = {.Size = sizeof(USB_Audio_OutputTerminal_t), .Type = DTYPE_AudioInterface},
|
||||||
.Subtype = DSUBTYPE_OutputTerminal,
|
.Subtype = DSUBTYPE_OutputTerminal,
|
||||||
|
@ -146,7 +146,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.TerminalStrIndex = NO_DESCRIPTOR
|
.TerminalStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioStreamInterface_Alt0 =
|
.Audio_StreamInterface_Alt0 =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioStreamInterface_Alt1 =
|
.Audio_StreamInterface_Alt1 =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioStreamInterface_SPC =
|
.Audio_StreamInterface_SPC =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Audio_Interface_AS_t), .Type = DTYPE_AudioInterface},
|
.Header = {.Size = sizeof(USB_Audio_Interface_AS_t), .Type = DTYPE_AudioInterface},
|
||||||
.Subtype = DSUBTYPE_General,
|
.Subtype = DSUBTYPE_General,
|
||||||
|
@ -189,7 +189,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.AudioFormat = 0x0001
|
.AudioFormat = 0x0001
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioFormat =
|
.Audio_AudioFormat =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Audio_Format_t), .Type = DTYPE_AudioInterface},
|
.Header = {.Size = sizeof(USB_Audio_Format_t), .Type = DTYPE_AudioInterface},
|
||||||
.Subtype = DSUBTYPE_Format,
|
.Subtype = DSUBTYPE_Format,
|
||||||
|
@ -204,7 +204,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.SampleFrequencies = {AUDIO_SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY)}
|
.SampleFrequencies = {AUDIO_SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY)}
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioEndpoint =
|
.Audio_StreamEndpoint =
|
||||||
{
|
{
|
||||||
.Endpoint =
|
.Endpoint =
|
||||||
{
|
{
|
||||||
|
@ -220,7 +220,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.SyncEndpointNumber = 0
|
.SyncEndpointNumber = 0
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioEndpoint_SPC =
|
.Audio_StreamEndpoint_SPC =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint},
|
.Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint},
|
||||||
.Subtype = DSUBTYPE_General,
|
.Subtype = DSUBTYPE_General,
|
||||||
|
|
|
@ -63,16 +63,16 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
USB_Descriptor_Configuration_Header_t Config;
|
||||||
USB_Descriptor_Interface_t AudioControlInterface;
|
USB_Descriptor_Interface_t Audio_ControlInterface;
|
||||||
USB_Audio_Interface_AC_t AudioControlInterface_SPC;
|
USB_Audio_Interface_AC_t Audio_ControlInterface_SPC;
|
||||||
USB_Audio_InputTerminal_t InputTerminal;
|
USB_Audio_InputTerminal_t Audio_InputTerminal;
|
||||||
USB_Audio_OutputTerminal_t OutputTerminal;
|
USB_Audio_OutputTerminal_t Audio_OutputTerminal;
|
||||||
USB_Descriptor_Interface_t AudioStreamInterface_Alt0;
|
USB_Descriptor_Interface_t Audio_StreamInterface_Alt0;
|
||||||
USB_Descriptor_Interface_t AudioStreamInterface_Alt1;
|
USB_Descriptor_Interface_t Audio_StreamInterface_Alt1;
|
||||||
USB_Audio_Interface_AS_t AudioStreamInterface_SPC;
|
USB_Audio_Interface_AS_t Audio_StreamInterface_SPC;
|
||||||
USB_Audio_Format_t AudioFormat;
|
USB_Audio_Format_t Audio_AudioFormat;
|
||||||
USB_Audio_StreamEndpoint_Std_t AudioEndpoint;
|
USB_Audio_StreamEndpoint_Std_t Audio_StreamEndpoint;
|
||||||
USB_Audio_StreamEndpoint_Spc_t AudioEndpoint_SPC;
|
USB_Audio_StreamEndpoint_Spc_t Audio_StreamEndpoint_SPC;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Function Prototypes: */
|
/* Function Prototypes: */
|
||||||
|
|
|
@ -86,7 +86,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioControlInterface =
|
.Audio_ControlInterface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioControlInterface_SPC =
|
.Audio_ControlInterface_SPC =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_AudioInterface},
|
.Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_AudioInterface},
|
||||||
.Subtype = DSUBTYPE_Header,
|
.Subtype = DSUBTYPE_Header,
|
||||||
|
@ -116,7 +116,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceNumbers = {1},
|
.InterfaceNumbers = {1},
|
||||||
},
|
},
|
||||||
|
|
||||||
.InputTerminal =
|
.Audio_InputTerminal =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Audio_InputTerminal_t), .Type = DTYPE_AudioInterface},
|
.Header = {.Size = sizeof(USB_Audio_InputTerminal_t), .Type = DTYPE_AudioInterface},
|
||||||
.Subtype = DSUBTYPE_InputTerminal,
|
.Subtype = DSUBTYPE_InputTerminal,
|
||||||
|
@ -132,7 +132,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.TerminalStrIndex = NO_DESCRIPTOR
|
.TerminalStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.OutputTerminal =
|
.Audio_OutputTerminal =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Audio_OutputTerminal_t), .Type = DTYPE_AudioInterface},
|
.Header = {.Size = sizeof(USB_Audio_OutputTerminal_t), .Type = DTYPE_AudioInterface},
|
||||||
.Subtype = DSUBTYPE_OutputTerminal,
|
.Subtype = DSUBTYPE_OutputTerminal,
|
||||||
|
@ -146,7 +146,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.TerminalStrIndex = NO_DESCRIPTOR
|
.TerminalStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioStreamInterface_Alt0 =
|
.Audio_StreamInterface_Alt0 =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioStreamInterface_Alt1 =
|
.Audio_StreamInterface_Alt1 =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioStreamInterface_SPC =
|
.Audio_StreamInterface_SPC =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Audio_Interface_AS_t), .Type = DTYPE_AudioInterface},
|
.Header = {.Size = sizeof(USB_Audio_Interface_AS_t), .Type = DTYPE_AudioInterface},
|
||||||
.Subtype = DSUBTYPE_General,
|
.Subtype = DSUBTYPE_General,
|
||||||
|
@ -189,7 +189,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.AudioFormat = 0x0001
|
.AudioFormat = 0x0001
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioFormat =
|
.Audio_AudioFormat =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Audio_Format_t), .Type = DTYPE_AudioInterface},
|
.Header = {.Size = sizeof(USB_Audio_Format_t), .Type = DTYPE_AudioInterface},
|
||||||
.Subtype = DSUBTYPE_Format,
|
.Subtype = DSUBTYPE_Format,
|
||||||
|
@ -204,7 +204,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.SampleFrequencies = {AUDIO_SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY)}
|
.SampleFrequencies = {AUDIO_SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY)}
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioEndpoint =
|
.Audio_StreamEndpoint =
|
||||||
{
|
{
|
||||||
.Endpoint =
|
.Endpoint =
|
||||||
{
|
{
|
||||||
|
@ -220,7 +220,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.SyncEndpointNumber = 0
|
.SyncEndpointNumber = 0
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioEndpoint_SPC =
|
.Audio_StreamEndpoint_SPC =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint},
|
.Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint},
|
||||||
.Subtype = DSUBTYPE_General,
|
.Subtype = DSUBTYPE_General,
|
||||||
|
|
|
@ -63,16 +63,16 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
USB_Descriptor_Configuration_Header_t Config;
|
||||||
USB_Descriptor_Interface_t AudioControlInterface;
|
USB_Descriptor_Interface_t Audio_ControlInterface;
|
||||||
USB_Audio_Interface_AC_t AudioControlInterface_SPC;
|
USB_Audio_Interface_AC_t Audio_ControlInterface_SPC;
|
||||||
USB_Audio_InputTerminal_t InputTerminal;
|
USB_Audio_InputTerminal_t Audio_InputTerminal;
|
||||||
USB_Audio_OutputTerminal_t OutputTerminal;
|
USB_Audio_OutputTerminal_t Audio_OutputTerminal;
|
||||||
USB_Descriptor_Interface_t AudioStreamInterface_Alt0;
|
USB_Descriptor_Interface_t Audio_StreamInterface_Alt0;
|
||||||
USB_Descriptor_Interface_t AudioStreamInterface_Alt1;
|
USB_Descriptor_Interface_t Audio_StreamInterface_Alt1;
|
||||||
USB_Audio_Interface_AS_t AudioStreamInterface_SPC;
|
USB_Audio_Interface_AS_t Audio_StreamInterface_SPC;
|
||||||
USB_Audio_Format_t AudioFormat;
|
USB_Audio_Format_t Audio_AudioFormat;
|
||||||
USB_Audio_StreamEndpoint_Std_t AudioEndpoint;
|
USB_Audio_StreamEndpoint_Std_t Audio_StreamEndpoint;
|
||||||
USB_Audio_StreamEndpoint_Spc_t AudioEndpoint_SPC;
|
USB_Audio_StreamEndpoint_Spc_t Audio_StreamEndpoint_SPC;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Function Prototypes: */
|
/* Function Prototypes: */
|
||||||
|
|
|
@ -98,7 +98,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.IAD1 =
|
.CDC1_IAD =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_Association_t), .Type = DTYPE_InterfaceAssociation},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_Association_t), .Type = DTYPE_InterfaceAssociation},
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x00
|
.PollingIntervalMS = 0x00
|
||||||
},
|
},
|
||||||
|
|
||||||
.IAD2 =
|
.CDC2_IAD =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_Association_t), .Type = DTYPE_InterfaceAssociation},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_Association_t), .Type = DTYPE_InterfaceAssociation},
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
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;
|
USB_Descriptor_Interface_t CDC1_CCI_Interface;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC1_Functional_IntHeader;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC1_Functional_IntHeader;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC1_Functional_CallManagement;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC1_Functional_CallManagement;
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
USB_Descriptor_Interface_t CDC1_DCI_Interface;
|
USB_Descriptor_Interface_t CDC1_DCI_Interface;
|
||||||
USB_Descriptor_Endpoint_t CDC1_DataOutEndpoint;
|
USB_Descriptor_Endpoint_t CDC1_DataOutEndpoint;
|
||||||
USB_Descriptor_Endpoint_t CDC1_DataInEndpoint;
|
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;
|
USB_Descriptor_Interface_t CDC2_CCI_Interface;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC2_Functional_IntHeader;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC2_Functional_IntHeader;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC2_Functional_CallManagement;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC2_Functional_CallManagement;
|
||||||
|
|
|
@ -112,7 +112,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.Interface =
|
.HID_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.GenericHID =
|
.HID_GenericHID =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
|
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.HIDReportLength = sizeof(GenericReport)
|
.HIDReportLength = sizeof(GenericReport)
|
||||||
},
|
},
|
||||||
|
|
||||||
.GenericINEndpoint =
|
.HID_ReportINEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.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;
|
break;
|
||||||
case DTYPE_HID:
|
case DTYPE_HID:
|
||||||
Address = (void*)&ConfigurationDescriptor.GenericHID;
|
Address = (void*)&ConfigurationDescriptor.HID_GenericHID;
|
||||||
Size = sizeof(USB_HID_Descriptor_t);
|
Size = sizeof(USB_HID_Descriptor_t);
|
||||||
break;
|
break;
|
||||||
case DTYPE_Report:
|
case DTYPE_Report:
|
||||||
|
|
|
@ -50,9 +50,9 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
USB_Descriptor_Configuration_Header_t Config;
|
||||||
USB_Descriptor_Interface_t Interface;
|
USB_Descriptor_Interface_t HID_Interface;
|
||||||
USB_HID_Descriptor_t GenericHID;
|
USB_HID_Descriptor_t HID_GenericHID;
|
||||||
USB_Descriptor_Endpoint_t GenericINEndpoint;
|
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Macros: */
|
/* Macros: */
|
||||||
|
|
|
@ -122,7 +122,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.Interface =
|
.HID_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.JoystickHID =
|
.HID_JoystickHID =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
|
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.HIDReportLength = sizeof(JoystickReport)
|
.HIDReportLength = sizeof(JoystickReport)
|
||||||
},
|
},
|
||||||
|
|
||||||
.JoystickEndpoint =
|
.HID_ReportINEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.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;
|
break;
|
||||||
case DTYPE_HID:
|
case DTYPE_HID:
|
||||||
Address = (void*)&ConfigurationDescriptor.JoystickHID;
|
Address = (void*)&ConfigurationDescriptor.HID_JoystickHID;
|
||||||
Size = sizeof(USB_HID_Descriptor_t);
|
Size = sizeof(USB_HID_Descriptor_t);
|
||||||
break;
|
break;
|
||||||
case DTYPE_Report:
|
case DTYPE_Report:
|
||||||
|
|
|
@ -50,9 +50,9 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
USB_Descriptor_Configuration_Header_t Config;
|
||||||
USB_Descriptor_Interface_t Interface;
|
USB_Descriptor_Interface_t HID_Interface;
|
||||||
USB_HID_Descriptor_t JoystickHID;
|
USB_HID_Descriptor_t HID_JoystickHID;
|
||||||
USB_Descriptor_Endpoint_t JoystickEndpoint;
|
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Macros: */
|
/* Macros: */
|
||||||
|
|
|
@ -129,7 +129,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.Interface =
|
.HID_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.KeyboardHID =
|
.HID_KeyboardHID =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
|
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.HIDReportLength = sizeof(KeyboardReport)
|
.HIDReportLength = sizeof(KeyboardReport)
|
||||||
},
|
},
|
||||||
|
|
||||||
.KeyboardEndpoint =
|
.HID_ReportINEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.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;
|
break;
|
||||||
case DTYPE_HID:
|
case DTYPE_HID:
|
||||||
Address = (void*)&ConfigurationDescriptor.KeyboardHID;
|
Address = (void*)&ConfigurationDescriptor.HID_KeyboardHID;
|
||||||
Size = sizeof(USB_HID_Descriptor_t);
|
Size = sizeof(USB_HID_Descriptor_t);
|
||||||
break;
|
break;
|
||||||
case DTYPE_Report:
|
case DTYPE_Report:
|
||||||
|
|
|
@ -51,9 +51,9 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
USB_Descriptor_Configuration_Header_t Config;
|
||||||
USB_Descriptor_Interface_t Interface;
|
USB_Descriptor_Interface_t HID_Interface;
|
||||||
USB_HID_Descriptor_t KeyboardHID;
|
USB_HID_Descriptor_t HID_KeyboardHID;
|
||||||
USB_Descriptor_Endpoint_t KeyboardEndpoint;
|
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Macros: */
|
/* Macros: */
|
||||||
|
|
|
@ -162,7 +162,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.KeyboardInterface =
|
.HID1_KeyboardInterface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.KeyboardHID =
|
.HID1_KeyboardHID =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
|
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.HIDReportLength = sizeof(KeyboardReport)
|
.HIDReportLength = sizeof(KeyboardReport)
|
||||||
},
|
},
|
||||||
|
|
||||||
.KeyboardInEndpoint =
|
.HID1_ReportINEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x0A
|
.PollingIntervalMS = 0x0A
|
||||||
},
|
},
|
||||||
|
|
||||||
.MouseInterface =
|
.HID2_MouseInterface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -215,7 +215,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.MouseHID =
|
.HID2_MouseHID =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
|
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
|
||||||
|
|
||||||
|
@ -226,7 +226,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.HIDReportLength = sizeof(MouseReport)
|
.HIDReportLength = sizeof(MouseReport)
|
||||||
},
|
},
|
||||||
|
|
||||||
.MouseInEndpoint =
|
.HID2_ReportINEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.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:
|
case DTYPE_HID:
|
||||||
if (!(wIndex))
|
if (!(wIndex))
|
||||||
{
|
{
|
||||||
Address = (void*)&ConfigurationDescriptor.KeyboardHID;
|
Address = (void*)&ConfigurationDescriptor.HID1_KeyboardHID;
|
||||||
Size = sizeof(USB_HID_Descriptor_t);
|
Size = sizeof(USB_HID_Descriptor_t);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Address = (void*)&ConfigurationDescriptor.MouseHID;
|
Address = (void*)&ConfigurationDescriptor.HID2_MouseHID;
|
||||||
Size = sizeof(USB_HID_Descriptor_t);
|
Size = sizeof(USB_HID_Descriptor_t);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -51,12 +51,12 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
USB_Descriptor_Configuration_Header_t Config;
|
||||||
USB_Descriptor_Interface_t KeyboardInterface;
|
USB_Descriptor_Interface_t HID1_KeyboardInterface;
|
||||||
USB_HID_Descriptor_t KeyboardHID;
|
USB_HID_Descriptor_t HID1_KeyboardHID;
|
||||||
USB_Descriptor_Endpoint_t KeyboardInEndpoint;
|
USB_Descriptor_Endpoint_t HID1_ReportINEndpoint;
|
||||||
USB_Descriptor_Interface_t MouseInterface;
|
USB_Descriptor_Interface_t HID2_MouseInterface;
|
||||||
USB_HID_Descriptor_t MouseHID;
|
USB_HID_Descriptor_t HID2_MouseHID;
|
||||||
USB_Descriptor_Endpoint_t MouseInEndpoint;
|
USB_Descriptor_Endpoint_t HID2_ReportINEndpoint;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Macros: */
|
/* Macros: */
|
||||||
|
|
|
@ -86,7 +86,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioControlInterface =
|
.Audio_ControlInterface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioControlInterface_SPC =
|
.Audio_ControlInterface_SPC =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_AudioInterface},
|
.Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_AudioInterface},
|
||||||
.Subtype = DSUBTYPE_Header,
|
.Subtype = DSUBTYPE_Header,
|
||||||
|
@ -114,7 +114,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceNumbers = {1},
|
.InterfaceNumbers = {1},
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioStreamInterface =
|
.Audio_StreamInterface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -130,14 +130,15 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioStreamInterface_SPC =
|
.Audio_StreamInterface_SPC =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_MIDI_AudioInterface_AS_t), .Type = DTYPE_AudioInterface},
|
.Header = {.Size = sizeof(USB_MIDI_AudioInterface_AS_t), .Type = DTYPE_AudioInterface},
|
||||||
.Subtype = DSUBTYPE_General,
|
.Subtype = DSUBTYPE_General,
|
||||||
|
|
||||||
.AudioSpecification = VERSION_BCD(01.00),
|
.AudioSpecification = VERSION_BCD(01.00),
|
||||||
|
|
||||||
.TotalLength = (sizeof(USB_Descriptor_Configuration_t) - offsetof(USB_Descriptor_Configuration_t, AudioStreamInterface_SPC))
|
.TotalLength = (sizeof(USB_Descriptor_Configuration_t) -
|
||||||
|
offsetof(USB_Descriptor_Configuration_t, Audio_StreamInterface_SPC))
|
||||||
},
|
},
|
||||||
|
|
||||||
.MIDI_In_Jack_Emb =
|
.MIDI_In_Jack_Emb =
|
||||||
|
|
|
@ -60,10 +60,10 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
USB_Descriptor_Configuration_Header_t Config;
|
||||||
USB_Descriptor_Interface_t AudioControlInterface;
|
USB_Descriptor_Interface_t Audio_ControlInterface;
|
||||||
USB_Audio_Interface_AC_t AudioControlInterface_SPC;
|
USB_Audio_Interface_AC_t Audio_ControlInterface_SPC;
|
||||||
USB_Descriptor_Interface_t AudioStreamInterface;
|
USB_Descriptor_Interface_t Audio_StreamInterface;
|
||||||
USB_MIDI_AudioInterface_AS_t AudioStreamInterface_SPC;
|
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_Emb;
|
||||||
USB_MIDI_In_Jack_t MIDI_In_Jack_Ext;
|
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_Emb;
|
||||||
|
|
|
@ -98,7 +98,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.Interface =
|
.MS_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataInEndpoint =
|
.MS_DataInEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x00
|
.PollingIntervalMS = 0x00
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataOutEndpoint =
|
.MS_DataOutEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
|
|
@ -60,9 +60,9 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
USB_Descriptor_Configuration_Header_t Config;
|
||||||
USB_Descriptor_Interface_t Interface;
|
USB_Descriptor_Interface_t MS_Interface;
|
||||||
USB_Descriptor_Endpoint_t DataInEndpoint;
|
USB_Descriptor_Endpoint_t MS_DataInEndpoint;
|
||||||
USB_Descriptor_Endpoint_t DataOutEndpoint;
|
USB_Descriptor_Endpoint_t MS_DataOutEndpoint;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Function Prototypes: */
|
/* Function Prototypes: */
|
||||||
|
|
|
@ -141,7 +141,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.MassStorageInterface =
|
.MS_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.MassStorageDataInEndpoint =
|
.MS_DataInEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x00
|
.PollingIntervalMS = 0x00
|
||||||
},
|
},
|
||||||
|
|
||||||
.MassStorageDataOutEndpoint =
|
.MS_DataOutEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x00
|
.PollingIntervalMS = 0x00
|
||||||
},
|
},
|
||||||
|
|
||||||
.KeyboardInterface =
|
.HID_KeyboardInterface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -193,7 +193,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.KeyboardHID =
|
.HID_KeyboardHID =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
|
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.HIDReportLength = sizeof(KeyboardReport)
|
.HIDReportLength = sizeof(KeyboardReport)
|
||||||
},
|
},
|
||||||
|
|
||||||
.KeyboardEndpoint =
|
.HID_ReportINEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -291,7 +291,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex,
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case DTYPE_HID:
|
case DTYPE_HID:
|
||||||
Address = (void*)&ConfigurationDescriptor.KeyboardHID;
|
Address = (void*)&ConfigurationDescriptor.HID_KeyboardHID;
|
||||||
Size = sizeof(USB_HID_Descriptor_t);
|
Size = sizeof(USB_HID_Descriptor_t);
|
||||||
break;
|
break;
|
||||||
case DTYPE_Report:
|
case DTYPE_Report:
|
||||||
|
|
|
@ -68,12 +68,12 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
USB_Descriptor_Configuration_Header_t Config;
|
||||||
USB_Descriptor_Interface_t MassStorageInterface;
|
USB_Descriptor_Interface_t MS_Interface;
|
||||||
USB_Descriptor_Endpoint_t MassStorageDataInEndpoint;
|
USB_Descriptor_Endpoint_t MS_DataInEndpoint;
|
||||||
USB_Descriptor_Endpoint_t MassStorageDataOutEndpoint;
|
USB_Descriptor_Endpoint_t MS_DataOutEndpoint;
|
||||||
USB_Descriptor_Interface_t KeyboardInterface;
|
USB_Descriptor_Interface_t HID_KeyboardInterface;
|
||||||
USB_HID_Descriptor_t KeyboardHID;
|
USB_HID_Descriptor_t HID_KeyboardHID;
|
||||||
USB_Descriptor_Endpoint_t KeyboardEndpoint;
|
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Function Prototypes: */
|
/* Function Prototypes: */
|
||||||
|
|
|
@ -122,7 +122,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.Interface =
|
.HID_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.MouseHID =
|
.HID_MouseHID =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
|
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.HIDReportLength = sizeof(MouseReport)
|
.HIDReportLength = sizeof(MouseReport)
|
||||||
},
|
},
|
||||||
|
|
||||||
.MouseEndpoint =
|
.HID_ReportINEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.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;
|
break;
|
||||||
case DTYPE_HID:
|
case DTYPE_HID:
|
||||||
Address = (void*)&ConfigurationDescriptor.MouseHID;
|
Address = (void*)&ConfigurationDescriptor.HID_MouseHID;
|
||||||
Size = sizeof(USB_HID_Descriptor_t);
|
Size = sizeof(USB_HID_Descriptor_t);
|
||||||
break;
|
break;
|
||||||
case DTYPE_Report:
|
case DTYPE_Report:
|
||||||
|
|
|
@ -50,9 +50,9 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
USB_Descriptor_Configuration_Header_t Config;
|
||||||
USB_Descriptor_Interface_t Interface;
|
USB_Descriptor_Interface_t HID_Interface;
|
||||||
USB_HID_Descriptor_t MouseHID;
|
USB_HID_Descriptor_t HID_MouseHID;
|
||||||
USB_Descriptor_Endpoint_t MouseEndpoint;
|
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Macros: */
|
/* Macros: */
|
||||||
|
|
|
@ -86,7 +86,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.CCI_Interface =
|
.CDC_CCI_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.Data = {0x00, 0x01}
|
.Data = {0x00, 0x01}
|
||||||
},
|
},
|
||||||
|
|
||||||
.ManagementEndpoint =
|
.CDC_ManagementEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x02
|
.PollingIntervalMS = 0x02
|
||||||
},
|
},
|
||||||
|
|
||||||
.DCI_Interface =
|
.CDC_DCI_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataOutEndpoint =
|
.RNDIS_DataOutEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x00
|
.PollingIntervalMS = 0x00
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataInEndpoint =
|
.RNDIS_DataInEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
|
|
@ -66,15 +66,15 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
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_Header;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Header;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_CallManagement;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_CallManagement;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement;
|
CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union;
|
||||||
USB_Descriptor_Endpoint_t ManagementEndpoint;
|
USB_Descriptor_Endpoint_t CDC_ManagementEndpoint;
|
||||||
USB_Descriptor_Interface_t DCI_Interface;
|
USB_Descriptor_Interface_t CDC_DCI_Interface;
|
||||||
USB_Descriptor_Endpoint_t DataOutEndpoint;
|
USB_Descriptor_Endpoint_t RNDIS_DataOutEndpoint;
|
||||||
USB_Descriptor_Endpoint_t DataInEndpoint;
|
USB_Descriptor_Endpoint_t RNDIS_DataInEndpoint;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Function Prototypes: */
|
/* Function Prototypes: */
|
||||||
|
|
|
@ -98,7 +98,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.CCI_Interface =
|
.CDC_CCI_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.Data = {0x00, 0x01}
|
.Data = {0x00, 0x01}
|
||||||
},
|
},
|
||||||
|
|
||||||
.ManagementEndpoint =
|
.CDC_ManagementEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0xFF
|
.PollingIntervalMS = 0xFF
|
||||||
},
|
},
|
||||||
|
|
||||||
.DCI_Interface =
|
.CDC_DCI_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataOutEndpoint =
|
.CDC_DataOutEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x00
|
.PollingIntervalMS = 0x00
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataInEndpoint =
|
.CDC_DataInEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
|
|
@ -66,15 +66,15 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
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_IntHeader;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_CallManagement;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_CallManagement;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement;
|
CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union;
|
||||||
USB_Descriptor_Endpoint_t ManagementEndpoint;
|
USB_Descriptor_Endpoint_t CDC_ManagementEndpoint;
|
||||||
USB_Descriptor_Interface_t DCI_Interface;
|
USB_Descriptor_Interface_t CDC_DCI_Interface;
|
||||||
USB_Descriptor_Endpoint_t DataOutEndpoint;
|
USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
|
||||||
USB_Descriptor_Endpoint_t DataInEndpoint;
|
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Function Prototypes: */
|
/* Function Prototypes: */
|
||||||
|
|
|
@ -148,7 +148,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.IADStrIndex = NO_DESCRIPTOR
|
.IADStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.CCI_Interface =
|
.CDC_CCI_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.Data = {0x00, 0x01}
|
.Data = {0x00, 0x01}
|
||||||
},
|
},
|
||||||
|
|
||||||
.ManagementEndpoint =
|
.CDC_ManagementEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0xFF
|
.PollingIntervalMS = 0xFF
|
||||||
},
|
},
|
||||||
|
|
||||||
.DCI_Interface =
|
.CDC_DCI_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -222,7 +222,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataOutEndpoint =
|
.CDC_DataOutEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x00
|
.PollingIntervalMS = 0x00
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataInEndpoint =
|
.CDC_DataInEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -242,7 +242,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x00
|
.PollingIntervalMS = 0x00
|
||||||
},
|
},
|
||||||
|
|
||||||
.InterfaceHID =
|
.HID_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -258,7 +258,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.MouseHID =
|
.HID_MouseHID =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
|
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.HIDReportLength = sizeof(MouseReport)
|
.HIDReportLength = sizeof(MouseReport)
|
||||||
},
|
},
|
||||||
|
|
||||||
.MouseEndpoint =
|
.HID_ReportINEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -356,7 +356,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex,
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case DTYPE_HID:
|
case DTYPE_HID:
|
||||||
Address = (void*)&ConfigurationDescriptor.MouseHID;
|
Address = (void*)&ConfigurationDescriptor.HID_MouseHID;
|
||||||
Size = sizeof(USB_HID_Descriptor_t);
|
Size = sizeof(USB_HID_Descriptor_t);
|
||||||
break;
|
break;
|
||||||
case DTYPE_Report:
|
case DTYPE_Report:
|
||||||
|
|
|
@ -74,18 +74,18 @@
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
USB_Descriptor_Configuration_Header_t Config;
|
||||||
USB_Descriptor_Interface_Association_t CDC_IAD;
|
USB_Descriptor_Interface_Association_t CDC_IAD;
|
||||||
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_IntHeader;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_CallManagement;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_CallManagement;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement;
|
CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union;
|
||||||
USB_Descriptor_Endpoint_t ManagementEndpoint;
|
USB_Descriptor_Endpoint_t CDC_ManagementEndpoint;
|
||||||
USB_Descriptor_Interface_t DCI_Interface;
|
USB_Descriptor_Interface_t CDC_DCI_Interface;
|
||||||
USB_Descriptor_Endpoint_t DataOutEndpoint;
|
USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
|
||||||
USB_Descriptor_Endpoint_t DataInEndpoint;
|
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
|
||||||
USB_Descriptor_Interface_t InterfaceHID;
|
USB_Descriptor_Interface_t HID_Interface;
|
||||||
USB_HID_Descriptor_t MouseHID;
|
USB_HID_Descriptor_t HID_MouseHID;
|
||||||
USB_Descriptor_Endpoint_t MouseEndpoint;
|
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Function Prototypes: */
|
/* Function Prototypes: */
|
||||||
|
|
|
@ -54,7 +54,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
|
||||||
|
|
||||||
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
{
|
{
|
||||||
Config:
|
.Config =
|
||||||
{
|
{
|
||||||
Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},
|
Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
MaxPowerConsumption: USB_CONFIG_POWER_MA(100)
|
MaxPowerConsumption: USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
Interface:
|
.SSHOW_Interface =
|
||||||
{
|
{
|
||||||
Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
|
Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
InterfaceStrIndex: NO_DESCRIPTOR
|
InterfaceStrIndex: NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
DataInEndpoint:
|
.SSHOW_DataInEndpoint =
|
||||||
{
|
{
|
||||||
Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
|
Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
PollingIntervalMS: 0x00
|
PollingIntervalMS: 0x00
|
||||||
},
|
},
|
||||||
|
|
||||||
DataOutEndpoint:
|
.SSHOW_DataOutEndpoint =
|
||||||
{
|
{
|
||||||
Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
|
Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
|
||||||
|
|
||||||
|
|
|
@ -47,9 +47,9 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
USB_Descriptor_Configuration_Header_t Config;
|
||||||
USB_Descriptor_Interface_t Interface;
|
USB_Descriptor_Interface_t SSHOW_Interface;
|
||||||
USB_Descriptor_Endpoint_t DataInEndpoint;
|
USB_Descriptor_Endpoint_t SSHOW_DataInEndpoint;
|
||||||
USB_Descriptor_Endpoint_t DataOutEndpoint;
|
USB_Descriptor_Endpoint_t SSHOW_DataOutEndpoint;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "SideshowCommon.h"
|
#include "SideshowCommon.h"
|
||||||
#include "SideshowApplications.h"
|
#include "SideshowApplications.h"
|
||||||
|
|
|
@ -86,7 +86,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioControlInterface =
|
.Audio_ControlInterface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioControlInterface_SPC =
|
.Audio_ControlInterface_SPC =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_AudioInterface},
|
.Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_AudioInterface},
|
||||||
.Subtype = DSUBTYPE_Header,
|
.Subtype = DSUBTYPE_Header,
|
||||||
|
@ -116,7 +116,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceNumbers = {1},
|
.InterfaceNumbers = {1},
|
||||||
},
|
},
|
||||||
|
|
||||||
.InputTerminal =
|
.Audio_InputTerminal =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Audio_InputTerminal_t), .Type = DTYPE_AudioInterface},
|
.Header = {.Size = sizeof(USB_Audio_InputTerminal_t), .Type = DTYPE_AudioInterface},
|
||||||
.Subtype = DSUBTYPE_InputTerminal,
|
.Subtype = DSUBTYPE_InputTerminal,
|
||||||
|
@ -132,7 +132,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.TerminalStrIndex = NO_DESCRIPTOR
|
.TerminalStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.OutputTerminal =
|
.Audio_OutputTerminal =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Audio_OutputTerminal_t), .Type = DTYPE_AudioInterface},
|
.Header = {.Size = sizeof(USB_Audio_OutputTerminal_t), .Type = DTYPE_AudioInterface},
|
||||||
.Subtype = DSUBTYPE_OutputTerminal,
|
.Subtype = DSUBTYPE_OutputTerminal,
|
||||||
|
@ -146,7 +146,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.TerminalStrIndex = NO_DESCRIPTOR
|
.TerminalStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioStreamInterface_Alt0 =
|
.Audio_StreamInterface_Alt0 =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioStreamInterface_Alt1 =
|
.Audio_StreamInterface_Alt1 =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioStreamInterface_SPC =
|
.Audio_StreamInterface_SPC =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Audio_Interface_AS_t), .Type = DTYPE_AudioInterface},
|
.Header = {.Size = sizeof(USB_Audio_Interface_AS_t), .Type = DTYPE_AudioInterface},
|
||||||
.Subtype = DSUBTYPE_General,
|
.Subtype = DSUBTYPE_General,
|
||||||
|
@ -189,7 +189,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.AudioFormat = 0x0001
|
.AudioFormat = 0x0001
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioFormat =
|
.Audio_AudioFormat =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Audio_Format_t), .Type = DTYPE_AudioInterface},
|
.Header = {.Size = sizeof(USB_Audio_Format_t), .Type = DTYPE_AudioInterface},
|
||||||
.Subtype = DSUBTYPE_Format,
|
.Subtype = DSUBTYPE_Format,
|
||||||
|
@ -199,12 +199,13 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
|
|
||||||
.SubFrameSize = 0x02,
|
.SubFrameSize = 0x02,
|
||||||
.BitResolution = 16,
|
.BitResolution = 16,
|
||||||
.SampleFrequencyType = (sizeof(ConfigurationDescriptor.AudioFormat.SampleFrequencies) / sizeof(Audio_SampleFreq_t)),
|
.SampleFrequencyType = (sizeof(ConfigurationDescriptor.Audio_AudioFormat.SampleFrequencies) /
|
||||||
|
sizeof(Audio_SampleFreq_t)),
|
||||||
|
|
||||||
.SampleFrequencies = {SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY)}
|
.SampleFrequencies = {SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY)}
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioEndpoint =
|
.Audio_StreamEndpoint =
|
||||||
{
|
{
|
||||||
.Endpoint =
|
.Endpoint =
|
||||||
{
|
{
|
||||||
|
@ -220,7 +221,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.SyncEndpointNumber = 0
|
.SyncEndpointNumber = 0
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioEndpoint_SPC =
|
.Audio_StreamEndpoint_SPC =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint},
|
.Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint},
|
||||||
.Subtype = DSUBTYPE_General,
|
.Subtype = DSUBTYPE_General,
|
||||||
|
|
|
@ -299,16 +299,16 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
USB_Descriptor_Configuration_Header_t Config;
|
||||||
USB_Descriptor_Interface_t AudioControlInterface;
|
USB_Descriptor_Interface_t Audio_ControlInterface;
|
||||||
USB_Audio_Interface_AC_t AudioControlInterface_SPC;
|
USB_Audio_Interface_AC_t Audio_ControlInterface_SPC;
|
||||||
USB_Audio_InputTerminal_t InputTerminal;
|
USB_Audio_InputTerminal_t Audio_InputTerminal;
|
||||||
USB_Audio_OutputTerminal_t OutputTerminal;
|
USB_Audio_OutputTerminal_t Audio_OutputTerminal;
|
||||||
USB_Descriptor_Interface_t AudioStreamInterface_Alt0;
|
USB_Descriptor_Interface_t Audio_StreamInterface_Alt0;
|
||||||
USB_Descriptor_Interface_t AudioStreamInterface_Alt1;
|
USB_Descriptor_Interface_t Audio_StreamInterface_Alt1;
|
||||||
USB_Audio_Interface_AS_t AudioStreamInterface_SPC;
|
USB_Audio_Interface_AS_t Audio_StreamInterface_SPC;
|
||||||
USB_Audio_Format_t AudioFormat;
|
USB_Audio_Format_t Audio_AudioFormat;
|
||||||
USB_Audio_StreamEndpoint_Std_t AudioEndpoint;
|
USB_Audio_StreamEndpoint_Std_t Audio_StreamEndpoint;
|
||||||
USB_Audio_StreamEndpoint_Spc_t AudioEndpoint_SPC;
|
USB_Audio_StreamEndpoint_Spc_t Audio_StreamEndpoint_SPC;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Function Prototypes: */
|
/* Function Prototypes: */
|
||||||
|
|
|
@ -86,7 +86,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioControlInterface =
|
.Audio_ControlInterface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioControlInterface_SPC =
|
.Audio_ControlInterface_SPC =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_AudioInterface},
|
.Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_AudioInterface},
|
||||||
.Subtype = DSUBTYPE_Header,
|
.Subtype = DSUBTYPE_Header,
|
||||||
|
@ -116,7 +116,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceNumbers = {1},
|
.InterfaceNumbers = {1},
|
||||||
},
|
},
|
||||||
|
|
||||||
.InputTerminal =
|
.Audio_InputTerminal =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Audio_InputTerminal_t), .Type = DTYPE_AudioInterface},
|
.Header = {.Size = sizeof(USB_Audio_InputTerminal_t), .Type = DTYPE_AudioInterface},
|
||||||
.Subtype = DSUBTYPE_InputTerminal,
|
.Subtype = DSUBTYPE_InputTerminal,
|
||||||
|
@ -132,7 +132,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.TerminalStrIndex = NO_DESCRIPTOR
|
.TerminalStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.OutputTerminal =
|
.Audio_OutputTerminal =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Audio_OutputTerminal_t), .Type = DTYPE_AudioInterface},
|
.Header = {.Size = sizeof(USB_Audio_OutputTerminal_t), .Type = DTYPE_AudioInterface},
|
||||||
.Subtype = DSUBTYPE_OutputTerminal,
|
.Subtype = DSUBTYPE_OutputTerminal,
|
||||||
|
@ -146,7 +146,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.TerminalStrIndex = NO_DESCRIPTOR
|
.TerminalStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioStreamInterface_Alt0 =
|
.Audio_StreamInterface_Alt0 =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioStreamInterface_Alt1 =
|
.Audio_StreamInterface_Alt1 =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioStreamInterface_SPC =
|
.Audio_StreamInterface_SPC =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Audio_Interface_AS_t), .Type = DTYPE_AudioInterface},
|
.Header = {.Size = sizeof(USB_Audio_Interface_AS_t), .Type = DTYPE_AudioInterface},
|
||||||
.Subtype = DSUBTYPE_General,
|
.Subtype = DSUBTYPE_General,
|
||||||
|
@ -189,7 +189,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.AudioFormat = 0x0001
|
.AudioFormat = 0x0001
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioFormat =
|
.Audio_AudioFormat =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Audio_Format_t), .Type = DTYPE_AudioInterface},
|
.Header = {.Size = sizeof(USB_Audio_Format_t), .Type = DTYPE_AudioInterface},
|
||||||
.Subtype = DSUBTYPE_Format,
|
.Subtype = DSUBTYPE_Format,
|
||||||
|
@ -200,11 +200,12 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.SubFrameSize = 0x02,
|
.SubFrameSize = 0x02,
|
||||||
.BitResolution = 16,
|
.BitResolution = 16,
|
||||||
|
|
||||||
.SampleFrequencyType = (sizeof(ConfigurationDescriptor.AudioFormat.SampleFrequencies) / sizeof(Audio_SampleFreq_t)),
|
.SampleFrequencyType = (sizeof(ConfigurationDescriptor.Audio_AudioFormat.SampleFrequencies) /
|
||||||
|
sizeof(Audio_SampleFreq_t)),
|
||||||
.SampleFrequencies = {SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY)}
|
.SampleFrequencies = {SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY)}
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioEndpoint =
|
.Audio_StreamEndpoint =
|
||||||
{
|
{
|
||||||
.Endpoint =
|
.Endpoint =
|
||||||
{
|
{
|
||||||
|
@ -220,7 +221,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.SyncEndpointNumber = 0
|
.SyncEndpointNumber = 0
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioEndpoint_SPC =
|
.Audio_StreamEndpoint_SPC =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint},
|
.Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint},
|
||||||
.Subtype = DSUBTYPE_General,
|
.Subtype = DSUBTYPE_General,
|
||||||
|
|
|
@ -299,16 +299,16 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
USB_Descriptor_Configuration_Header_t Config;
|
||||||
USB_Descriptor_Interface_t AudioControlInterface;
|
USB_Descriptor_Interface_t Audio_ControlInterface;
|
||||||
USB_Audio_Interface_AC_t AudioControlInterface_SPC;
|
USB_Audio_Interface_AC_t Audio_ControlInterface_SPC;
|
||||||
USB_Audio_InputTerminal_t InputTerminal;
|
USB_Audio_InputTerminal_t Audio_InputTerminal;
|
||||||
USB_Audio_OutputTerminal_t OutputTerminal;
|
USB_Audio_OutputTerminal_t Audio_OutputTerminal;
|
||||||
USB_Descriptor_Interface_t AudioStreamInterface_Alt0;
|
USB_Descriptor_Interface_t Audio_StreamInterface_Alt0;
|
||||||
USB_Descriptor_Interface_t AudioStreamInterface_Alt1;
|
USB_Descriptor_Interface_t Audio_StreamInterface_Alt1;
|
||||||
USB_Audio_Interface_AS_t AudioStreamInterface_SPC;
|
USB_Audio_Interface_AS_t Audio_StreamInterface_SPC;
|
||||||
USB_Audio_Format_t AudioFormat;
|
USB_Audio_Format_t Audio_AudioFormat;
|
||||||
USB_Audio_StreamEndpoint_Std_t AudioEndpoint;
|
USB_Audio_StreamEndpoint_Std_t Audio_StreamEndpoint;
|
||||||
USB_Audio_StreamEndpoint_Spc_t AudioEndpoint_SPC;
|
USB_Audio_StreamEndpoint_Spc_t Audio_StreamEndpoint_SPC;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Function Prototypes: */
|
/* Function Prototypes: */
|
||||||
|
|
|
@ -98,7 +98,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.IAD1 =
|
.CDC1_IAD =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_Association_t), .Type = DTYPE_InterfaceAssociation},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_Association_t), .Type = DTYPE_InterfaceAssociation},
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x00
|
.PollingIntervalMS = 0x00
|
||||||
},
|
},
|
||||||
|
|
||||||
.IAD2 =
|
.CDC2_IAD =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_Association_t), .Type = DTYPE_InterfaceAssociation},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_Association_t), .Type = DTYPE_InterfaceAssociation},
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
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;
|
USB_Descriptor_Interface_t CDC1_CCI_Interface;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC1_Functional_IntHeader;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC1_Functional_IntHeader;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC1_Functional_CallManagement;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC1_Functional_CallManagement;
|
||||||
|
@ -99,7 +99,7 @@
|
||||||
USB_Descriptor_Interface_t CDC1_DCI_Interface;
|
USB_Descriptor_Interface_t CDC1_DCI_Interface;
|
||||||
USB_Descriptor_Endpoint_t CDC1_DataOutEndpoint;
|
USB_Descriptor_Endpoint_t CDC1_DataOutEndpoint;
|
||||||
USB_Descriptor_Endpoint_t CDC1_DataInEndpoint;
|
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;
|
USB_Descriptor_Interface_t CDC2_CCI_Interface;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC2_Functional_IntHeader;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC2_Functional_IntHeader;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC2_Functional_CallManagement;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC2_Functional_CallManagement;
|
||||||
|
|
|
@ -112,7 +112,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.Interface =
|
.HID_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.GenericHID =
|
.HID_GenericHID =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},
|
.Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.HIDReportLength = sizeof(GenericReport)
|
.HIDReportLength = sizeof(GenericReport)
|
||||||
},
|
},
|
||||||
|
|
||||||
.GenericINEndpoint =
|
.HID_ReportINEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x0A
|
.PollingIntervalMS = 0x0A
|
||||||
},
|
},
|
||||||
|
|
||||||
.GenericOUTEndpoint =
|
.HID_ReportOUTEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.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;
|
break;
|
||||||
case DTYPE_HID:
|
case DTYPE_HID:
|
||||||
Address = (void*)&ConfigurationDescriptor.GenericHID;
|
Address = (void*)&ConfigurationDescriptor.HID_GenericHID;
|
||||||
Size = sizeof(USB_Descriptor_HID_t);
|
Size = sizeof(USB_Descriptor_HID_t);
|
||||||
break;
|
break;
|
||||||
case DTYPE_Report:
|
case DTYPE_Report:
|
||||||
|
|
|
@ -68,10 +68,10 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
USB_Descriptor_Configuration_Header_t Config;
|
||||||
USB_Descriptor_Interface_t Interface;
|
USB_Descriptor_Interface_t HID_Interface;
|
||||||
USB_Descriptor_HID_t GenericHID;
|
USB_Descriptor_HID_t HID_GenericHID;
|
||||||
USB_Descriptor_Endpoint_t GenericINEndpoint;
|
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
|
||||||
USB_Descriptor_Endpoint_t GenericOUTEndpoint;
|
USB_Descriptor_Endpoint_t HID_ReportOUTEndpoint;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Macros: */
|
/* Macros: */
|
||||||
|
|
|
@ -122,7 +122,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.Interface =
|
.HID_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.JoystickHID =
|
.HID_JoystickHID =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},
|
.Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.HIDReportLength = sizeof(JoystickReport)
|
.HIDReportLength = sizeof(JoystickReport)
|
||||||
},
|
},
|
||||||
|
|
||||||
.JoystickEndpoint =
|
.HID_ReportINEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.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;
|
break;
|
||||||
case DTYPE_HID:
|
case DTYPE_HID:
|
||||||
Address = (void*)&ConfigurationDescriptor.JoystickHID;
|
Address = (void*)&ConfigurationDescriptor.HID_JoystickHID;
|
||||||
Size = sizeof(USB_Descriptor_HID_t);
|
Size = sizeof(USB_Descriptor_HID_t);
|
||||||
break;
|
break;
|
||||||
case DTYPE_Report:
|
case DTYPE_Report:
|
||||||
|
|
|
@ -68,9 +68,9 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
USB_Descriptor_Configuration_Header_t Config;
|
||||||
USB_Descriptor_Interface_t Interface;
|
USB_Descriptor_Interface_t HID_Interface;
|
||||||
USB_Descriptor_HID_t JoystickHID;
|
USB_Descriptor_HID_t HID_JoystickHID;
|
||||||
USB_Descriptor_Endpoint_t JoystickEndpoint;
|
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Macros: */
|
/* Macros: */
|
||||||
|
|
|
@ -129,7 +129,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.Interface =
|
.HID_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.KeyboardHID =
|
.HID_KeyboardHID =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},
|
.Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.HIDReportLength = sizeof(KeyboardReport)
|
.HIDReportLength = sizeof(KeyboardReport)
|
||||||
},
|
},
|
||||||
|
|
||||||
.KeyboardEndpoint =
|
.HID_ReportINEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x0A
|
.PollingIntervalMS = 0x0A
|
||||||
},
|
},
|
||||||
|
|
||||||
.KeyboardLEDsEndpoint =
|
.HID_ReportOUTEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex,
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case DTYPE_HID:
|
case DTYPE_HID:
|
||||||
Address = (void*)&ConfigurationDescriptor.KeyboardHID;
|
Address = (void*)&ConfigurationDescriptor.HID_KeyboardHID;
|
||||||
Size = sizeof(USB_Descriptor_HID_t);
|
Size = sizeof(USB_Descriptor_HID_t);
|
||||||
break;
|
break;
|
||||||
case DTYPE_Report:
|
case DTYPE_Report:
|
||||||
|
|
|
@ -69,10 +69,10 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
USB_Descriptor_Configuration_Header_t Config;
|
||||||
USB_Descriptor_Interface_t Interface;
|
USB_Descriptor_Interface_t HID_Interface;
|
||||||
USB_Descriptor_HID_t KeyboardHID;
|
USB_Descriptor_HID_t HID_KeyboardHID;
|
||||||
USB_Descriptor_Endpoint_t KeyboardEndpoint;
|
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
|
||||||
USB_Descriptor_Endpoint_t KeyboardLEDsEndpoint;
|
USB_Descriptor_Endpoint_t HID_ReportOUTEndpoint;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Macros: */
|
/* Macros: */
|
||||||
|
|
|
@ -162,7 +162,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.KeyboardInterface =
|
.HID1_KeyboardInterface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.KeyboardHID =
|
.HID1_KeyboardHID =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},
|
.Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.HIDReportLength = sizeof(KeyboardReport)
|
.HIDReportLength = sizeof(KeyboardReport)
|
||||||
},
|
},
|
||||||
|
|
||||||
.KeyboardInEndpoint =
|
.HID1_ReportINEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x0A
|
.PollingIntervalMS = 0x0A
|
||||||
},
|
},
|
||||||
|
|
||||||
.KeyboardOutEndpoint =
|
.HID1_ReportOUTEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -209,7 +209,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x0A
|
.PollingIntervalMS = 0x0A
|
||||||
},
|
},
|
||||||
|
|
||||||
.MouseInterface =
|
.HID2_MouseInterface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -225,7 +225,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.MouseHID =
|
.HID2_MouseHID =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},
|
.Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},
|
||||||
|
|
||||||
|
@ -236,7 +236,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.HIDReportLength = sizeof(MouseReport)
|
.HIDReportLength = sizeof(MouseReport)
|
||||||
},
|
},
|
||||||
|
|
||||||
.MouseInEndpoint =
|
.HID2_ReportINEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.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:
|
case DTYPE_HID:
|
||||||
if (!(wIndex))
|
if (!(wIndex))
|
||||||
{
|
{
|
||||||
Address = (void*)&ConfigurationDescriptor.KeyboardHID;
|
Address = (void*)&ConfigurationDescriptor.HID1_KeyboardHID;
|
||||||
Size = sizeof(USB_Descriptor_HID_t);
|
Size = sizeof(USB_Descriptor_HID_t);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Address = (void*)&ConfigurationDescriptor.MouseHID;
|
Address = (void*)&ConfigurationDescriptor.HID2_MouseHID;
|
||||||
Size = sizeof(USB_Descriptor_HID_t);
|
Size = sizeof(USB_Descriptor_HID_t);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -69,13 +69,13 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
USB_Descriptor_Configuration_Header_t Config;
|
||||||
USB_Descriptor_Interface_t KeyboardInterface;
|
USB_Descriptor_Interface_t HID1_KeyboardInterface;
|
||||||
USB_Descriptor_HID_t KeyboardHID;
|
USB_Descriptor_HID_t HID1_KeyboardHID;
|
||||||
USB_Descriptor_Endpoint_t KeyboardInEndpoint;
|
USB_Descriptor_Endpoint_t HID1_ReportINEndpoint;
|
||||||
USB_Descriptor_Endpoint_t KeyboardOutEndpoint;
|
USB_Descriptor_Endpoint_t HID1_ReportOUTEndpoint;
|
||||||
USB_Descriptor_Interface_t MouseInterface;
|
USB_Descriptor_Interface_t HID2_MouseInterface;
|
||||||
USB_Descriptor_HID_t MouseHID;
|
USB_Descriptor_HID_t HID2_MouseHID;
|
||||||
USB_Descriptor_Endpoint_t MouseInEndpoint;
|
USB_Descriptor_Endpoint_t HID2_ReportINEndpoint;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Macros: */
|
/* Macros: */
|
||||||
|
|
|
@ -86,7 +86,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioControlInterface =
|
.Audio_ControlInterface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioControlInterface_SPC =
|
.Audio_ControlInterface_SPC =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_AudioInterface},
|
.Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_AudioInterface},
|
||||||
.Subtype = DSUBTYPE_Header,
|
.Subtype = DSUBTYPE_Header,
|
||||||
|
@ -114,7 +114,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceNumbers = {1},
|
.InterfaceNumbers = {1},
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioStreamInterface =
|
.Audio_StreamInterface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -130,14 +130,15 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.AudioStreamInterface_SPC =
|
.Audio_StreamInterface_SPC =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Audio_Interface_MIDI_AS_t), .Type = DTYPE_AudioInterface},
|
.Header = {.Size = sizeof(USB_Audio_Interface_MIDI_AS_t), .Type = DTYPE_AudioInterface},
|
||||||
.Subtype = DSUBTYPE_General,
|
.Subtype = DSUBTYPE_General,
|
||||||
|
|
||||||
.AudioSpecification = VERSION_BCD(01.00),
|
.AudioSpecification = VERSION_BCD(01.00),
|
||||||
|
|
||||||
.TotalLength = (sizeof(USB_Descriptor_Configuration_t) - offsetof(USB_Descriptor_Configuration_t, AudioStreamInterface_SPC))
|
.TotalLength = (sizeof(USB_Descriptor_Configuration_t) -
|
||||||
|
offsetof(USB_Descriptor_Configuration_t, Audio_StreamInterface_SPC))
|
||||||
},
|
},
|
||||||
|
|
||||||
.MIDI_In_Jack_Emb =
|
.MIDI_In_Jack_Emb =
|
||||||
|
|
|
@ -168,10 +168,10 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
USB_Descriptor_Configuration_Header_t Config;
|
||||||
USB_Descriptor_Interface_t AudioControlInterface;
|
USB_Descriptor_Interface_t Audio_ControlInterface;
|
||||||
USB_Audio_Interface_AC_t AudioControlInterface_SPC;
|
USB_Audio_Interface_AC_t Audio_ControlInterface_SPC;
|
||||||
USB_Descriptor_Interface_t AudioStreamInterface;
|
USB_Descriptor_Interface_t Audio_StreamInterface;
|
||||||
USB_Audio_Interface_MIDI_AS_t AudioStreamInterface_SPC;
|
USB_Audio_Interface_MIDI_AS_t Audio_StreamInterface_SPC;
|
||||||
USB_MIDI_In_Jack_t MIDI_In_Jack_Emb;
|
USB_MIDI_In_Jack_t MIDI_In_Jack_Emb;
|
||||||
USB_MIDI_In_Jack_t MIDI_In_Jack_Ext;
|
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_Emb;
|
||||||
|
|
|
@ -98,7 +98,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.Interface =
|
.MS_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataInEndpoint =
|
.MS_DataInEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x00
|
.PollingIntervalMS = 0x00
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataOutEndpoint =
|
.MS_DataOutEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
|
|
@ -59,9 +59,9 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
USB_Descriptor_Configuration_Header_t Config;
|
||||||
USB_Descriptor_Interface_t Interface;
|
USB_Descriptor_Interface_t MS_Interface;
|
||||||
USB_Descriptor_Endpoint_t DataInEndpoint;
|
USB_Descriptor_Endpoint_t MS_DataInEndpoint;
|
||||||
USB_Descriptor_Endpoint_t DataOutEndpoint;
|
USB_Descriptor_Endpoint_t MS_DataOutEndpoint;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Function Prototypes: */
|
/* Function Prototypes: */
|
||||||
|
|
|
@ -122,7 +122,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.Interface =
|
.HID_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.MouseHID =
|
.HID_MouseHID =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},
|
.Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.HIDReportLength = sizeof(MouseReport)
|
.HIDReportLength = sizeof(MouseReport)
|
||||||
},
|
},
|
||||||
|
|
||||||
.MouseEndpoint =
|
.HID_ReportINEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.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;
|
break;
|
||||||
case DTYPE_HID:
|
case DTYPE_HID:
|
||||||
Address = (void*)&ConfigurationDescriptor.MouseHID;
|
Address = (void*)&ConfigurationDescriptor.HID_MouseHID;
|
||||||
Size = sizeof(USB_Descriptor_HID_t);
|
Size = sizeof(USB_Descriptor_HID_t);
|
||||||
break;
|
break;
|
||||||
case DTYPE_Report:
|
case DTYPE_Report:
|
||||||
|
|
|
@ -68,9 +68,9 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
USB_Descriptor_Configuration_Header_t Config;
|
||||||
USB_Descriptor_Interface_t Interface;
|
USB_Descriptor_Interface_t HID_Interface;
|
||||||
USB_Descriptor_HID_t MouseHID;
|
USB_Descriptor_HID_t HID_MouseHID;
|
||||||
USB_Descriptor_Endpoint_t MouseEndpoint;
|
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Macros: */
|
/* Macros: */
|
||||||
|
|
|
@ -86,7 +86,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.CCI_Interface =
|
.CDC_CCI_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.Data = {0x00, 0x01}
|
.Data = {0x00, 0x01}
|
||||||
},
|
},
|
||||||
|
|
||||||
.ManagementEndpoint =
|
.CDC_ManagementEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x02
|
.PollingIntervalMS = 0x02
|
||||||
},
|
},
|
||||||
|
|
||||||
.DCI_Interface =
|
.CDC_DCI_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataOutEndpoint =
|
.RNDIS_DataOutEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x00
|
.PollingIntervalMS = 0x00
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataInEndpoint =
|
.RNDIS_DataInEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
|
|
@ -80,15 +80,15 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
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_Header;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Header;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_CallManagement;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_CallManagement;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement;
|
CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union;
|
||||||
USB_Descriptor_Endpoint_t ManagementEndpoint;
|
USB_Descriptor_Endpoint_t CDC_ManagementEndpoint;
|
||||||
USB_Descriptor_Interface_t DCI_Interface;
|
USB_Descriptor_Interface_t CDC_DCI_Interface;
|
||||||
USB_Descriptor_Endpoint_t DataOutEndpoint;
|
USB_Descriptor_Endpoint_t RNDIS_DataOutEndpoint;
|
||||||
USB_Descriptor_Endpoint_t DataInEndpoint;
|
USB_Descriptor_Endpoint_t RNDIS_DataInEndpoint;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Function Prototypes: */
|
/* Function Prototypes: */
|
||||||
|
|
|
@ -98,7 +98,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.CCI_Interface =
|
.CDC_CCI_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.Data = {0x00, 0x01}
|
.Data = {0x00, 0x01}
|
||||||
},
|
},
|
||||||
|
|
||||||
.ManagementEndpoint =
|
.CDC_ManagementEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0xFF
|
.PollingIntervalMS = 0xFF
|
||||||
},
|
},
|
||||||
|
|
||||||
.DCI_Interface =
|
.CDC_DCI_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataOutEndpoint =
|
.CDC_DataOutEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x00
|
.PollingIntervalMS = 0x00
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataInEndpoint =
|
.CDC_DataInEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
|
|
@ -80,15 +80,15 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
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_IntHeader;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_CallManagement;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_CallManagement;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement;
|
CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union;
|
||||||
USB_Descriptor_Endpoint_t ManagementEndpoint;
|
USB_Descriptor_Endpoint_t CDC_ManagementEndpoint;
|
||||||
USB_Descriptor_Interface_t DCI_Interface;
|
USB_Descriptor_Interface_t CDC_DCI_Interface;
|
||||||
USB_Descriptor_Endpoint_t DataOutEndpoint;
|
USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
|
||||||
USB_Descriptor_Endpoint_t DataInEndpoint;
|
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Function Prototypes: */
|
/* Function Prototypes: */
|
||||||
|
|
|
@ -122,7 +122,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.Interface =
|
.HID_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.MouseHID =
|
.HID_MouseHID =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
|
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.HIDReportLength = sizeof(MouseReport)
|
.HIDReportLength = sizeof(MouseReport)
|
||||||
},
|
},
|
||||||
|
|
||||||
.MouseEndpoint =
|
.HID_ReportINEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.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;
|
break;
|
||||||
case DTYPE_HID:
|
case DTYPE_HID:
|
||||||
Address = (void*)&ConfigurationDescriptor.MouseHID;
|
Address = (void*)&ConfigurationDescriptor.HID_MouseHID;
|
||||||
Size = sizeof(USB_HID_Descriptor_t);
|
Size = sizeof(USB_HID_Descriptor_t);
|
||||||
break;
|
break;
|
||||||
case DTYPE_Report:
|
case DTYPE_Report:
|
||||||
|
|
|
@ -50,9 +50,9 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
USB_Descriptor_Configuration_Header_t Config;
|
||||||
USB_Descriptor_Interface_t Interface;
|
USB_Descriptor_Interface_t HID_Interface;
|
||||||
USB_HID_Descriptor_t MouseHID;
|
USB_HID_Descriptor_t HID_MouseHID;
|
||||||
USB_Descriptor_Endpoint_t MouseEndpoint;
|
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Macros: */
|
/* Macros: */
|
||||||
|
|
|
@ -147,7 +147,7 @@ int main(void)
|
||||||
(ReportItem->Attributes.Usage.Usage == USAGE_SCROLL_WHEEL) &&
|
(ReportItem->Attributes.Usage.Usage == USAGE_SCROLL_WHEEL) &&
|
||||||
(ReportItem->ItemType == REPORT_ITEM_TYPE_In))
|
(ReportItem->ItemType == REPORT_ITEM_TYPE_In))
|
||||||
{
|
{
|
||||||
int16_t WheelDelta = HID_ALIGN_DATA(ReportItem->Value, int16_t);
|
int16_t WheelDelta = HID_ALIGN_DATA(ReportItem, int16_t);
|
||||||
|
|
||||||
if (WheelDelta)
|
if (WheelDelta)
|
||||||
LEDMask = (LEDS_LED1 | LEDS_LED2 | ((WheelDelta > 0) ? LEDS_LED3 : LEDS_LED4));
|
LEDMask = (LEDS_LED1 | LEDS_LED2 | ((WheelDelta > 0) ? LEDS_LED3 : LEDS_LED4));
|
||||||
|
@ -157,7 +157,7 @@ int main(void)
|
||||||
(ReportItem->Attributes.Usage.Usage == USAGE_Y)) &&
|
(ReportItem->Attributes.Usage.Usage == USAGE_Y)) &&
|
||||||
(ReportItem->ItemType == REPORT_ITEM_TYPE_In))
|
(ReportItem->ItemType == REPORT_ITEM_TYPE_In))
|
||||||
{
|
{
|
||||||
int16_t DeltaMovement = HID_ALIGN_DATA(ReportItem->Value, int16_t);
|
int16_t DeltaMovement = HID_ALIGN_DATA(ReportItem, int16_t);
|
||||||
|
|
||||||
if (ReportItem->Attributes.Usage.Usage == USAGE_X)
|
if (ReportItem->Attributes.Usage.Usage == USAGE_X)
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
* - Added ENABLE_TELNET_SERVER compile time option to the Webserver project to disable the TELNET server if desired
|
* - Added ENABLE_TELNET_SERVER compile time option to the Webserver project to disable the TELNET server if desired
|
||||||
* - Increased throughput of the USBtoSerial demo on systems that send multiple bytes per packet (thanks to Opendous Inc.)
|
* - Increased throughput of the USBtoSerial demo on systems that send multiple bytes per packet (thanks to Opendous Inc.)
|
||||||
* - Double bank CDC endpoints in the XPLAIN Bridge project, re-enable JTAG once the mode selection pin has been sampled.
|
* - Double bank CDC endpoints in the XPLAIN Bridge project, re-enable JTAG once the mode selection pin has been sampled.
|
||||||
|
* - Standardized the naming scheme given to configuration descriptor sub-elements in the Device mode demos, bootloaders
|
||||||
|
* and projects
|
||||||
*
|
*
|
||||||
* <b>Fixed:</b>
|
* <b>Fixed:</b>
|
||||||
* - Fixed software PDI/TPI programming mode in the AVRISP project not correctly toggling just the clock pin
|
* - Fixed software PDI/TPI programming mode in the AVRISP project not correctly toggling just the clock pin
|
||||||
|
|
|
@ -86,7 +86,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.AVRISPInterface =
|
.AVRISP_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataInEndpoint =
|
.AVRISP_DataInEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x00
|
.PollingIntervalMS = 0x00
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataOutEndpoint =
|
.AVRISP_DataOutEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
|
|
@ -56,9 +56,9 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
USB_Descriptor_Configuration_Header_t Config;
|
||||||
USB_Descriptor_Interface_t AVRISPInterface;
|
USB_Descriptor_Interface_t AVRISP_Interface;
|
||||||
USB_Descriptor_Endpoint_t DataInEndpoint;
|
USB_Descriptor_Endpoint_t AVRISP_DataInEndpoint;
|
||||||
USB_Descriptor_Endpoint_t DataOutEndpoint;
|
USB_Descriptor_Endpoint_t AVRISP_DataOutEndpoint;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Function Prototypes: */
|
/* Function Prototypes: */
|
||||||
|
|
|
@ -86,7 +86,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.CCI_Interface =
|
.CDC_CCI_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.Data = {0x00, 0x01}
|
.Data = {0x00, 0x01}
|
||||||
},
|
},
|
||||||
|
|
||||||
.ManagementEndpoint =
|
.CDC_ManagementEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0xFF
|
.PollingIntervalMS = 0xFF
|
||||||
},
|
},
|
||||||
|
|
||||||
.DCI_Interface =
|
.CDC_DCI_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataOutEndpoint =
|
.CDC_DataOutEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x00
|
.PollingIntervalMS = 0x00
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataInEndpoint =
|
.CDC_DataInEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
|
|
@ -66,15 +66,15 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
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_IntHeader;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_CallManagement;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_CallManagement;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement;
|
CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union;
|
||||||
USB_Descriptor_Endpoint_t ManagementEndpoint;
|
USB_Descriptor_Endpoint_t CDC_ManagementEndpoint;
|
||||||
USB_Descriptor_Interface_t DCI_Interface;
|
USB_Descriptor_Interface_t CDC_DCI_Interface;
|
||||||
USB_Descriptor_Endpoint_t DataOutEndpoint;
|
USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
|
||||||
USB_Descriptor_Endpoint_t DataInEndpoint;
|
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Function Prototypes: */
|
/* Function Prototypes: */
|
||||||
|
|
|
@ -100,7 +100,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.MSInterface =
|
.MS_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.MSDataInEndpoint =
|
.MS_DataInEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x00
|
.PollingIntervalMS = 0x00
|
||||||
},
|
},
|
||||||
|
|
||||||
.MSDataOutEndpoint =
|
.MS_DataOutEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
|
|
@ -76,9 +76,9 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
USB_Descriptor_Configuration_Header_t Config;
|
||||||
USB_Descriptor_Interface_t MSInterface;
|
USB_Descriptor_Interface_t MS_Interface;
|
||||||
USB_Descriptor_Endpoint_t MSDataInEndpoint;
|
USB_Descriptor_Endpoint_t MS_DataInEndpoint;
|
||||||
USB_Descriptor_Endpoint_t MSDataOutEndpoint;
|
USB_Descriptor_Endpoint_t MS_DataOutEndpoint;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Function Prototypes: */
|
/* Function Prototypes: */
|
||||||
|
|
|
@ -98,7 +98,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.CCI_Interface =
|
.CDC_CCI_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.Data = {0x00, 0x01}
|
.Data = {0x00, 0x01}
|
||||||
},
|
},
|
||||||
|
|
||||||
.ManagementEndpoint =
|
.CDC_ManagementEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0xFF
|
.PollingIntervalMS = 0xFF
|
||||||
},
|
},
|
||||||
|
|
||||||
.DCI_Interface =
|
.CDC_DCI_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataOutEndpoint =
|
.CDC_DataOutEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x00
|
.PollingIntervalMS = 0x00
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataInEndpoint =
|
.CDC_DataInEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
|
|
@ -66,15 +66,15 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
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_IntHeader;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_CallManagement;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_CallManagement;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement;
|
CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union;
|
||||||
USB_Descriptor_Endpoint_t ManagementEndpoint;
|
USB_Descriptor_Endpoint_t CDC_ManagementEndpoint;
|
||||||
USB_Descriptor_Interface_t DCI_Interface;
|
USB_Descriptor_Interface_t CDC_DCI_Interface;
|
||||||
USB_Descriptor_Endpoint_t DataOutEndpoint;
|
USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
|
||||||
USB_Descriptor_Endpoint_t DataInEndpoint;
|
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Function Prototypes: */
|
/* Function Prototypes: */
|
||||||
|
|
|
@ -120,7 +120,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.Interface =
|
.HID_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.KeyboardHID =
|
.HID_KeyboardHID =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
|
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.HIDReportLength = sizeof(KeyboardReport)
|
.HIDReportLength = sizeof(KeyboardReport)
|
||||||
},
|
},
|
||||||
|
|
||||||
.KeyboardEndpoint =
|
.HID_ReportINEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -233,7 +233,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex,
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case DTYPE_HID:
|
case DTYPE_HID:
|
||||||
Address = (void*)&ConfigurationDescriptor.KeyboardHID;
|
Address = (void*)&ConfigurationDescriptor.HID_KeyboardHID;
|
||||||
Size = sizeof(USB_HID_Descriptor_t);
|
Size = sizeof(USB_HID_Descriptor_t);
|
||||||
break;
|
break;
|
||||||
case DTYPE_Report:
|
case DTYPE_Report:
|
||||||
|
|
|
@ -51,9 +51,9 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config; /**< Configuration descriptor header structure */
|
USB_Descriptor_Configuration_Header_t Config; /**< Configuration descriptor header structure */
|
||||||
USB_Descriptor_Interface_t Interface; /**< Keyboard interface descriptor */
|
USB_Descriptor_Interface_t HID_Interface; /**< Keyboard interface descriptor */
|
||||||
USB_HID_Descriptor_t KeyboardHID; /**< Keyboard HID descriptor */
|
USB_HID_Descriptor_t HID_KeyboardHID; /**< Keyboard HID descriptor */
|
||||||
USB_Descriptor_Endpoint_t KeyboardEndpoint; /**< Keyboard key report endpoint descriptor */
|
USB_Descriptor_Endpoint_t HID_ReportINEndpoint; /**< Keyboard key report endpoint descriptor */
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Macros: */
|
/* Macros: */
|
||||||
|
|
|
@ -124,7 +124,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.MSInterface =
|
.MS_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.MSDataInEndpoint =
|
.MS_DataInEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x00
|
.PollingIntervalMS = 0x00
|
||||||
},
|
},
|
||||||
|
|
||||||
.MSDataOutEndpoint =
|
.MS_DataOutEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x00
|
.PollingIntervalMS = 0x00
|
||||||
},
|
},
|
||||||
|
|
||||||
.HIDInterface =
|
.HID_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.HIDInfo =
|
.HID_GenericHID =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
|
.Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},
|
||||||
|
|
||||||
|
@ -187,7 +187,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.HIDReportLength = sizeof(GenericReport)
|
.HIDReportLength = sizeof(GenericReport)
|
||||||
},
|
},
|
||||||
|
|
||||||
.HIDDataInEndpoint =
|
.HID_ReportINEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -274,7 +274,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex,
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case DTYPE_HID:
|
case DTYPE_HID:
|
||||||
Address = (void*)&ConfigurationDescriptor.HIDInfo;
|
Address = (void*)&ConfigurationDescriptor.HID_GenericHID;
|
||||||
Size = sizeof(USB_HID_Descriptor_t);
|
Size = sizeof(USB_HID_Descriptor_t);
|
||||||
break;
|
break;
|
||||||
case DTYPE_Report:
|
case DTYPE_Report:
|
||||||
|
|
|
@ -45,12 +45,12 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
USB_Descriptor_Configuration_Header_t Config;
|
||||||
USB_Descriptor_Interface_t MSInterface;
|
USB_Descriptor_Interface_t MS_Interface;
|
||||||
USB_Descriptor_Endpoint_t MSDataInEndpoint;
|
USB_Descriptor_Endpoint_t MS_DataInEndpoint;
|
||||||
USB_Descriptor_Endpoint_t MSDataOutEndpoint;
|
USB_Descriptor_Endpoint_t MS_DataOutEndpoint;
|
||||||
USB_Descriptor_Interface_t HIDInterface;
|
USB_Descriptor_Interface_t HID_Interface;
|
||||||
USB_HID_Descriptor_t HIDInfo;
|
USB_HID_Descriptor_t HID_GenericHID;
|
||||||
USB_Descriptor_Endpoint_t HIDDataInEndpoint;
|
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Function Prototypes: */
|
/* Function Prototypes: */
|
||||||
|
|
|
@ -98,7 +98,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.CCI_Interface =
|
.CDC_CCI_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.Data = {0x00, 0x01}
|
.Data = {0x00, 0x01}
|
||||||
},
|
},
|
||||||
|
|
||||||
.ManagementEndpoint =
|
.CDC_ManagementEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0xFF
|
.PollingIntervalMS = 0xFF
|
||||||
},
|
},
|
||||||
|
|
||||||
.DCI_Interface =
|
.CDC_DCI_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataOutEndpoint =
|
.CDC_DataOutEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x00
|
.PollingIntervalMS = 0x00
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataInEndpoint =
|
.CDC_DataInEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
|
|
@ -66,15 +66,15 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
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_IntHeader;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_CallManagement;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_CallManagement;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement;
|
CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union;
|
||||||
USB_Descriptor_Endpoint_t ManagementEndpoint;
|
USB_Descriptor_Endpoint_t CDC_ManagementEndpoint;
|
||||||
USB_Descriptor_Interface_t DCI_Interface;
|
USB_Descriptor_Interface_t CDC_DCI_Interface;
|
||||||
USB_Descriptor_Endpoint_t DataOutEndpoint;
|
USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
|
||||||
USB_Descriptor_Endpoint_t DataInEndpoint;
|
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Function Prototypes: */
|
/* Function Prototypes: */
|
||||||
|
|
|
@ -98,7 +98,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.Interface =
|
.MS_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataInEndpoint =
|
.MS_DataInEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x00
|
.PollingIntervalMS = 0x00
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataOutEndpoint =
|
.MS_DataOutEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
|
|
@ -60,9 +60,9 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
USB_Descriptor_Configuration_Header_t Config;
|
||||||
USB_Descriptor_Interface_t Interface;
|
USB_Descriptor_Interface_t MS_Interface;
|
||||||
USB_Descriptor_Endpoint_t DataInEndpoint;
|
USB_Descriptor_Endpoint_t MS_DataInEndpoint;
|
||||||
USB_Descriptor_Endpoint_t DataOutEndpoint;
|
USB_Descriptor_Endpoint_t MS_DataOutEndpoint;
|
||||||
} USB_Descriptor_Configuration_t;
|
} USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Function Prototypes: */
|
/* Function Prototypes: */
|
||||||
|
|
|
@ -86,7 +86,7 @@ AVRISP_USB_Descriptor_Configuration_t PROGMEM AVRISP_ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.AVRISPInterface =
|
.AVRISP_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ AVRISP_USB_Descriptor_Configuration_t PROGMEM AVRISP_ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataInEndpoint =
|
.AVRISP_DataInEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ AVRISP_USB_Descriptor_Configuration_t PROGMEM AVRISP_ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x00
|
.PollingIntervalMS = 0x00
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataOutEndpoint =
|
.AVRISP_DataOutEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
|
|
@ -56,9 +56,9 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
USB_Descriptor_Configuration_Header_t Config;
|
||||||
USB_Descriptor_Interface_t AVRISPInterface;
|
USB_Descriptor_Interface_t AVRISP_Interface;
|
||||||
USB_Descriptor_Endpoint_t DataInEndpoint;
|
USB_Descriptor_Endpoint_t AVRISP_DataInEndpoint;
|
||||||
USB_Descriptor_Endpoint_t DataOutEndpoint;
|
USB_Descriptor_Endpoint_t AVRISP_DataOutEndpoint;
|
||||||
} AVRISP_USB_Descriptor_Configuration_t;
|
} AVRISP_USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Function Prototypes: */
|
/* Function Prototypes: */
|
||||||
|
|
|
@ -98,7 +98,7 @@ USART_USB_Descriptor_Configuration_t PROGMEM USART_ConfigurationDescriptor =
|
||||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||||
},
|
},
|
||||||
|
|
||||||
.CCI_Interface =
|
.CDC_CCI_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ USART_USB_Descriptor_Configuration_t PROGMEM USART_ConfigurationDescriptor =
|
||||||
.Data = {0x00, 0x01}
|
.Data = {0x00, 0x01}
|
||||||
},
|
},
|
||||||
|
|
||||||
.ManagementEndpoint =
|
.CDC_ManagementEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ USART_USB_Descriptor_Configuration_t PROGMEM USART_ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0xFF
|
.PollingIntervalMS = 0xFF
|
||||||
},
|
},
|
||||||
|
|
||||||
.DCI_Interface =
|
.CDC_DCI_Interface =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ USART_USB_Descriptor_Configuration_t PROGMEM USART_ConfigurationDescriptor =
|
||||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataOutEndpoint =
|
.CDC_DataOutEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ USART_USB_Descriptor_Configuration_t PROGMEM USART_ConfigurationDescriptor =
|
||||||
.PollingIntervalMS = 0x00
|
.PollingIntervalMS = 0x00
|
||||||
},
|
},
|
||||||
|
|
||||||
.DataInEndpoint =
|
.CDC_DataInEndpoint =
|
||||||
{
|
{
|
||||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||||
|
|
||||||
|
|
|
@ -66,15 +66,15 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
USB_Descriptor_Configuration_Header_t Config;
|
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_IntHeader;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_CallManagement;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_CallManagement;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement;
|
CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement;
|
||||||
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union;
|
CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union;
|
||||||
USB_Descriptor_Endpoint_t ManagementEndpoint;
|
USB_Descriptor_Endpoint_t CDC_ManagementEndpoint;
|
||||||
USB_Descriptor_Interface_t DCI_Interface;
|
USB_Descriptor_Interface_t CDC_DCI_Interface;
|
||||||
USB_Descriptor_Endpoint_t DataOutEndpoint;
|
USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
|
||||||
USB_Descriptor_Endpoint_t DataInEndpoint;
|
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
|
||||||
} USART_USB_Descriptor_Configuration_t;
|
} USART_USB_Descriptor_Configuration_t;
|
||||||
|
|
||||||
/* Function Prototypes: */
|
/* Function Prototypes: */
|
||||||
|
|
|
@ -47,20 +47,21 @@
|
||||||
* \section SSec_Description Project Description:
|
* \section SSec_Description Project Description:
|
||||||
*
|
*
|
||||||
* This project serves a dual purpose. When loaded into the USB AVR on the XPLAIN board, it will act as either a USB to Serial
|
* This project serves a dual purpose. When loaded into the USB AVR on the XPLAIN board, it will act as either a USB to Serial
|
||||||
* converter for the XPLAIN's hardware USART (at a speed of 9600 baud), or a PDI programmer for the XMEGA. This project replaces
|
* converter for the XPLAIN's hardware USART (at a speed of 9600 baud), or an AVRStudio compaible PDI programmer for the XMEGA.
|
||||||
* the firmware preloaded onto the XPLAIN's onboard AT90USB1287 microcontroller.
|
* This project replaces the firmware preloaded onto the XPLAIN's onboard AT90USB1287 microcontroller.
|
||||||
*
|
*
|
||||||
* When inserted, the JTAG port's TDI pin is read. If the pin is left high, the device will enumerate as a regular COM port on
|
* When power to the board is applied, the TDI pin (pin 9) of the USB AVR's JTAG port is read. If the pin is left high, the device
|
||||||
* the host, which can then be opened and data exchanged between the XMEGA and Host as if the XMEGA was connected directly to
|
* will enumerate as a regular COM port on the host, which can then be opened and data exchanged between the XMEGA and Host as if
|
||||||
* the host's serial port. If the pin is pulled low, the device will enumerate as an AVRISP-MKII to the host, so that the XMEGA
|
* the XMEGA was connected directly to the host's serial port. If the pin is pulled low by shorting it to GND (pin 10), the device
|
||||||
* can be reprogrammed by AVRStudio or other compatible software such as avrdude.
|
* will enumerate as an AVRISP-MKII to the host, so that the XMEGA can be reprogrammed by AVRStudio or other compatible software
|
||||||
|
* such as avrdude.
|
||||||
*
|
*
|
||||||
* After running this project for the first time on a new computer, you will need to supply the .INF file located in this project
|
* After running this project for the first time on a new computer, you will need to supply the .INF file located in this project
|
||||||
* project's directory as the device's driver when running under Windows. This will enable Windows to use its inbuilt CDC drivers,
|
* project's directory as the device's driver when running under Windows. This will enable Windows to use its inbuilt CDC drivers,
|
||||||
* negating the need for custom drivers for the device. Other Operating Systems should automatically use their own inbuilt CDC-ACM
|
* negating the need for custom drivers for the device. Other Operating Systems should automatically use their own inbuilt CDC-ACM
|
||||||
* drivers.
|
* drivers.
|
||||||
*
|
*
|
||||||
* This project relies on files from the LUFA AVRISP-MKII project.
|
* This project relies on files from the LUFA AVRISP-MKII project for compilation.
|
||||||
*
|
*
|
||||||
* \section SSec_Options Project Options
|
* \section SSec_Options Project Options
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue