\r
.AudioControlInterface_SPC = \r
{\r
- .Header = {.Size = sizeof(USB_AudioInterface_AC_t), .Type = DTYPE_AudioInterface},\r
+ .Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_AudioInterface},\r
.Subtype = DSUBTYPE_Header,\r
\r
.ACSpecification = VERSION_BCD(01.00),\r
- .TotalLength = (sizeof(USB_AudioInterface_AC_t) +\r
- sizeof(USB_AudioInputTerminal_t) +\r
- sizeof(USB_AudioOutputTerminal_t)),\r
+ .TotalLength = (sizeof(USB_Audio_Interface_AC_t) +\r
+ sizeof(USB_Audio_InputTerminal_t) +\r
+ sizeof(USB_Audio_OutputTerminal_t)),\r
\r
.InCollection = 1,\r
.InterfaceNumbers = {1},\r
\r
.InputTerminal = \r
{\r
- .Header = {.Size = sizeof(USB_AudioInputTerminal_t), .Type = DTYPE_AudioInterface},\r
+ .Header = {.Size = sizeof(USB_Audio_InputTerminal_t), .Type = DTYPE_AudioInterface},\r
.Subtype = DSUBTYPE_InputTerminal,\r
\r
.TerminalID = 0x01,\r
\r
.OutputTerminal = \r
{\r
- .Header = {.Size = sizeof(USB_AudioOutputTerminal_t), .Type = DTYPE_AudioInterface},\r
+ .Header = {.Size = sizeof(USB_Audio_OutputTerminal_t), .Type = DTYPE_AudioInterface},\r
.Subtype = DSUBTYPE_OutputTerminal,\r
\r
.TerminalID = 0x02,\r
\r
.AudioStreamInterface_SPC = \r
{\r
- .Header = {.Size = sizeof(USB_AudioInterface_AS_t), .Type = DTYPE_AudioInterface},\r
+ .Header = {.Size = sizeof(USB_Audio_Interface_AS_t), .Type = DTYPE_AudioInterface},\r
.Subtype = DSUBTYPE_General,\r
\r
.TerminalLink = 0x02,\r
\r
.AudioFormat = \r
{\r
- .Header = {.Size = sizeof(USB_AudioFormat_t), .Type = DTYPE_AudioInterface},\r
+ .Header = {.Size = sizeof(USB_Audio_Format_t), .Type = DTYPE_AudioInterface},\r
.Subtype = DSUBTYPE_Format,\r
\r
.FormatType = 0x01,\r
\r
.SubFrameSize = 0x02,\r
.BitResolution = 16,\r
- .SampleFrequencyType = (sizeof(ConfigurationDescriptor.AudioFormat.SampleFrequencies) / sizeof(AudioSampleFreq_t)),\r
+ .SampleFrequencyType = (AUDIO_TOTAL_SAMPLE_RATES * sizeof(USB_Audio_SampleFreq_t)),\r
\r
.SampleFrequencies = {AUDIO_SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY)}\r
},\r
{\r
.Endpoint = \r
{\r
- .Header = {.Size = sizeof(USB_AudioStreamEndpoint_Std_t), .Type = DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},\r
\r
.EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | AUDIO_STREAM_EPNUM),\r
.Attributes = (EP_TYPE_ISOCHRONOUS | ENDPOINT_ATTR_SYNC | ENDPOINT_USAGE_DATA),\r
\r
.AudioEndpoint_SPC = \r
{\r
- .Header = {.Size = sizeof(USB_AudioStreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint},\r
+ .Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint},\r
.Subtype = DSUBTYPE_General,\r
\r
.Attributes = 0x00,\r
{\r
USB_Descriptor_Configuration_Header_t Config;\r
USB_Descriptor_Interface_t AudioControlInterface;\r
- USB_AudioInterface_AC_t AudioControlInterface_SPC;\r
- USB_AudioInputTerminal_t InputTerminal;\r
- USB_AudioOutputTerminal_t OutputTerminal;\r
+ USB_Audio_Interface_AC_t AudioControlInterface_SPC;\r
+ USB_Audio_InputTerminal_t InputTerminal;\r
+ USB_Audio_OutputTerminal_t OutputTerminal;\r
USB_Descriptor_Interface_t AudioStreamInterface_Alt0;\r
USB_Descriptor_Interface_t AudioStreamInterface_Alt1;\r
- USB_AudioInterface_AS_t AudioStreamInterface_SPC;\r
- USB_AudioFormat_t AudioFormat;\r
- USB_AudioStreamEndpoint_Std_t AudioEndpoint;\r
- USB_AudioStreamEndpoint_Spc_t AudioEndpoint_SPC;\r
+ USB_Audio_Interface_AS_t AudioStreamInterface_SPC;\r
+ USB_Audio_Format_t AudioFormat;\r
+ USB_Audio_StreamEndpoint_Std_t AudioEndpoint;\r
+ USB_Audio_StreamEndpoint_Spc_t AudioEndpoint_SPC;\r
} USB_Descriptor_Configuration_t;\r
\r
/* Function Prototypes: */\r
\r
.AudioControlInterface_SPC = \r
{\r
- .Header = {.Size = sizeof(USB_AudioInterface_AC_t), .Type = DTYPE_AudioInterface},\r
+ .Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_AudioInterface},\r
.Subtype = DSUBTYPE_Header,\r
\r
.ACSpecification = VERSION_BCD(01.00),\r
- .TotalLength = (sizeof(USB_AudioInterface_AC_t) +\r
- sizeof(USB_AudioInputTerminal_t) +\r
- sizeof(USB_AudioOutputTerminal_t)),\r
+ .TotalLength = (sizeof(USB_Audio_Interface_AC_t) +\r
+ sizeof(USB_Audio_InputTerminal_t) +\r
+ sizeof(USB_Audio_OutputTerminal_t)),\r
\r
.InCollection = 1,\r
.InterfaceNumbers = {1},\r
\r
.InputTerminal = \r
{\r
- .Header = {.Size = sizeof(USB_AudioInputTerminal_t), .Type = DTYPE_AudioInterface},\r
+ .Header = {.Size = sizeof(USB_Audio_InputTerminal_t), .Type = DTYPE_AudioInterface},\r
.Subtype = DSUBTYPE_InputTerminal,\r
\r
.TerminalID = 0x01,\r
\r
.OutputTerminal = \r
{\r
- .Header = {.Size = sizeof(USB_AudioOutputTerminal_t), .Type = DTYPE_AudioInterface},\r
+ .Header = {.Size = sizeof(USB_Audio_OutputTerminal_t), .Type = DTYPE_AudioInterface},\r
.Subtype = DSUBTYPE_OutputTerminal,\r
\r
.TerminalID = 0x02,\r
\r
.AudioStreamInterface_SPC = \r
{\r
- .Header = {.Size = sizeof(USB_AudioInterface_AS_t), .Type = DTYPE_AudioInterface},\r
+ .Header = {.Size = sizeof(USB_Audio_Interface_AS_t), .Type = DTYPE_AudioInterface},\r
.Subtype = DSUBTYPE_General,\r
\r
.TerminalLink = 0x01,\r
\r
.AudioFormat = \r
{\r
- .Header = {.Size = sizeof(USB_AudioFormat_t), .Type = DTYPE_AudioInterface},\r
+ .Header = {.Size = sizeof(USB_Audio_Format_t), .Type = DTYPE_AudioInterface},\r
.Subtype = DSUBTYPE_Format,\r
\r
.FormatType = 0x01,\r
.SubFrameSize = 0x02,\r
.BitResolution = 16,\r
\r
- .SampleFrequencyType = (sizeof(ConfigurationDescriptor.AudioFormat.SampleFrequencies) / sizeof(AudioSampleFreq_t)), \r
+ .SampleFrequencyType = (AUDIO_TOTAL_SAMPLE_RATES * sizeof(USB_Audio_SampleFreq_t)), \r
.SampleFrequencies = {AUDIO_SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY)}\r
},\r
\r
{\r
.Endpoint = \r
{\r
- .Header = {.Size = sizeof(USB_AudioStreamEndpoint_Std_t), .Type = DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},\r
\r
.EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | AUDIO_STREAM_EPNUM),\r
.Attributes = (EP_TYPE_ISOCHRONOUS | ENDPOINT_ATTR_SYNC | ENDPOINT_USAGE_DATA),\r
\r
.AudioEndpoint_SPC = \r
{\r
- .Header = {.Size = sizeof(USB_AudioStreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint},\r
+ .Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint},\r
.Subtype = DSUBTYPE_General,\r
\r
.Attributes = EP_ACCEPTS_SMALL_PACKETS,\r
{\r
USB_Descriptor_Configuration_Header_t Config;\r
USB_Descriptor_Interface_t AudioControlInterface;\r
- USB_AudioInterface_AC_t AudioControlInterface_SPC;\r
- USB_AudioInputTerminal_t InputTerminal;\r
- USB_AudioOutputTerminal_t OutputTerminal;\r
+ USB_Audio_Interface_AC_t AudioControlInterface_SPC;\r
+ USB_Audio_InputTerminal_t InputTerminal;\r
+ USB_Audio_OutputTerminal_t OutputTerminal;\r
USB_Descriptor_Interface_t AudioStreamInterface_Alt0;\r
USB_Descriptor_Interface_t AudioStreamInterface_Alt1;\r
- USB_AudioInterface_AS_t AudioStreamInterface_SPC;\r
- USB_AudioFormat_t AudioFormat;\r
- USB_AudioStreamEndpoint_Std_t AudioEndpoint;\r
- USB_AudioStreamEndpoint_Spc_t AudioEndpoint_SPC;\r
+ USB_Audio_Interface_AS_t AudioStreamInterface_SPC;\r
+ USB_Audio_Format_t AudioFormat;\r
+ USB_Audio_StreamEndpoint_Std_t AudioEndpoint;\r
+ USB_Audio_StreamEndpoint_Spc_t AudioEndpoint_SPC;\r
} USB_Descriptor_Configuration_t;\r
\r
/* Function Prototypes: */\r
\r
.GenericHID = \r
{\r
- .Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},\r
+ .Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},\r
\r
.HIDSpec = VERSION_BCD(01.11),\r
.CountryCode = 0x00,\r
break;\r
case DTYPE_HID: \r
Address = (void*)&ConfigurationDescriptor.GenericHID;\r
- Size = sizeof(USB_Descriptor_HID_t);\r
+ Size = sizeof(USB_HID_Descriptor_t);\r
break;\r
case DTYPE_Report: \r
Address = (void*)&GenericReport;\r
{\r
USB_Descriptor_Configuration_Header_t Config;\r
USB_Descriptor_Interface_t Interface;\r
- USB_Descriptor_HID_t GenericHID;\r
+ USB_HID_Descriptor_t GenericHID;\r
USB_Descriptor_Endpoint_t GenericINEndpoint;\r
} USB_Descriptor_Configuration_t;\r
\r
\r
.JoystickHID = \r
{\r
- .Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},\r
+ .Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},\r
\r
.HIDSpec = VERSION_BCD(01.11),\r
.CountryCode = 0x00,\r
break;\r
case DTYPE_HID: \r
Address = (void*)&ConfigurationDescriptor.JoystickHID;\r
- Size = sizeof(USB_Descriptor_HID_t);\r
+ Size = sizeof(USB_HID_Descriptor_t);\r
break;\r
case DTYPE_Report: \r
Address = (void*)&JoystickReport;\r
{\r
USB_Descriptor_Configuration_Header_t Config;\r
USB_Descriptor_Interface_t Interface;\r
- USB_Descriptor_HID_t JoystickHID;\r
+ USB_HID_Descriptor_t JoystickHID;\r
USB_Descriptor_Endpoint_t JoystickEndpoint;\r
} USB_Descriptor_Configuration_t;\r
\r
\r
.KeyboardHID = \r
{ \r
- .Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},\r
+ .Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},\r
\r
.HIDSpec = VERSION_BCD(01.11),\r
.CountryCode = 0x00,\r
break;\r
case DTYPE_HID: \r
Address = (void*)&ConfigurationDescriptor.KeyboardHID;\r
- Size = sizeof(USB_Descriptor_HID_t);\r
+ Size = sizeof(USB_HID_Descriptor_t);\r
break;\r
case DTYPE_Report: \r
Address = (void*)&KeyboardReport;\r
{\r
USB_Descriptor_Configuration_Header_t Config;\r
USB_Descriptor_Interface_t Interface;\r
- USB_Descriptor_HID_t KeyboardHID;\r
+ USB_HID_Descriptor_t KeyboardHID;\r
USB_Descriptor_Endpoint_t KeyboardEndpoint;\r
} USB_Descriptor_Configuration_t;\r
\r
\r
.KeyboardHID = \r
{ \r
- .Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},\r
+ .Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},\r
\r
.HIDSpec = VERSION_BCD(01.11),\r
.CountryCode = 0x00,\r
\r
.MouseHID = \r
{ \r
- .Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},\r
+ .Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},\r
\r
.HIDSpec = VERSION_BCD(01.11),\r
.CountryCode = 0x00,\r
if (!(wIndex))\r
{\r
Address = (void*)&ConfigurationDescriptor.KeyboardHID;\r
- Size = sizeof(USB_Descriptor_HID_t);\r
+ Size = sizeof(USB_HID_Descriptor_t);\r
}\r
else\r
{\r
Address = (void*)&ConfigurationDescriptor.MouseHID;\r
- Size = sizeof(USB_Descriptor_HID_t); \r
+ Size = sizeof(USB_HID_Descriptor_t); \r
}\r
break;\r
case DTYPE_Report: \r
{\r
USB_Descriptor_Configuration_Header_t Config;\r
USB_Descriptor_Interface_t KeyboardInterface;\r
- USB_Descriptor_HID_t KeyboardHID;\r
+ USB_HID_Descriptor_t KeyboardHID;\r
USB_Descriptor_Endpoint_t KeyboardInEndpoint;\r
USB_Descriptor_Interface_t MouseInterface;\r
- USB_Descriptor_HID_t MouseHID;\r
+ USB_HID_Descriptor_t MouseHID;\r
USB_Descriptor_Endpoint_t MouseInEndpoint;\r
} USB_Descriptor_Configuration_t;\r
\r
\r
.AudioControlInterface_SPC = \r
{\r
- .Header = {.Size = sizeof(USB_AudioInterface_AC_t), .Type = DTYPE_AudioInterface},\r
+ .Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_AudioInterface},\r
.Subtype = DSUBTYPE_Header,\r
\r
.ACSpecification = VERSION_BCD(01.00),\r
- .TotalLength = sizeof(USB_AudioInterface_AC_t),\r
+ .TotalLength = sizeof(USB_Audio_Interface_AC_t),\r
\r
.InCollection = 1,\r
.InterfaceNumbers = {1},\r
\r
.AudioStreamInterface_SPC = \r
{\r
- .Header = {.Size = sizeof(USB_AudioInterface_MIDI_AS_t), .Type = DTYPE_AudioInterface},\r
+ .Header = {.Size = sizeof(USB_MIDI_AudioInterface_AS_t), .Type = DTYPE_AudioInterface},\r
.Subtype = DSUBTYPE_General,\r
\r
.AudioSpecification = VERSION_BCD(01.00),\r
{\r
.Endpoint = \r
{\r
- .Header = {.Size = sizeof(USB_AudioStreamEndpoint_Std_t), .Type = DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},\r
\r
.EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | MIDI_STREAM_OUT_EPNUM),\r
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),\r
{\r
.Endpoint = \r
{\r
- .Header = {.Size = sizeof(USB_AudioStreamEndpoint_Std_t), .Type = DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},\r
\r
.EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | MIDI_STREAM_IN_EPNUM),\r
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),\r
{\r
USB_Descriptor_Configuration_Header_t Config;\r
USB_Descriptor_Interface_t AudioControlInterface;\r
- USB_AudioInterface_AC_t AudioControlInterface_SPC;\r
+ USB_Audio_Interface_AC_t AudioControlInterface_SPC;\r
USB_Descriptor_Interface_t AudioStreamInterface;\r
- USB_AudioInterface_MIDI_AS_t AudioStreamInterface_SPC;\r
+ USB_MIDI_AudioInterface_AS_t AudioStreamInterface_SPC;\r
USB_MIDI_In_Jack_t MIDI_In_Jack_Emb;\r
USB_MIDI_In_Jack_t MIDI_In_Jack_Ext;\r
USB_MIDI_Out_Jack_t MIDI_Out_Jack_Emb;\r
USB_MIDI_Out_Jack_t MIDI_Out_Jack_Ext;\r
- USB_AudioStreamEndpoint_Std_t MIDI_In_Jack_Endpoint;\r
+ USB_Audio_StreamEndpoint_Std_t MIDI_In_Jack_Endpoint;\r
USB_MIDI_Jack_Endpoint_t MIDI_In_Jack_Endpoint_SPC;\r
- USB_AudioStreamEndpoint_Std_t MIDI_Out_Jack_Endpoint;\r
+ USB_Audio_StreamEndpoint_Std_t MIDI_Out_Jack_Endpoint;\r
USB_MIDI_Jack_Endpoint_t MIDI_Out_Jack_Endpoint_SPC;\r
} USB_Descriptor_Configuration_t;\r
\r
{\r
CheckJoystickMovement();\r
\r
- USB_MIDI_EventPacket_t DummyMIDIEvent;\r
+ MIDI_EventPacket_t DummyMIDIEvent;\r
MIDI_Device_ReceiveEventPacket(&Keyboard_MIDI_Interface, &DummyMIDIEvent);\r
\r
MIDI_Device_USBTask(&Keyboard_MIDI_Interface);\r
\r
if (MIDICommand)\r
{\r
- USB_MIDI_EventPacket_t MIDIEvent = (USB_MIDI_EventPacket_t)\r
+ MIDI_EventPacket_t MIDIEvent = (MIDI_EventPacket_t)\r
{\r
.CableNumber = 0,\r
.Command = (MIDICommand >> 4),\r
\r
.MouseHID = \r
{\r
- .Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},\r
+ .Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},\r
\r
.HIDSpec = VERSION_BCD(01.11),\r
.CountryCode = 0x00,\r
break;\r
case DTYPE_HID: \r
Address = (void*)&ConfigurationDescriptor.MouseHID;\r
- Size = sizeof(USB_Descriptor_HID_t);\r
+ Size = sizeof(USB_HID_Descriptor_t);\r
break;\r
case DTYPE_Report: \r
Address = (void*)&MouseReport;\r
{\r
USB_Descriptor_Configuration_Header_t Config;\r
USB_Descriptor_Interface_t Interface;\r
- USB_Descriptor_HID_t MouseHID;\r
+ USB_HID_Descriptor_t MouseHID;\r
USB_Descriptor_Endpoint_t MouseEndpoint;\r
} USB_Descriptor_Configuration_t;\r
\r
\r
.AudioControlInterface_SPC = \r
{\r
- .Header = {.Size = sizeof(USB_AudioInterface_AC_t), .Type = DTYPE_AudioInterface},\r
+ .Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_AudioInterface},\r
.Subtype = DSUBTYPE_Header,\r
\r
.ACSpecification = VERSION_BCD(01.00),\r
- .TotalLength = (sizeof(USB_AudioInterface_AC_t) +\r
- sizeof(USB_AudioInputTerminal_t) +\r
- sizeof(USB_AudioOutputTerminal_t)),\r
+ .TotalLength = (sizeof(USB_Audio_Interface_AC_t) +\r
+ sizeof(USB_Audio_InputTerminal_t) +\r
+ sizeof(USB_Audio_OutputTerminal_t)),\r
\r
.InCollection = 1,\r
.InterfaceNumbers = {1},\r
\r
.InputTerminal = \r
{\r
- .Header = {.Size = sizeof(USB_AudioInputTerminal_t), .Type = DTYPE_AudioInterface},\r
+ .Header = {.Size = sizeof(USB_Audio_InputTerminal_t), .Type = DTYPE_AudioInterface},\r
.Subtype = DSUBTYPE_InputTerminal,\r
\r
.TerminalID = 0x01,\r
\r
.OutputTerminal = \r
{\r
- .Header = {.Size = sizeof(USB_AudioOutputTerminal_t), .Type = DTYPE_AudioInterface},\r
+ .Header = {.Size = sizeof(USB_Audio_OutputTerminal_t), .Type = DTYPE_AudioInterface},\r
.Subtype = DSUBTYPE_OutputTerminal,\r
\r
.TerminalID = 0x02,\r
\r
.AudioStreamInterface_SPC = \r
{\r
- .Header = {.Size = sizeof(USB_AudioInterface_AS_t), .Type = DTYPE_AudioInterface},\r
+ .Header = {.Size = sizeof(USB_Audio_Interface_AS_t), .Type = DTYPE_AudioInterface},\r
.Subtype = DSUBTYPE_General,\r
\r
.TerminalLink = 0x02,\r
\r
.AudioFormat = \r
{\r
- .Header = {.Size = sizeof(USB_AudioFormat_t), .Type = DTYPE_AudioInterface},\r
+ .Header = {.Size = sizeof(USB_Audio_Format_t), .Type = DTYPE_AudioInterface},\r
.Subtype = DSUBTYPE_Format,\r
\r
.FormatType = 0x01,\r
\r
.SubFrameSize = 0x02,\r
.BitResolution = 16,\r
- .SampleFrequencyType = (sizeof(ConfigurationDescriptor.AudioFormat.SampleFrequencies) / sizeof(AudioSampleFreq_t)),\r
+ .SampleFrequencyType = (sizeof(ConfigurationDescriptor.AudioFormat.SampleFrequencies) / sizeof(Audio_SampleFreq_t)),\r
\r
.SampleFrequencies = {SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY)}\r
},\r
{\r
.Endpoint = \r
{\r
- .Header = {.Size = sizeof(USB_AudioStreamEndpoint_Std_t), .Type = DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},\r
\r
.EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | AUDIO_STREAM_EPNUM),\r
.Attributes = (EP_TYPE_ISOCHRONOUS | ENDPOINT_ATTR_SYNC | ENDPOINT_USAGE_DATA),\r
\r
.AudioEndpoint_SPC = \r
{\r
- .Header = {.Size = sizeof(USB_AudioStreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint},\r
+ .Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint},\r
.Subtype = DSUBTYPE_General,\r
\r
.Attributes = 0x00,\r
\r
uint8_t InCollection; /**< Total number of audio class interfaces within this device */\r
uint8_t InterfaceNumbers[1]; /**< Interface numbers of each audio interface */\r
- } USB_AudioInterface_AC_t;\r
+ } USB_Audio_Interface_AC_t;\r
\r
/** Type define for an Audio class specific Feature Unit descriptor. This indicates to the host what features\r
* are present in the device's audio stream for basic control, such as per-channel volume. See the USB Audio\r
uint8_t ChannelControls[3]; /**< Feature masks for the control channel, and each separate audio channel */\r
\r
uint8_t FeatureUnitStrIndex; /**< Index of a string descriptor describing this descriptor within the device */\r
- } USB_AudioFeatureUnit_t;\r
+ } USB_Audio_FeatureUnit_t;\r
\r
/** Type define for an Audio class specific input terminal descriptor. This indicates to the host that the device\r
* contains an input audio source, either from a physical terminal on the device, or a logical terminal (for example,\r
\r
uint8_t ChannelStrIndex; /**< Index of a string descriptor describing this channel within the device */\r
uint8_t TerminalStrIndex; /**< Index of a string descriptor describing this descriptor within the device */\r
- } USB_AudioInputTerminal_t;\r
+ } USB_Audio_InputTerminal_t;\r
\r
/** Type define for an Audio class specific output terminal descriptor. This indicates to the host that the device\r
* contains an output audio sink, either to a physical terminal on the device, or a logical terminal (for example,\r
uint8_t SourceID; /**< ID value of the unit this terminal's audio is sourced from */\r
\r
uint8_t TerminalStrIndex; /**< Index of a string descriptor describing this descriptor within the device */\r
- } USB_AudioOutputTerminal_t;\r
+ } USB_Audio_OutputTerminal_t;\r
\r
/** Type define for an Audio class specific streaming interface descriptor. This indicates to the host\r
* how audio streams within the device are formatted. See the USB Audio specification for more details.\r
\r
uint8_t FrameDelay; /**< Delay in frames resulting from the complete sample processing from input to output */\r
uint16_t AudioFormat; /**< Format of the audio stream, see Audio Device Formats specification */\r
- } USB_AudioInterface_AS_t;\r
+ } USB_Audio_Interface_AS_t;\r
\r
/** Type define for a 24bit audio sample frequency structure. GCC does not contain a built in 24bit datatype,\r
* this this structure is used to build up the value instead. Fill this structure with the SAMPLE_FREQ() macro.\r
{\r
uint16_t LowWord; /**< Low 16 bits of the 24-bit value */\r
uint8_t HighByte; /**< Upper 8 bits of the 24-bit value */\r
- } AudioSampleFreq_t;\r
+ } Audio_SampleFreq_t;\r
\r
/** Type define for an Audio class specific audio format descriptor. This is used to give the host full details\r
* about the number of channels, the sample resolution, acceptable sample frequencies and encoding method used\r
uint8_t BitResolution; /**< Bits of resolution of each channel's samples in the stream */\r
\r
uint8_t SampleFrequencyType; /**< Total number of sample frequencies supported by the device */ \r
- AudioSampleFreq_t SampleFrequencies[1]; /**< Sample frequencies supported by the device */\r
- } USB_AudioFormat_t;\r
+ Audio_SampleFreq_t SampleFrequencies[1]; /**< Sample frequencies supported by the device */\r
+ } USB_Audio_Format_t;\r
\r
/** Type define for an Audio class specific endpoint descriptor. This contains a regular endpoint \r
* descriptor with a few Audio-class specific extensions. See the USB Audio specification for more details.\r
\r
uint8_t Refresh; /**< Always set to zero */\r
uint8_t SyncEndpointNumber; /**< Endpoint address to send synchronisation information to, if needed (zero otherwise) */\r
- } USB_AudioStreamEndpoint_Std_t;\r
+ } USB_Audio_StreamEndpoint_Std_t;\r
\r
/** Type define for an Audio class specific extended endpoint descriptor. This contains extra information\r
* on the usage of endpoints used to stream audio in and out of the USB Audio device, and follows an Audio\r
\r
uint8_t LockDelayUnits; /**< Units used for the LockDelay field, see Audio class specification */\r
uint16_t LockDelay; /**< Time required to internally lock endpoint's internal clock recovery circuitry */\r
- } USB_AudioStreamEndpoint_Spc_t;\r
+ } USB_Audio_StreamEndpoint_Spc_t;\r
\r
/** Type define for the device configuration descriptor structure. This must be defined in the\r
* application code, as the configuration descriptor contains several sub-descriptors which\r
{\r
USB_Descriptor_Configuration_Header_t Config;\r
USB_Descriptor_Interface_t AudioControlInterface;\r
- USB_AudioInterface_AC_t AudioControlInterface_SPC;\r
- USB_AudioInputTerminal_t InputTerminal;\r
- USB_AudioOutputTerminal_t OutputTerminal;\r
+ USB_Audio_Interface_AC_t AudioControlInterface_SPC;\r
+ USB_Audio_InputTerminal_t InputTerminal;\r
+ USB_Audio_OutputTerminal_t OutputTerminal;\r
USB_Descriptor_Interface_t AudioStreamInterface_Alt0;\r
USB_Descriptor_Interface_t AudioStreamInterface_Alt1;\r
- USB_AudioInterface_AS_t AudioStreamInterface_SPC;\r
- USB_AudioFormat_t AudioFormat;\r
- USB_AudioStreamEndpoint_Std_t AudioEndpoint;\r
- USB_AudioStreamEndpoint_Spc_t AudioEndpoint_SPC;\r
+ USB_Audio_Interface_AS_t AudioStreamInterface_SPC;\r
+ USB_Audio_Format_t AudioFormat;\r
+ USB_Audio_StreamEndpoint_Std_t AudioEndpoint;\r
+ USB_Audio_StreamEndpoint_Spc_t AudioEndpoint_SPC;\r
} USB_Descriptor_Configuration_t;\r
\r
/* Function Prototypes: */\r
\r
.AudioControlInterface_SPC = \r
{\r
- .Header = {.Size = sizeof(USB_AudioInterface_AC_t), .Type = DTYPE_AudioInterface},\r
+ .Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_AudioInterface},\r
.Subtype = DSUBTYPE_Header,\r
\r
.ACSpecification = VERSION_BCD(01.00),\r
- .TotalLength = (sizeof(USB_AudioInterface_AC_t) +\r
- sizeof(USB_AudioInputTerminal_t) +\r
- sizeof(USB_AudioOutputTerminal_t)),\r
+ .TotalLength = (sizeof(USB_Audio_Interface_AC_t) +\r
+ sizeof(USB_Audio_InputTerminal_t) +\r
+ sizeof(USB_Audio_OutputTerminal_t)),\r
\r
.InCollection = 1,\r
.InterfaceNumbers = {1},\r
\r
.InputTerminal = \r
{\r
- .Header = {.Size = sizeof(USB_AudioInputTerminal_t), .Type = DTYPE_AudioInterface},\r
+ .Header = {.Size = sizeof(USB_Audio_InputTerminal_t), .Type = DTYPE_AudioInterface},\r
.Subtype = DSUBTYPE_InputTerminal,\r
\r
.TerminalID = 0x01,\r
\r
.OutputTerminal = \r
{\r
- .Header = {.Size = sizeof(USB_AudioOutputTerminal_t), .Type = DTYPE_AudioInterface},\r
+ .Header = {.Size = sizeof(USB_Audio_OutputTerminal_t), .Type = DTYPE_AudioInterface},\r
.Subtype = DSUBTYPE_OutputTerminal,\r
\r
.TerminalID = 0x02,\r
\r
.AudioStreamInterface_SPC = \r
{\r
- .Header = {.Size = sizeof(USB_AudioInterface_AS_t), .Type = DTYPE_AudioInterface},\r
+ .Header = {.Size = sizeof(USB_Audio_Interface_AS_t), .Type = DTYPE_AudioInterface},\r
.Subtype = DSUBTYPE_General,\r
\r
.TerminalLink = 0x01,\r
\r
.AudioFormat = \r
{\r
- .Header = {.Size = sizeof(USB_AudioFormat_t), .Type = DTYPE_AudioInterface},\r
+ .Header = {.Size = sizeof(USB_Audio_Format_t), .Type = DTYPE_AudioInterface},\r
.Subtype = DSUBTYPE_Format,\r
\r
.FormatType = 0x01,\r
.SubFrameSize = 0x02,\r
.BitResolution = 16,\r
\r
- .SampleFrequencyType = (sizeof(ConfigurationDescriptor.AudioFormat.SampleFrequencies) / sizeof(AudioSampleFreq_t)), \r
+ .SampleFrequencyType = (sizeof(ConfigurationDescriptor.AudioFormat.SampleFrequencies) / sizeof(Audio_SampleFreq_t)), \r
.SampleFrequencies = {SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY)}\r
},\r
\r
{\r
.Endpoint = \r
{\r
- .Header = {.Size = sizeof(USB_AudioStreamEndpoint_Std_t), .Type = DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},\r
\r
.EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | AUDIO_STREAM_EPNUM),\r
.Attributes = (EP_TYPE_ISOCHRONOUS | ENDPOINT_ATTR_SYNC | ENDPOINT_USAGE_DATA),\r
\r
.AudioEndpoint_SPC = \r
{\r
- .Header = {.Size = sizeof(USB_AudioStreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint},\r
+ .Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint},\r
.Subtype = DSUBTYPE_General,\r
\r
.Attributes = EP_ACCEPTS_SMALL_PACKETS,\r
\r
uint8_t InCollection; /**< Total number of audio class interfaces within this device */\r
uint8_t InterfaceNumbers[1]; /**< Interface numbers of each audio interface */\r
- } USB_AudioInterface_AC_t;\r
+ } USB_Audio_Interface_AC_t;\r
\r
/** Type define for an Audio class specific Feature Unit descriptor. This indicates to the host what features\r
* are present in the device's audio stream for basic control, such as per-channel volume. See the USB Audio\r
uint8_t ChannelControls[3]; /**< Feature masks for the control channel, and each separate audio channel */\r
\r
uint8_t FeatureUnitStrIndex; /**< Index of a string descriptor describing this descriptor within the device */\r
- } USB_AudioFeatureUnit_t;\r
+ } USB_Audio_FeatureUnit_t;\r
\r
/** Type define for an Audio class specific input terminal descriptor. This indicates to the host that the device\r
* contains an input audio source, either from a physical terminal on the device, or a logical terminal (for example,\r
\r
uint8_t ChannelStrIndex; /**< Index of a string descriptor describing this channel within the device */\r
uint8_t TerminalStrIndex; /**< Index of a string descriptor describing this descriptor within the device */\r
- } USB_AudioInputTerminal_t;\r
+ } USB_Audio_InputTerminal_t;\r
\r
/** Type define for an Audio class specific output terminal descriptor. This indicates to the host that the device\r
* contains an output audio sink, either to a physical terminal on the device, or a logical terminal (for example,\r
uint8_t SourceID; /**< ID value of the unit this terminal's audio is sourced from */\r
\r
uint8_t TerminalStrIndex; /**< Index of a string descriptor describing this descriptor within the device */\r
- } USB_AudioOutputTerminal_t;\r
+ } USB_Audio_OutputTerminal_t;\r
\r
/** Type define for an Audio class specific streaming interface descriptor. This indicates to the host\r
* how audio streams within the device are formatted. See the USB Audio specification for more details.\r
\r
uint8_t FrameDelay; /**< Delay in frames resulting from the complete sample processing from input to output */\r
uint16_t AudioFormat; /**< Format of the audio stream, see Audio Device Formats specification */\r
- } USB_AudioInterface_AS_t;\r
+ } USB_Audio_Interface_AS_t;\r
\r
/** Type define for a 24bit audio sample frequency structure. GCC does not contain a built in 24bit datatype,\r
* this this structure is used to build up the value instead. Fill this structure with the SAMPLE_FREQ() macro.\r
{\r
uint16_t LowWord; /**< Low 16 bits of the 24-bit value */\r
uint8_t HighByte; /**< Upper 8 bits of the 24-bit value */\r
- } AudioSampleFreq_t;\r
+ } Audio_SampleFreq_t;\r
\r
/** Type define for an Audio class specific audio format descriptor. This is used to give the host full details\r
* about the number of channels, the sample resolution, acceptable sample frequencies and encoding method used\r
uint8_t BitResolution; /**< Bits of resolution of each channel's samples in the stream */\r
\r
uint8_t SampleFrequencyType; /**< Total number of sample frequencies supported by the device */ \r
- AudioSampleFreq_t SampleFrequencies[1]; /**< Sample frequencies supported by the device */\r
- } USB_AudioFormat_t;\r
+ Audio_SampleFreq_t SampleFrequencies[1]; /**< Sample frequencies supported by the device */\r
+ } USB_Audio_Format_t;\r
\r
/** Type define for an Audio class specific endpoint descriptor. This contains a regular endpoint \r
* descriptor with a few Audio-class specific extensions. See the USB Audio specification for more details.\r
\r
uint8_t Refresh; /**< Always set to zero */\r
uint8_t SyncEndpointNumber; /**< Endpoint address to send synchronisation information to, if needed (zero otherwise) */\r
- } USB_AudioStreamEndpoint_Std_t;\r
+ } USB_Audio_StreamEndpoint_Std_t;\r
\r
/** Type define for an Audio class specific extended endpoint descriptor. This contains extra information\r
* on the usage of endpoints used to stream audio in and out of the USB Audio device, and follows an Audio\r
\r
uint8_t LockDelayUnits; /**< Units used for the LockDelay field, see Audio class specification */\r
uint16_t LockDelay; /**< Time required to internally lock endpoint's internal clock recovery circuitry */\r
- } USB_AudioStreamEndpoint_Spc_t; \r
+ } USB_Audio_StreamEndpoint_Spc_t; \r
\r
/** Type define for the device configuration descriptor structure. This must be defined in the\r
* application code, as the configuration descriptor contains several sub-descriptors which\r
{\r
USB_Descriptor_Configuration_Header_t Config;\r
USB_Descriptor_Interface_t AudioControlInterface;\r
- USB_AudioInterface_AC_t AudioControlInterface_SPC;\r
- USB_AudioInputTerminal_t InputTerminal;\r
- USB_AudioOutputTerminal_t OutputTerminal;\r
+ USB_Audio_Interface_AC_t AudioControlInterface_SPC;\r
+ USB_Audio_InputTerminal_t InputTerminal;\r
+ USB_Audio_OutputTerminal_t OutputTerminal;\r
USB_Descriptor_Interface_t AudioStreamInterface_Alt0;\r
USB_Descriptor_Interface_t AudioStreamInterface_Alt1;\r
- USB_AudioInterface_AS_t AudioStreamInterface_SPC;\r
- USB_AudioFormat_t AudioFormat;\r
- USB_AudioStreamEndpoint_Std_t AudioEndpoint;\r
- USB_AudioStreamEndpoint_Spc_t AudioEndpoint_SPC;\r
+ USB_Audio_Interface_AS_t AudioStreamInterface_SPC;\r
+ USB_Audio_Format_t AudioFormat;\r
+ USB_Audio_StreamEndpoint_Std_t AudioEndpoint;\r
+ USB_Audio_StreamEndpoint_Spc_t AudioEndpoint_SPC;\r
} USB_Descriptor_Configuration_t;\r
\r
/* Function Prototypes: */\r
\r
.AudioControlInterface_SPC = \r
{\r
- .Header = {.Size = sizeof(USB_AudioInterface_AC_t), .Type = DTYPE_AudioInterface},\r
+ .Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_AudioInterface},\r
.Subtype = DSUBTYPE_Header,\r
\r
.ACSpecification = VERSION_BCD(01.00),\r
- .TotalLength = sizeof(USB_AudioInterface_AC_t),\r
+ .TotalLength = sizeof(USB_Audio_Interface_AC_t),\r
\r
.InCollection = 1,\r
.InterfaceNumbers = {1}, \r
\r
.AudioStreamInterface_SPC = \r
{\r
- .Header = {.Size = sizeof(USB_AudioInterface_MIDI_AS_t), .Type = DTYPE_AudioInterface},\r
+ .Header = {.Size = sizeof(USB_Audio_Interface_MIDI_AS_t), .Type = DTYPE_AudioInterface},\r
.Subtype = DSUBTYPE_General,\r
\r
.AudioSpecification = VERSION_BCD(01.00),\r
{\r
.Endpoint = \r
{\r
- .Header = {.Size = sizeof(USB_AudioStreamEndpoint_Std_t), .Type = DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},\r
\r
.EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | MIDI_STREAM_OUT_EPNUM),\r
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),\r
{\r
.Endpoint = \r
{\r
- .Header = {.Size = sizeof(USB_AudioStreamEndpoint_Std_t), .Type = DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},\r
\r
.EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | MIDI_STREAM_IN_EPNUM),\r
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),\r
\r
uint8_t InCollection; /** Total number of audio class interfaces within this device */\r
uint8_t InterfaceNumbers[1]; /** Interface numbers of each audio interface */\r
- } USB_AudioInterface_AC_t;\r
+ } USB_Audio_Interface_AC_t;\r
\r
/** Type define for an Audio class specific MIDI streaming interface descriptor. This indicates to the host\r
* how MIDI the specification compliance of the device and the total length of the Audio class specific descriptors.\r
\r
uint16_t AudioSpecification; /**< Binary coded decimal value, indicating the supported Audio Class specification version */\r
uint16_t TotalLength; /**< Total length of the Audio class specific descriptors, including this descriptor */\r
- } USB_AudioInterface_MIDI_AS_t;\r
+ } USB_Audio_Interface_MIDI_AS_t;\r
\r
/** Type define for an Audio class specific endpoint descriptor. This contains a regular endpoint \r
* descriptor with a few Audio-class specific extensions. See the USB Audio specification for more details.\r
\r
uint8_t Refresh; /**< Always set to zero */\r
uint8_t SyncEndpointNumber; /**< Endpoint address to send synchronisation information to, if needed (zero otherwise) */\r
- } USB_AudioStreamEndpoint_Std_t;\r
+ } USB_Audio_StreamEndpoint_Std_t;\r
\r
/** Type define for an Audio class specific MIDI IN jack. This gives information to the host on a MIDI input, either\r
* a physical input jack, or a logical jack (receiving input data internally, or from the host via an endpoint).\r
{\r
USB_Descriptor_Configuration_Header_t Config;\r
USB_Descriptor_Interface_t AudioControlInterface;\r
- USB_AudioInterface_AC_t AudioControlInterface_SPC;\r
+ USB_Audio_Interface_AC_t AudioControlInterface_SPC;\r
USB_Descriptor_Interface_t AudioStreamInterface;\r
- USB_AudioInterface_MIDI_AS_t AudioStreamInterface_SPC;\r
+ USB_Audio_Interface_MIDI_AS_t AudioStreamInterface_SPC;\r
USB_MIDI_In_Jack_t MIDI_In_Jack_Emb;\r
USB_MIDI_In_Jack_t MIDI_In_Jack_Ext;\r
USB_MIDI_Out_Jack_t MIDI_Out_Jack_Emb;\r
USB_MIDI_Out_Jack_t MIDI_Out_Jack_Ext;\r
- USB_AudioStreamEndpoint_Std_t MIDI_In_Jack_Endpoint;\r
+ USB_Audio_StreamEndpoint_Std_t MIDI_In_Jack_Endpoint;\r
USB_MIDI_Jack_Endpoint_t MIDI_In_Jack_Endpoint_SPC;\r
- USB_AudioStreamEndpoint_Std_t MIDI_Out_Jack_Endpoint;\r
+ USB_Audio_StreamEndpoint_Std_t MIDI_Out_Jack_Endpoint;\r
USB_MIDI_Jack_Endpoint_t MIDI_Out_Jack_Endpoint_SPC;\r
} USB_Descriptor_Configuration_t;\r
\r
# be useful for C code in case the coding convention dictates that all compound \r
# types are typedef'ed and only the typedef is referenced, never the tag name.\r
\r
-TYPEDEF_HIDES_STRUCT = NO\r
+TYPEDEF_HIDES_STRUCT = YES\r
\r
# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to \r
# determine which symbols to keep in memory and which to flush to disk.\r
#endif\r
\r
/* Macros: */\r
+ #if !defined(AUDIO_TOTAL_SAMPLE_RATES) || defined(__DOXYGEN__)\r
+ /** Total number of discrete audio sample rates supported by the device. This value can be overridden by defining this\r
+ * token in the project makefile to the desired value, and passing it to the compiler via the -D switch.\r
+ */\r
+ #define AUDIO_TOTAL_SAMPLE_RATES 1\r
+ #endif\r
+ \r
/** Descriptor header constant to indicate a Audio class interface descriptor. */\r
#define DTYPE_AudioInterface 0x24\r
\r
\r
uint8_t InCollection; /**< Total number of audio class interfaces within this device */\r
uint8_t InterfaceNumbers[1]; /**< Interface numbers of each audio interface */\r
- } USB_AudioInterface_AC_t;\r
+ } USB_Audio_Interface_AC_t;\r
\r
/** Type define for an Audio class specific Feature Unit descriptor. This indicates to the host what features\r
* are present in the device's audio stream for basic control, such as per-channel volume. See the USB Audio\r
uint8_t ChannelControls[3]; /**< Feature masks for the control channel, and each separate audio channel */\r
\r
uint8_t FeatureUnitStrIndex; /**< Index of a string descriptor describing this descriptor within the device */\r
- } USB_AudioFeatureUnit_t;\r
+ } USB_Audio_FeatureUnit_t;\r
\r
/** Type define for an Audio class specific input terminal descriptor. This indicates to the host that the device\r
* contains an input audio source, either from a physical terminal on the device, or a logical terminal (for example,\r
\r
uint8_t ChannelStrIndex; /**< Index of a string descriptor describing this channel within the device */\r
uint8_t TerminalStrIndex; /**< Index of a string descriptor describing this descriptor within the device */\r
- } USB_AudioInputTerminal_t;\r
+ } USB_Audio_InputTerminal_t;\r
\r
/** Type define for an Audio class specific output terminal descriptor. This indicates to the host that the device\r
* contains an output audio sink, either to a physical terminal on the device, or a logical terminal (for example,\r
uint8_t SourceID; /**< ID value of the unit this terminal's audio is sourced from */\r
\r
uint8_t TerminalStrIndex; /**< Index of a string descriptor describing this descriptor within the device */\r
- } USB_AudioOutputTerminal_t;\r
+ } USB_Audio_OutputTerminal_t;\r
\r
/** Type define for an Audio class specific streaming interface descriptor. This indicates to the host\r
* how audio streams within the device are formatted. See the USB Audio specification for more details.\r
\r
uint8_t FrameDelay; /**< Delay in frames resulting from the complete sample processing from input to output */\r
uint16_t AudioFormat; /**< Format of the audio stream, see Audio Device Formats specification */\r
- } USB_AudioInterface_AS_t;\r
+ } USB_Audio_Interface_AS_t;\r
\r
/** Type define for a 24bit audio sample frequency structure. GCC does not contain a built in 24bit datatype,\r
* this this structure is used to build up the value instead. Fill this structure with the SAMPLE_FREQ() macro.\r
{\r
uint16_t LowWord; /**< Low 16 bits of the 24-bit value */\r
uint8_t HighByte; /**< Upper 8 bits of the 24-bit value */\r
- } AudioSampleFreq_t;\r
+ } USB_Audio_SampleFreq_t;\r
\r
/** Type define for an Audio class specific audio format descriptor. This is used to give the host full details\r
* about the number of channels, the sample resolution, acceptable sample frequencies and encoding method used\r
uint8_t BitResolution; /**< Bits of resolution of each channel's samples in the stream */\r
\r
uint8_t SampleFrequencyType; /**< Total number of sample frequencies supported by the device */ \r
- AudioSampleFreq_t SampleFrequencies[1]; /**< Sample frequencies supported by the device */\r
- } USB_AudioFormat_t;\r
+ USB_Audio_SampleFreq_t SampleFrequencies[AUDIO_TOTAL_SAMPLE_RATES]; /**< Sample frequencies supported by the device */\r
+ } USB_Audio_Format_t;\r
\r
/** Type define for an Audio class specific endpoint descriptor. This contains a regular endpoint \r
* descriptor with a few Audio-class specific extensions. See the USB Audio specification for more details.\r
\r
uint8_t Refresh; /**< Always set to zero */\r
uint8_t SyncEndpointNumber; /**< Endpoint address to send synchronisation information to, if needed (zero otherwise) */\r
- } USB_AudioStreamEndpoint_Std_t;\r
+ } USB_Audio_StreamEndpoint_Std_t;\r
\r
/** Type define for an Audio class specific extended endpoint descriptor. This contains extra information\r
* on the usage of endpoints used to stream audio in and out of the USB Audio device, and follows an Audio\r
\r
uint8_t LockDelayUnits; /**< Units used for the LockDelay field, see Audio class specification */\r
uint16_t LockDelay; /**< Time required to internally lock endpoint's internal clock recovery circuitry */\r
- } USB_AudioStreamEndpoint_Spc_t;\r
+ } USB_Audio_StreamEndpoint_Spc_t;\r
\r
/* Disable C linkage for C++ Compilers: */\r
#if defined(__cplusplus)\r
\r
uint8_t HIDReportType;\r
uint16_t HIDReportLength;\r
- } USB_Descriptor_HID_t;\r
+ } USB_HID_Descriptor_t;\r
\r
/** Type define for the data type used to store HID report descriptor elements. */\r
typedef uint8_t USB_Descriptor_HIDReport_Datatype_t;\r
\r
uint16_t AudioSpecification; /**< Binary coded decimal value, indicating the supported Audio Class specification version */\r
uint16_t TotalLength; /**< Total length of the Audio class specific descriptors, including this descriptor */\r
- } USB_AudioInterface_MIDI_AS_t;\r
+ } USB_MIDI_AudioInterface_AS_t;\r
\r
/** Type define for an Audio class specific MIDI IN jack. This gives information to the host on a MIDI input, either\r
* a physical input jack, or a logical jack (receiving input data internally, or from the host via an endpoint).\r
uint8_t Data1; /**< First byte of data in the MIDI event */\r
uint8_t Data2; /**< Second byte of data in the MIDI event */\r
uint8_t Data3; /**< Third byte of data in the MIDI event */ \r
- } USB_MIDI_EventPacket_t;\r
+ } MIDI_EventPacket_t;\r
\r
/* Disable C linkage for C++ Compilers: */\r
#if defined(__cplusplus)\r
uint8_t LUN; /**< Logical Unit number this command is issued to */\r
uint8_t SCSICommandLength; /**< Length of the issued SCSI command within the SCSI command data array */\r
uint8_t SCSICommandData[16]; /**< Issued SCSI command in the Command Block */\r
- } CommandBlockWrapper_t;\r
+ } MS_CommandBlockWrapper_t;\r
\r
/** Type define for a Command Status Wrapper, used in the Mass Storage Bulk-Only Transport protocol. */\r
typedef struct\r
uint32_t Tag; /**< Unique command ID value, to associate a command block wrapper with its command status wrapper */\r
uint32_t DataTransferResidue; /**< Number of bytes of data not processed in the SCSI command */\r
uint8_t Status; /**< Status code of the issued command - a value from the MassStorage_CommandStatusCodes_t enum */\r
- } CommandStatusWrapper_t;\r
+ } MS_CommandStatusWrapper_t;\r
\r
/* Enums: */\r
/** Enum for the possible command status wrapper return status codes. */\r
uint8_t Octets[6]; /**< Individual bytes of a MAC address */\r
} MAC_Address_t;\r
\r
- /** Type define for a RNDIS message header, sent before RNDIS messages */\r
- typedef struct\r
- {\r
- uint32_t MessageType; /**< RNDIS message type, a REMOTE_NDIS_*_MSG constant */\r
- uint32_t MessageLength; /**< Total length of the RNDIS message, in bytes */\r
- } RNDIS_Message_Header_t;\r
-\r
/** Type define for an Ethernet frame buffer. */\r
typedef struct\r
{\r
bool FrameInBuffer; /**< Indicates if a frame is currently stored in the buffer */\r
} Ethernet_Frame_Info_t;\r
\r
+ /** Type define for a RNDIS message header, sent before RNDIS messages */\r
+ typedef struct\r
+ {\r
+ uint32_t MessageType; /**< RNDIS message type, a REMOTE_NDIS_*_MSG constant */\r
+ uint32_t MessageLength; /**< Total length of the RNDIS message, in bytes */\r
+ } RNDIS_Message_Header_t;\r
+\r
/** Type define for a RNDIS packet message, used to encapsulate Ethernet packets sent to and from the adapter */\r
typedef struct\r
{\r
#endif\r
\r
/* Public Interface - May be used in end-application: */\r
- /* Type Defines: */\r
- /** Configuration information structure for \ref USB_ClassInfo_Audio_Device_t Audio device interface structures. */\r
- typedef struct\r
- {\r
- uint8_t StreamingInterfaceNumber; /**< Index of the Audio Streaming interface within the device this\r
- * structure controls.\r
- */\r
-\r
- uint8_t DataINEndpointNumber; /**< Endpoint number of the incomming Audio Streaming data, if available\r
- * (zero if unused).\r
- */\r
- uint16_t DataINEndpointSize; /**< Size in bytes of the incomming Audio Streaming data endpoint, if available\r
- * (zero if unused).\r
- */\r
-\r
- uint8_t DataOUTEndpointNumber; /**< Endpoint number of the outgoing Audio Streaming data, if available\r
- * (zero if unused).\r
- */\r
- uint16_t DataOUTEndpointSize; /**< Size in bytes of the outgoing Audio Streaming data endpoint, if available\r
- * (zero if unused).\r
- */ \r
- } USB_ClassInfo_Audio_Device_Config_t;\r
- \r
- /** Current State information structure for \ref USB_ClassInfo_Audio_Device_t Audio device interface structures. */\r
- typedef struct\r
- {\r
- bool InterfaceEnabled; /**< Set and cleared by the class driver to indicate if the host has enabled the streaming endpoints\r
- * of the Audio Streaming interface.\r
- */\r
- } USB_ClassInfo_Audio_Device_State_t;\r
- \r
+ /* Type Defines: */ \r
/** Class state structure. An instance of this structure should be made for each Audio interface\r
* within the user application, and passed to each of the Audio class driver functions as the\r
* AudioInterfaceInfo parameter. This stores each Audio interface's configuration and state information.\r
*/\r
typedef struct\r
{\r
- const USB_ClassInfo_Audio_Device_Config_t Config; /**< Config data for the USB class interface within\r
- * the device. All elements in this section\r
- * <b>must</b> be set or the interface will fail\r
- * to enumerate and operate correctly.\r
- */\r
- \r
- USB_ClassInfo_Audio_Device_State_t State; /**< State data for the USB class interface within\r
- * the device. All elements in this section\r
- * <b>may</b> be set to initial values, but may\r
- * also be ignored to default to sane values when\r
- * the interface is enumerated.\r
- */ \r
+ const struct\r
+ {\r
+ uint8_t StreamingInterfaceNumber; /**< Index of the Audio Streaming interface within the device this\r
+ * structure controls.\r
+ */\r
+\r
+ uint8_t DataINEndpointNumber; /**< Endpoint number of the incomming Audio Streaming data, if available\r
+ * (zero if unused).\r
+ */\r
+ uint16_t DataINEndpointSize; /**< Size in bytes of the incomming Audio Streaming data endpoint, if available\r
+ * (zero if unused).\r
+ */\r
+\r
+ uint8_t DataOUTEndpointNumber; /**< Endpoint number of the outgoing Audio Streaming data, if available\r
+ * (zero if unused).\r
+ */\r
+ uint16_t DataOUTEndpointSize; /**< Size in bytes of the outgoing Audio Streaming data endpoint, if available\r
+ * (zero if unused).\r
+ */ \r
+ } Config; /**< Config data for the USB class interface within the device. All elements in this section\r
+ * <b>must</b> be set or the interface will fail to enumerate and operate correctly.\r
+ */\r
+ struct\r
+ {\r
+ bool InterfaceEnabled; /**< Set and cleared by the class driver to indicate if the host has enabled the streaming endpoints\r
+ * of the Audio Streaming interface.\r
+ */\r
+ } State; /**< State data for the USB class interface within the device. All elements in this section\r
+ * <b>may</b> be set to initial values, but may also be ignored to default to sane values when\r
+ * the interface is enumerated.\r
+ */ \r
} USB_ClassInfo_Audio_Device_t;\r
\r
/* Function Prototypes: */\r
\r
/* Public Interface - May be used in end-application: */\r
/* Type Defines: */\r
- /** Configuration information structure for \ref USB_ClassInfo_CDC_Device_t CDC device interface structures. */\r
+ /** Class state structure. An instance of this structure should be made for each CDC interface\r
+ * within the user application, and passed to each of the CDC class driver functions as the\r
+ * CDCInterfaceInfo parameter. This stores each CDC interface's configuration and state information.\r
+ */\r
typedef struct\r
{\r
- uint8_t ControlInterfaceNumber; /**< Interface number of the CDC control interface within the device */\r
-\r
- uint8_t DataINEndpointNumber; /**< Endpoint number of the CDC interface's IN data endpoint */\r
- uint16_t DataINEndpointSize; /**< Size in bytes of the CDC interface's IN data endpoint */\r
+ const struct\r
+ {\r
+ uint8_t ControlInterfaceNumber; /**< Interface number of the CDC control interface within the device */\r
\r
- uint8_t DataOUTEndpointNumber; /**< Endpoint number of the CDC interface's OUT data endpoint */\r
- uint16_t DataOUTEndpointSize; /**< Size in bytes of the CDC interface's OUT data endpoint */\r
+ uint8_t DataINEndpointNumber; /**< Endpoint number of the CDC interface's IN data endpoint */\r
+ uint16_t DataINEndpointSize; /**< Size in bytes of the CDC interface's IN data endpoint */\r
\r
- uint8_t NotificationEndpointNumber; /**< Endpoint number of the CDC interface's IN notification endpoint, if used */\r
- uint16_t NotificationEndpointSize; /**< Size in bytes of the CDC interface's IN notification endpoint, if used */\r
- } USB_ClassInfo_CDC_Device_Config_t;\r
- \r
- /** Current State information structure for \ref USB_ClassInfo_CDC_Device_t CDC device interface structures. */\r
- typedef struct\r
- {\r
- struct\r
- {\r
- uint8_t HostToDevice; /**< Control line states from the host to device, as a set of CDC_CONTROL_LINE_OUT_*\r
- * masks.\r
- */\r
- uint8_t DeviceToHost; /**< Control line states from the device to host, as a set of CDC_CONTROL_LINE_IN_*\r
- * masks.\r
- */\r
- } ControlLineStates;\r
+ uint8_t DataOUTEndpointNumber; /**< Endpoint number of the CDC interface's OUT data endpoint */\r
+ uint16_t DataOUTEndpointSize; /**< Size in bytes of the CDC interface's OUT data endpoint */\r
\r
+ uint8_t NotificationEndpointNumber; /**< Endpoint number of the CDC interface's IN notification endpoint, if used */\r
+ uint16_t NotificationEndpointSize; /**< Size in bytes of the CDC interface's IN notification endpoint, if used */\r
+ } Config; /**< Config data for the USB class interface within the device. All elements in this section\r
+ * <b>must</b> be set or the interface will fail to enumerate and operate correctly.\r
+ */\r
struct\r
{\r
- uint32_t BaudRateBPS; /**< Baud rate of the virtual serial port, in bits per second */\r
- uint8_t CharFormat; /**< Character format of the virtual serial port, a value from the\r
- * CDCDevice_CDC_LineCodingFormats_t enum\r
- */\r
- uint8_t ParityType; /**< Parity setting of the virtual serial port, a value from the\r
- * CDCDevice_LineCodingParity_t enum\r
- */\r
- uint8_t DataBits; /**< Bits of data per character of the virtual serial port */\r
- } LineEncoding; \r
- } USB_ClassInfo_CDC_Device_State_t;\r
- \r
- /** Class state structure. An instance of this structure should be made for each CDC interface\r
- * within the user application, and passed to each of the CDC class driver functions as the\r
- * CDCInterfaceInfo parameter. This stores each CDC interface's configuration and state information.\r
- */\r
- typedef struct\r
- {\r
- const USB_ClassInfo_CDC_Device_Config_t Config; /**< Config data for the USB class interface within\r
- * the device. All elements in this section\r
- * <b>must</b> be set or the interface will fail\r
- * to enumerate and operate correctly.\r
- */\r
- \r
- USB_ClassInfo_CDC_Device_State_t State; /**< State data for the USB class interface within\r
- * the device. All elements in this section\r
- * <b>may</b> be set to initial values, but may\r
- * also be ignored to default to sane values when\r
- * the interface is enumerated.\r
- */\r
+ struct\r
+ {\r
+ uint8_t HostToDevice; /**< Control line states from the host to device, as a set of CDC_CONTROL_LINE_OUT_*\r
+ * masks.\r
+ */\r
+ uint8_t DeviceToHost; /**< Control line states from the device to host, as a set of CDC_CONTROL_LINE_IN_*\r
+ * masks.\r
+ */\r
+ } ControlLineStates;\r
+\r
+ struct\r
+ {\r
+ uint32_t BaudRateBPS; /**< Baud rate of the virtual serial port, in bits per second */\r
+ uint8_t CharFormat; /**< Character format of the virtual serial port, a value from the\r
+ * CDCDevice_CDC_LineCodingFormats_t enum\r
+ */\r
+ uint8_t ParityType; /**< Parity setting of the virtual serial port, a value from the\r
+ * CDCDevice_LineCodingParity_t enum\r
+ */\r
+ uint8_t DataBits; /**< Bits of data per character of the virtual serial port */\r
+ } LineEncoding; \r
+ } State; /**< State data for the USB class interface within the device. All elements in this section\r
+ * <b>may</b> be set to initial values, but may also be ignored to default to sane values when\r
+ * the interface is enumerated.\r
+ */\r
} USB_ClassInfo_CDC_Device_t;\r
\r
/* Function Prototypes: */ \r
\r
/* Public Interface - May be used in end-application: */\r
/* Type Defines: */\r
- /** Configuration information structure for \ref USB_ClassInfo_HID_Device_t HID device interface structures. */\r
- typedef struct\r
- {\r
- uint8_t InterfaceNumber; /**< Interface number of the HID interface within the device */\r
-\r
- uint8_t ReportINEndpointNumber; /**< Endpoint number of the HID interface's IN report endpoint */\r
- uint16_t ReportINEndpointSize; /**< Size in bytes of the HID interface's IN report endpoint */\r
- \r
- uint8_t ReportINBufferSize; /**< Size of the largest possible report to send to the host, for\r
- * buffer allocation purposes\r
- */\r
- } USB_ClassInfo_HID_Device_Config_t;\r
- \r
- /** Current State information structure for \ref USB_ClassInfo_HID_Device_t HID device interface structures. */\r
- typedef struct\r
- {\r
- bool UsingReportProtocol; /**< Indicates if the HID interface is set to Boot or Report protocol mode */\r
- uint16_t IdleCount; /**< Report idle period, in ms, set by the host */\r
- uint16_t IdleMSRemaining; /**< Total number of ms remaining before the idle period elapsed - this should be\r
- * decremented by the user application if non-zero each millisecond */ \r
- } USB_ClassInfo_HID_Device_State_t;\r
-\r
/** Class state structure. An instance of this structure should be made for each HID interface\r
* within the user application, and passed to each of the HID class driver functions as the\r
* HIDInterfaceInfo parameter. This stores each HID interface's configuration and state information.\r
*/\r
typedef struct\r
{\r
- const USB_ClassInfo_HID_Device_Config_t Config; /**< Config data for the USB class interface within\r
- * the device. All elements in this section\r
- * <b>must</b> be set or the interface will fail\r
- * to enumerate and operate correctly.\r
- */\r
- \r
- USB_ClassInfo_HID_Device_State_t State; /**< State data for the USB class interface within\r
- * the device. All elements in this section\r
- * <b>may</b> be set to initial values, but may\r
- * also be ignored to default to sane values when\r
- * the interface is enumerated.\r
- */\r
+ const struct\r
+ {\r
+ uint8_t InterfaceNumber; /**< Interface number of the HID interface within the device */\r
+\r
+ uint8_t ReportINEndpointNumber; /**< Endpoint number of the HID interface's IN report endpoint */\r
+ uint16_t ReportINEndpointSize; /**< Size in bytes of the HID interface's IN report endpoint */\r
+ \r
+ uint8_t ReportINBufferSize; /**< Size of the largest possible report to send to the host, for\r
+ * buffer allocation purposes\r
+ */\r
+ } Config; /**< Config data for the USB class interface within the device. All elements in this section\r
+ * <b>must</b> be set or the interface will fail to enumerate and operate correctly.\r
+ */ \r
+ struct\r
+ {\r
+ bool UsingReportProtocol; /**< Indicates if the HID interface is set to Boot or Report protocol mode */\r
+ uint16_t IdleCount; /**< Report idle period, in ms, set by the host */\r
+ uint16_t IdleMSRemaining; /**< Total number of ms remaining before the idle period elapsed - this should be\r
+ * decremented by the user application if non-zero each millisecond */ \r
+ } State; /**< State data for the USB class interface within the device. All elements in this section\r
+ * <b>may</b> be set to initial values, but may also be ignored to default to sane values when\r
+ * the interface is enumerated.\r
+ */\r
} USB_ClassInfo_HID_Device_t;\r
\r
/* Function Prototypes: */\r
\r
}\r
\r
-void MIDI_Device_SendEventPacket(USB_ClassInfo_MIDI_Device_t* MIDIInterfaceInfo, USB_MIDI_EventPacket_t* Event)\r
+void MIDI_Device_SendEventPacket(USB_ClassInfo_MIDI_Device_t* MIDIInterfaceInfo, MIDI_EventPacket_t* Event)\r
{\r
if (!(USB_IsConnected))\r
return;\r
\r
if (Endpoint_IsReadWriteAllowed());\r
{\r
- Endpoint_Write_Stream_LE(Event, sizeof(USB_MIDI_EventPacket_t), NO_STREAM_CALLBACK);\r
+ Endpoint_Write_Stream_LE(Event, sizeof(MIDI_EventPacket_t), NO_STREAM_CALLBACK);\r
Endpoint_ClearIN();\r
}\r
}\r
\r
-bool MIDI_Device_ReceiveEventPacket(USB_ClassInfo_MIDI_Device_t* MIDIInterfaceInfo, USB_MIDI_EventPacket_t* Event)\r
+bool MIDI_Device_ReceiveEventPacket(USB_ClassInfo_MIDI_Device_t* MIDIInterfaceInfo, MIDI_EventPacket_t* Event)\r
{\r
if (!(USB_IsConnected))\r
return false;\r
if (!(Endpoint_IsReadWriteAllowed()))\r
return false;\r
\r
- Endpoint_Read_Stream_LE(Event, sizeof(USB_MIDI_EventPacket_t), NO_STREAM_CALLBACK);\r
+ Endpoint_Read_Stream_LE(Event, sizeof(MIDI_EventPacket_t), NO_STREAM_CALLBACK);\r
Endpoint_ClearOUT();\r
\r
return true;\r
/* Public Interface - May be used in end-application: */\r
/* Type Define: */\r
/** Configuration information structure for \ref USB_ClassInfo_MIDI_Device_t MIDI device interface structures. */\r
- typedef struct\r
- {\r
- uint8_t StreamingInterfaceNumber; /**< Index of the Audio Streaming interface within the device this structure controls */\r
-\r
- uint8_t DataINEndpointNumber; /**< Endpoint number of the incomming MIDI data, if available (zero if unused) */\r
- uint16_t DataINEndpointSize; /**< Size in bytes of the incomming MIDI data endpoint, if available (zero if unused) */\r
-\r
- uint8_t DataOUTEndpointNumber; /**< Endpoint number of the outgoing MIDI data, if available (zero if unused) */\r
- uint16_t DataOUTEndpointSize; /**< Size in bytes of the outgoing MIDI data endpoint, if available (zero if unused) */\r
- } USB_ClassInfo_MIDI_Device_Config_t;\r
+ typedef USB_ClassInfo_MIDI_Device_Config_t;\r
\r
/** Current State information structure for \ref USB_ClassInfo_MIDI_Device_t MIDI device interface structures. */\r
- typedef struct\r
- {\r
- // No state information for this class yet\r
- } USB_ClassInfo_MIDI_Device_State_t;\r
+ typedef USB_ClassInfo_MIDI_Device_State_t;\r
\r
/** Class state structure. An instance of this structure should be made for each MIDI interface\r
* within the user application, and passed to each of the MIDI class driver functions as the\r
*/\r
typedef struct\r
{\r
- const USB_ClassInfo_MIDI_Device_Config_t Config; /**< Config data for the USB class interface within\r
- * the device. All elements in this section\r
- * <b>must</b> be set or the interface will fail\r
- * to enumerate and operate correctly.\r
- */\r
- \r
- USB_ClassInfo_MIDI_Device_State_t State; /**< State data for the USB class interface within\r
- * the device. All elements in this section\r
- * <b>may</b> be set to initial values, but may\r
- * also be ignored to default to sane values when\r
- * the interface is enumerated.\r
- */\r
+ const struct\r
+ {\r
+ uint8_t StreamingInterfaceNumber; /**< Index of the Audio Streaming interface within the device this structure controls */\r
+\r
+ uint8_t DataINEndpointNumber; /**< Endpoint number of the incomming MIDI data, if available (zero if unused) */\r
+ uint16_t DataINEndpointSize; /**< Size in bytes of the incomming MIDI data endpoint, if available (zero if unused) */\r
+\r
+ uint8_t DataOUTEndpointNumber; /**< Endpoint number of the outgoing MIDI data, if available (zero if unused) */\r
+ uint16_t DataOUTEndpointSize; /**< Size in bytes of the outgoing MIDI data endpoint, if available (zero if unused) */\r
+ } Config; /**< Config data for the USB class interface within the device. All elements in this section\r
+ * <b>must</b> be set or the interface will fail to enumerate and operate correctly.\r
+ */ \r
+ struct\r
+ {\r
+ // No state information for this class yet\r
+ } State; /**< State data for the USB class interface within the device. All elements in this section\r
+ * <b>may</b> be set to initial values, but may also be ignored to default to sane values when\r
+ * the interface is enumerated.\r
+ */\r
} USB_ClassInfo_MIDI_Device_t; \r
\r
/* Function Prototypes: */\r
* \param MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state.\r
* \param Event Pointer to a populated USB_MIDI_EventPacket_t structure containing the MIDI event to send\r
*/\r
- void MIDI_Device_SendEventPacket(USB_ClassInfo_MIDI_Device_t* MIDIInterfaceInfo, USB_MIDI_EventPacket_t* Event);\r
+ void MIDI_Device_SendEventPacket(USB_ClassInfo_MIDI_Device_t* MIDIInterfaceInfo, MIDI_EventPacket_t* Event);\r
\r
/** Receives a MIDI event packet from the host.\r
*\r
*\r
* \return Boolean true if a MIDI event packet was received, false otherwise\r
*/\r
- bool MIDI_Device_ReceiveEventPacket(USB_ClassInfo_MIDI_Device_t* MIDIInterfaceInfo, USB_MIDI_EventPacket_t* Event);\r
+ bool MIDI_Device_ReceiveEventPacket(USB_ClassInfo_MIDI_Device_t* MIDIInterfaceInfo, MIDI_EventPacket_t* Event);\r
\r
/* Disable C linkage for C++ Compilers: */\r
#if defined(__cplusplus)\r
\r
CallbackMSInterfaceInfo = MSInterfaceInfo;\r
Endpoint_Read_Stream_LE(&MSInterfaceInfo->State.CommandBlock,\r
- (sizeof(CommandBlockWrapper_t) - 16),\r
+ (sizeof(MS_CommandBlockWrapper_t) - 16),\r
StreamCallback_MS_Device_AbortOnMassStoreReset);\r
\r
if ((MSInterfaceInfo->State.CommandBlock.Signature != MS_CBW_SIGNATURE) ||\r
}\r
\r
CallbackMSInterfaceInfo = MSInterfaceInfo;\r
- Endpoint_Write_Stream_LE(&MSInterfaceInfo->State.CommandStatus, sizeof(CommandStatusWrapper_t),\r
+ Endpoint_Write_Stream_LE(&MSInterfaceInfo->State.CommandStatus, sizeof(MS_CommandStatusWrapper_t),\r
StreamCallback_MS_Device_AbortOnMassStoreReset);\r
\r
Endpoint_ClearIN();\r
#endif\r
\r
/* Public Interface - May be used in end-application: */\r
- /* Type Defines: */\r
- /** Configuration information structure for \ref USB_ClassInfo_MS_Device_t Mass Storage device interface structures. */\r
- typedef struct\r
- {\r
- uint8_t InterfaceNumber; /**< Interface number of the Mass Storage interface within the device */\r
-\r
- uint8_t DataINEndpointNumber; /**< Endpoint number of the Mass Storage interface's IN data endpoint */\r
- uint16_t DataINEndpointSize; /**< Size in bytes of the Mass Storage interface's IN data endpoint */\r
-\r
- uint8_t DataOUTEndpointNumber; /**< Endpoint number of the Mass Storage interface's OUT data endpoint */\r
- uint16_t DataOUTEndpointSize; /**< Size in bytes of the Mass Storage interface's OUT data endpoint */\r
-\r
- uint8_t TotalLUNs; /**< Total number of logical drives in the Mass Storage interface */\r
- } USB_ClassInfo_MS_Device_Config_t;\r
- \r
- /** Current State information structure for \ref USB_ClassInfo_MS_Device_t Mass Storage device interface structures. */\r
- typedef struct\r
- {\r
- CommandBlockWrapper_t CommandBlock; /**< Mass Storage class command block structure, stores the received SCSI\r
- * command from the host which is to be processed\r
- */\r
- CommandStatusWrapper_t CommandStatus; /**< Mass Storage class command status structure, set elements to indicate\r
- * the issued command's success or failure to the host\r
- */\r
-\r
- bool IsMassStoreReset; /**< Flag indicating that the host has requested that the Mass Storage interface be reset\r
- * and that all current Mass Storage operations should immediately abort\r
- */\r
- } USB_ClassInfo_MS_Device_State_t;\r
- \r
+ /* Type Defines: */ \r
/** Class state structure. An instance of this structure should be made for each Mass Storage interface\r
* within the user application, and passed to each of the Mass Storage class driver functions as the\r
* MSInterfaceInfo parameter. This stores each Mass Storage interface's configuration and state information.\r
*/\r
typedef struct\r
{\r
- const USB_ClassInfo_MS_Device_Config_t Config; /**< Config data for the USB class interface within\r
- * the device. All elements in this section\r
- * <b>must</b> be set or the interface will fail\r
- * to enumerate and operate correctly.\r
- */\r
- \r
- USB_ClassInfo_MS_Device_State_t State; /**< State data for the USB class interface within\r
- * the device. All elements in this section\r
- * <b>may</b> be set to initial values, but may\r
- * also be ignored to default to sane values when\r
- * the interface is enumerated.\r
- */\r
+ const struct\r
+ {\r
+ uint8_t InterfaceNumber; /**< Interface number of the Mass Storage interface within the device */\r
+\r
+ uint8_t DataINEndpointNumber; /**< Endpoint number of the Mass Storage interface's IN data endpoint */\r
+ uint16_t DataINEndpointSize; /**< Size in bytes of the Mass Storage interface's IN data endpoint */\r
+\r
+ uint8_t DataOUTEndpointNumber; /**< Endpoint number of the Mass Storage interface's OUT data endpoint */\r
+ uint16_t DataOUTEndpointSize; /**< Size in bytes of the Mass Storage interface's OUT data endpoint */\r
+\r
+ uint8_t TotalLUNs; /**< Total number of logical drives in the Mass Storage interface */\r
+ } Config; /**< Config data for the USB class interface within the device. All elements in this section\r
+ * <b>must</b> be set or the interface will fail to enumerate and operate correctly.\r
+ */\r
+ struct\r
+ {\r
+ MS_CommandBlockWrapper_t CommandBlock; /**< Mass Storage class command block structure, stores the received SCSI\r
+ * command from the host which is to be processed\r
+ */\r
+ MS_CommandStatusWrapper_t CommandStatus; /**< Mass Storage class command status structure, set elements to indicate\r
+ * the issued command's success or failure to the host\r
+ */\r
+ bool IsMassStoreReset; /**< Flag indicating that the host has requested that the Mass Storage interface be reset\r
+ * and that all current Mass Storage operations should immediately abort\r
+ */\r
+ } State; /**< State data for the USB class interface within the device. All elements in this section\r
+ * <b>may</b> be set to initial values, but may also be ignored to default to sane values when\r
+ * the interface is enumerated.\r
+ */\r
} USB_ClassInfo_MS_Device_t;\r
\r
/* Function Prototypes: */\r
#endif\r
\r
/* Public Interface - May be used in end-application: */\r
- /* Type Defines: */\r
- /** Configuration information structure for \ref USB_ClassInfo_RNDIS_Device_t RNDIS device interface structures. */\r
- typedef struct\r
- {\r
- uint8_t ControlInterfaceNumber; /**< Interface number of the CDC control interface within the device */\r
-\r
- uint8_t DataINEndpointNumber; /**< Endpoint number of the CDC interface's IN data endpoint */\r
- uint16_t DataINEndpointSize; /**< Size in bytes of the CDC interface's IN data endpoint */\r
-\r
- uint8_t DataOUTEndpointNumber; /**< Endpoint number of the CDC interface's OUT data endpoint */\r
- uint16_t DataOUTEndpointSize; /**< Size in bytes of the CDC interface's OUT data endpoint */\r
-\r
- uint8_t NotificationEndpointNumber; /**< Endpoint number of the CDC interface's IN notification endpoint, if used */\r
- uint16_t NotificationEndpointSize; /**< Size in bytes of the CDC interface's IN notification endpoint, if used */\r
- \r
- char* AdapterVendorDescription; /**< String description of the adapter vendor */\r
- MAC_Address_t AdapterMACAddress; /**< MAC address of the adapter */\r
- } USB_ClassInfo_MS_Device_Config_t;\r
- \r
- /** Current State information structure for \ref USB_ClassInfo_RNDIS_Device_t RNDIS device interface structures. */\r
- typedef struct\r
- {\r
- uint8_t RNDISMessageBuffer[RNDIS_MESSAGE_BUFFER_SIZE]; /**< Buffer to hold RNDIS messages to and from the host,\r
- * managed by the class driver\r
- */\r
- bool ResponseReady; /**< Internal flag indicating if a RNDIS message is waiting to be returned to the host */\r
- uint8_t CurrRNDISState; /**< Current RNDIS state of the adapter, a value from the RNDIS_States_t enum */\r
- uint32_t CurrPacketFilter; /**< Current packet filter mode, used internally by the class driver */\r
- Ethernet_Frame_Info_t FrameIN; /**< Structure holding the last received Ethernet frame from the host, for user\r
- * processing\r
- */\r
- Ethernet_Frame_Info_t FrameOUT; /**< Structure holding the next Ethernet frame to send to the host, populated by the\r
- * user application\r
- */\r
- } USB_ClassInfo_MS_Device_State_t;\r
- \r
+ /* Type Defines: */ \r
/** Class state structure. An instance of this structure should be made for each RNDIS interface\r
* within the user application, and passed to each of the RNDIS class driver functions as the\r
* RNDISInterfaceInfo parameter. This stores each RNDIS interface's configuration and state information.\r
*/\r
typedef struct\r
{\r
- const USB_ClassInfo_MS_Device_Config_t Config; /**< Config data for the USB class interface within\r
- * the device. All elements in this section\r
- * <b>must</b> be set or the interface will fail\r
- * to enumerate and operate correctly.\r
- */\r
- \r
- USB_ClassInfo_MS_Device_State_t State; /**< State data for the USB class interface within\r
- * the device. All elements in this section\r
- * <b>may</b> be set to initial values, but may\r
- * also be ignored to default to sane values when\r
- * the interface is enumerated.\r
- */\r
+ const struct\r
+ {\r
+ uint8_t ControlInterfaceNumber; /**< Interface number of the CDC control interface within the device */\r
+\r
+ uint8_t DataINEndpointNumber; /**< Endpoint number of the CDC interface's IN data endpoint */\r
+ uint16_t DataINEndpointSize; /**< Size in bytes of the CDC interface's IN data endpoint */\r
+\r
+ uint8_t DataOUTEndpointNumber; /**< Endpoint number of the CDC interface's OUT data endpoint */\r
+ uint16_t DataOUTEndpointSize; /**< Size in bytes of the CDC interface's OUT data endpoint */\r
+\r
+ uint8_t NotificationEndpointNumber; /**< Endpoint number of the CDC interface's IN notification endpoint, if used */\r
+ uint16_t NotificationEndpointSize; /**< Size in bytes of the CDC interface's IN notification endpoint, if used */\r
+ \r
+ char* AdapterVendorDescription; /**< String description of the adapter vendor */\r
+ MAC_Address_t AdapterMACAddress; /**< MAC address of the adapter */\r
+ } Config; /**< Config data for the USB class interface within the device. All elements in this section\r
+ * <b>must</b> be set or the interface will fail to enumerate and operate correctly.\r
+ */\r
+ struct\r
+ {\r
+ uint8_t RNDISMessageBuffer[RNDIS_MESSAGE_BUFFER_SIZE]; /**< Buffer to hold RNDIS messages to and from the host,\r
+ * managed by the class driver\r
+ */\r
+ bool ResponseReady; /**< Internal flag indicating if a RNDIS message is waiting to be returned to the host */\r
+ uint8_t CurrRNDISState; /**< Current RNDIS state of the adapter, a value from the RNDIS_States_t enum */\r
+ uint32_t CurrPacketFilter; /**< Current packet filter mode, used internally by the class driver */\r
+ Ethernet_Frame_Info_t FrameIN; /**< Structure holding the last received Ethernet frame from the host, for user\r
+ * processing\r
+ */\r
+ Ethernet_Frame_Info_t FrameOUT; /**< Structure holding the next Ethernet frame to send to the host, populated by the\r
+ * user application\r
+ */\r
+ } State; /**< State data for the USB class interface within the device. All elements in this section\r
+ * <b>may</b> be set to initial values, but may also be ignored to default to sane values when\r
+ * the interface is enumerated.\r
+ */\r
} USB_ClassInfo_RNDIS_Device_t;\r
\r
/* Function Prototypes: */\r
#endif\r
\r
/* Public Interface - May be used in end-application: */\r
- /* Type Defines: */ \r
- /** Configuration information structure for \ref USB_ClassInfo_CDC_Host_t CDC host interface structures. */\r
- typedef struct\r
- {\r
- uint8_t DataINPipeNumber; /**< Pipe number of the CDC interface's IN data pipe */\r
- uint8_t DataOUTPipeNumber; /**< Pipe number of the CDC interface's OUT data pipe */\r
- uint8_t NotificationPipeNumber; /**< Pipe number of the CDC interface's IN notification endpoint, if used */ \r
- } USB_ClassInfo_CDC_Host_Config_t;\r
- \r
- /** Current State information structure for \ref USB_ClassInfo_CDC_Host_t CDC host interface structures. */\r
- typedef struct\r
- {\r
- uint8_t ControlInterfaceNumber; /**< Interface number of the CDC control interface within the device */\r
-\r
- uint16_t DataINPipeSize; /**< Size in bytes of the CDC interface's IN data pipe */\r
- uint16_t DataOUTPipeSize; /**< Size in bytes of the CDC interface's OUT data pipe */\r
- uint16_t NotificationPipeSize; /**< Size in bytes of the CDC interface's IN notification endpoint, if used */\r
-\r
- struct\r
- {\r
- uint8_t HostToDevice; /**< Control line states from the host to device, as a set of CDC_CONTROL_LINE_OUT_*\r
- * masks.\r
- */\r
- uint8_t DeviceToHost; /**< Control line states from the device to host, as a set of CDC_CONTROL_LINE_IN_*\r
- * masks.\r
- */\r
- } ControlLineStates;\r
- \r
- struct\r
- {\r
- bool Active; /**< Indicates if the interface is currently active, i.e. attached to the connected device */\r
- \r
- uint32_t BaudRateBPS; /**< Baud rate of the virtual serial port, in bits per second */\r
- uint8_t CharFormat; /**< Character format of the virtual serial port, a value from the\r
- * CDCDevice_CDC_LineCodingFormats_t enum\r
- */\r
- uint8_t ParityType; /**< Parity setting of the virtual serial port, a value from the\r
- * CDCDevice_LineCodingParity_t enum\r
- */\r
- uint8_t DataBits; /**< Bits of data per character of the virtual serial port */\r
- } LineEncoding;\r
- } USB_ClassInfo_CDC_Host_State_t;\r
-\r
+ /* Type Defines: */\r
/** Class state structure. An instance of this structure should be made within the user application,\r
* and passed to each of the CDC class driver functions as the CDCInterfaceInfo parameter. This\r
* stores each CDC interface's configuration and state information.\r
*/\r
typedef struct\r
{\r
- const USB_ClassInfo_CDC_Host_Config_t Config; /**< Config data for the USB class interface within\r
- * the device. All elements in this section\r
- * <b>must</b> be set or the interface will fail\r
- * to enumerate and operate correctly.\r
- */\r
-\r
- USB_ClassInfo_CDC_Host_State_t State; /**< State data for the USB class interface within\r
- * the device. All elements in this section\r
- * <b>may</b> be set to initial values, but may\r
- * also be ignored to default to sane values when\r
- * the interface is enumerated.\r
- */\r
+ const struct\r
+ {\r
+ uint8_t DataINPipeNumber; /**< Pipe number of the CDC interface's IN data pipe */\r
+ uint8_t DataOUTPipeNumber; /**< Pipe number of the CDC interface's OUT data pipe */\r
+ uint8_t NotificationPipeNumber; /**< Pipe number of the CDC interface's IN notification endpoint, if used */ \r
+ } Config; /**< Config data for the USB class interface within the device. All elements in this section\r
+ * <b>must</b> be set or the interface will fail to enumerate and operate correctly.\r
+ */\r
+ struct\r
+ {\r
+ uint8_t ControlInterfaceNumber; /**< Interface number of the CDC control interface within the device */\r
+\r
+ uint16_t DataINPipeSize; /**< Size in bytes of the CDC interface's IN data pipe */\r
+ uint16_t DataOUTPipeSize; /**< Size in bytes of the CDC interface's OUT data pipe */\r
+ uint16_t NotificationPipeSize; /**< Size in bytes of the CDC interface's IN notification endpoint, if used */\r
+\r
+ struct\r
+ {\r
+ uint8_t HostToDevice; /**< Control line states from the host to device, as a set of CDC_CONTROL_LINE_OUT_*\r
+ * masks.\r
+ */\r
+ uint8_t DeviceToHost; /**< Control line states from the device to host, as a set of CDC_CONTROL_LINE_IN_*\r
+ * masks.\r
+ */\r
+ } ControlLineStates;\r
+ \r
+ struct\r
+ {\r
+ bool Active; /**< Indicates if the interface is currently active, i.e. attached to the connected device */\r
+ \r
+ uint32_t BaudRateBPS; /**< Baud rate of the virtual serial port, in bits per second */\r
+ uint8_t CharFormat; /**< Character format of the virtual serial port, a value from the\r
+ * CDCDevice_CDC_LineCodingFormats_t enum\r
+ */\r
+ uint8_t ParityType; /**< Parity setting of the virtual serial port, a value from the\r
+ * CDCDevice_LineCodingParity_t enum\r
+ */\r
+ uint8_t DataBits; /**< Bits of data per character of the virtual serial port */\r
+ } LineEncoding;\r
+ } State; /**< State data for the USB class interface within the device. All elements in this section\r
+ * <b>may</b> be set to initial values, but may also be ignored to default to sane values when\r
+ * the interface is enumerated.\r
+ */\r
} USB_ClassInfo_CDC_Host_t;\r
\r
/* Enums: */\r
\r
.KeyboardHID = \r
{ \r
- .Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},\r
+ .Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID},\r
\r
.HIDSpec = VERSION_BCD(01.11),\r
.CountryCode = 0x00,\r
break;\r
case DTYPE_HID:\r
Address = (void*)&ConfigurationDescriptor.KeyboardHID;\r
- Size = sizeof(USB_Descriptor_HID_t);\r
+ Size = sizeof(USB_HID_Descriptor_t);\r
break;\r
case DTYPE_Report:\r
Address = (void*)&KeyboardReport;\r
{\r
USB_Descriptor_Configuration_Header_t Config; /**< Configuration descriptor header structure */\r
USB_Descriptor_Interface_t Interface; /**< Keyboard interface descriptor */\r
- USB_Descriptor_HID_t KeyboardHID; /**< Keyboard HID descriptor */\r
+ USB_HID_Descriptor_t KeyboardHID; /**< Keyboard HID descriptor */\r
USB_Descriptor_Endpoint_t KeyboardEndpoint; /**< Keyboard key report endpoint descriptor */\r
} USB_Descriptor_Configuration_t;\r
\r