From c166dfc64ea10903a43a429709a92dc7ef9ee9dc Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Thu, 9 Sep 2010 13:05:57 +0000 Subject: Added class specific descriptor type defines with standard USB-IF element naming. --- .../Incomplete/MIDIToneGenerator/Descriptors.c | 22 +++++++++--------- .../Incomplete/MIDIToneGenerator/Descriptors.h | 26 +++++++++++----------- Projects/Magstripe/Descriptors.c | 4 ++-- Projects/Magstripe/Descriptors.h | 2 +- Projects/TempDataLogger/Descriptors.c | 4 ++-- Projects/TempDataLogger/Descriptors.h | 2 +- 6 files changed, 30 insertions(+), 30 deletions(-) (limited to 'Projects') diff --git a/Projects/Incomplete/MIDIToneGenerator/Descriptors.c b/Projects/Incomplete/MIDIToneGenerator/Descriptors.c index fc3addb95..34595419d 100644 --- a/Projects/Incomplete/MIDIToneGenerator/Descriptors.c +++ b/Projects/Incomplete/MIDIToneGenerator/Descriptors.c @@ -104,11 +104,11 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Audio_ControlInterface_SPC = { - .Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_AudioInterface}, + .Header = {.Size = sizeof(USB_Audio_Descriptor_Interface_AC_t), .Type = DTYPE_AudioInterface}, .Subtype = DSUBTYPE_Header, .ACSpecification = VERSION_BCD(01.00), - .TotalLength = sizeof(USB_Audio_Interface_AC_t), + .TotalLength = sizeof(USB_Audio_Descriptor_Interface_AC_t), .InCollection = 1, .InterfaceNumbers = {1}, @@ -132,7 +132,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Audio_StreamInterface_SPC = { - .Header = {.Size = sizeof(USB_MIDI_AudioInterface_AS_t), .Type = DTYPE_AudioInterface}, + .Header = {.Size = sizeof(USB_MIDI_Descriptor_AudioInterface_AS_t), .Type = DTYPE_AudioInterface}, .Subtype = DSUBTYPE_General, .AudioSpecification = VERSION_BCD(01.00), @@ -143,7 +143,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .MIDI_In_Jack_Emb = { - .Header = {.Size = sizeof(USB_MIDI_In_Jack_t), .Type = DTYPE_AudioInterface}, + .Header = {.Size = sizeof(USB_MIDI_Descriptor_InputJack_t), .Type = DTYPE_AudioInterface}, .Subtype = DSUBTYPE_InputJack, .JackType = MIDI_JACKTYPE_EMBEDDED, @@ -154,7 +154,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .MIDI_In_Jack_Ext = { - .Header = {.Size = sizeof(USB_MIDI_In_Jack_t), .Type = DTYPE_AudioInterface}, + .Header = {.Size = sizeof(USB_MIDI_Descriptor_InputJack_t), .Type = DTYPE_AudioInterface}, .Subtype = DSUBTYPE_InputJack, .JackType = MIDI_JACKTYPE_EXTERNAL, @@ -165,7 +165,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .MIDI_Out_Jack_Emb = { - .Header = {.Size = sizeof(USB_MIDI_Out_Jack_t), .Type = DTYPE_AudioInterface}, + .Header = {.Size = sizeof(USB_MIDI_Descriptor_OutputJack_t), .Type = DTYPE_AudioInterface}, .Subtype = DSUBTYPE_OutputJack, .JackType = MIDI_JACKTYPE_EMBEDDED, @@ -180,7 +180,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .MIDI_Out_Jack_Ext = { - .Header = {.Size = sizeof(USB_MIDI_Out_Jack_t), .Type = DTYPE_AudioInterface}, + .Header = {.Size = sizeof(USB_MIDI_Descriptor_OutputJack_t), .Type = DTYPE_AudioInterface}, .Subtype = DSUBTYPE_OutputJack, .JackType = MIDI_JACKTYPE_EXTERNAL, @@ -197,7 +197,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Endpoint = { - .Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint}, + .Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint}, .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | MIDI_STREAM_OUT_EPNUM), .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), @@ -211,7 +211,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .MIDI_In_Jack_Endpoint_SPC = { - .Header = {.Size = sizeof(USB_MIDI_Jack_Endpoint_t), .Type = DTYPE_AudioEndpoint}, + .Header = {.Size = sizeof(USB_MIDI_Descriptor_Jack_Endpoint_t), .Type = DTYPE_AudioEndpoint}, .Subtype = DSUBTYPE_General, .TotalEmbeddedJacks = 0x01, @@ -222,7 +222,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Endpoint = { - .Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint}, + .Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint}, .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | MIDI_STREAM_IN_EPNUM), .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), @@ -236,7 +236,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .MIDI_Out_Jack_Endpoint_SPC = { - .Header = {.Size = sizeof(USB_MIDI_Jack_Endpoint_t), .Type = DTYPE_AudioEndpoint}, + .Header = {.Size = sizeof(USB_MIDI_Descriptor_Jack_Endpoint_t), .Type = DTYPE_AudioEndpoint}, .Subtype = DSUBTYPE_General, .TotalEmbeddedJacks = 0x01, diff --git a/Projects/Incomplete/MIDIToneGenerator/Descriptors.h b/Projects/Incomplete/MIDIToneGenerator/Descriptors.h index 8165fedf6..52ba98f06 100644 --- a/Projects/Incomplete/MIDIToneGenerator/Descriptors.h +++ b/Projects/Incomplete/MIDIToneGenerator/Descriptors.h @@ -59,19 +59,19 @@ */ typedef struct { - USB_Descriptor_Configuration_Header_t Config; - USB_Descriptor_Interface_t Audio_ControlInterface; - USB_Audio_Interface_AC_t Audio_ControlInterface_SPC; - USB_Descriptor_Interface_t Audio_StreamInterface; - USB_MIDI_AudioInterface_AS_t Audio_StreamInterface_SPC; - USB_MIDI_In_Jack_t MIDI_In_Jack_Emb; - USB_MIDI_In_Jack_t MIDI_In_Jack_Ext; - USB_MIDI_Out_Jack_t MIDI_Out_Jack_Emb; - USB_MIDI_Out_Jack_t MIDI_Out_Jack_Ext; - USB_Audio_StreamEndpoint_Std_t MIDI_In_Jack_Endpoint; - USB_MIDI_Jack_Endpoint_t MIDI_In_Jack_Endpoint_SPC; - USB_Audio_StreamEndpoint_Std_t MIDI_Out_Jack_Endpoint; - USB_MIDI_Jack_Endpoint_t MIDI_Out_Jack_Endpoint_SPC; + USB_Descriptor_Configuration_Header_t Config; + USB_Descriptor_Interface_t Audio_ControlInterface; + USB_Audio_Descriptor_Interface_AC_t Audio_ControlInterface_SPC; + USB_Descriptor_Interface_t Audio_StreamInterface; + USB_MIDI_Descriptor_AudioInterface_AS_t Audio_StreamInterface_SPC; + USB_MIDI_Descriptor_InputJack_t MIDI_In_Jack_Emb; + USB_MIDI_Descriptor_InputJack_t MIDI_In_Jack_Ext; + USB_MIDI_Descriptor_OutputJack_t MIDI_Out_Jack_Emb; + USB_MIDI_Descriptor_OutputJack_t MIDI_Out_Jack_Ext; + USB_Audio_Descriptor_StreamEndpoint_Std_t MIDI_In_Jack_Endpoint; + USB_MIDI_Descriptor_Jack_Endpoint_t MIDI_In_Jack_Endpoint_SPC; + USB_Audio_Descriptor_StreamEndpoint_Std_t MIDI_Out_Jack_Endpoint; + USB_MIDI_Descriptor_Jack_Endpoint_t MIDI_Out_Jack_Endpoint_SPC; } USB_Descriptor_Configuration_t; /* Function Prototypes: */ diff --git a/Projects/Magstripe/Descriptors.c b/Projects/Magstripe/Descriptors.c index eb2b72b1e..41c1c4bda 100644 --- a/Projects/Magstripe/Descriptors.c +++ b/Projects/Magstripe/Descriptors.c @@ -138,7 +138,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .HID_KeyboardHID = { - .Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID}, + .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = DTYPE_HID}, .HIDSpec = VERSION_BCD(01.11), .CountryCode = 0x00, @@ -236,7 +236,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, break; case DTYPE_HID: Address = &ConfigurationDescriptor.HID_KeyboardHID; - Size = sizeof(USB_HID_Descriptor_t); + Size = sizeof(USB_HID_Descriptor_HID_t); break; case DTYPE_Report: Address = &KeyboardReport; diff --git a/Projects/Magstripe/Descriptors.h b/Projects/Magstripe/Descriptors.h index 850d6bc24..7180bf3e7 100644 --- a/Projects/Magstripe/Descriptors.h +++ b/Projects/Magstripe/Descriptors.h @@ -52,7 +52,7 @@ { USB_Descriptor_Configuration_Header_t Config; /**< Configuration descriptor header structure */ USB_Descriptor_Interface_t HID_Interface; /**< Keyboard interface descriptor */ - USB_HID_Descriptor_t HID_KeyboardHID; /**< Keyboard HID descriptor */ + USB_HID_Descriptor_HID_t HID_KeyboardHID; /**< Keyboard HID descriptor */ USB_Descriptor_Endpoint_t HID_ReportINEndpoint; /**< Keyboard key report endpoint descriptor */ } USB_Descriptor_Configuration_t; diff --git a/Projects/TempDataLogger/Descriptors.c b/Projects/TempDataLogger/Descriptors.c index d6e89603c..1b8a4a2f9 100644 --- a/Projects/TempDataLogger/Descriptors.c +++ b/Projects/TempDataLogger/Descriptors.c @@ -178,7 +178,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .HID_GenericHID = { - .Header = {.Size = sizeof(USB_HID_Descriptor_t), .Type = DTYPE_HID}, + .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = DTYPE_HID}, .HIDSpec = VERSION_BCD(01.11), .CountryCode = 0x00, @@ -277,7 +277,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, break; case DTYPE_HID: Address = &ConfigurationDescriptor.HID_GenericHID; - Size = sizeof(USB_HID_Descriptor_t); + Size = sizeof(USB_HID_Descriptor_HID_t); break; case DTYPE_Report: Address = &GenericReport; diff --git a/Projects/TempDataLogger/Descriptors.h b/Projects/TempDataLogger/Descriptors.h index 7f65cab33..a4916ace1 100644 --- a/Projects/TempDataLogger/Descriptors.h +++ b/Projects/TempDataLogger/Descriptors.h @@ -49,7 +49,7 @@ USB_Descriptor_Endpoint_t MS_DataInEndpoint; USB_Descriptor_Endpoint_t MS_DataOutEndpoint; USB_Descriptor_Interface_t HID_Interface; - USB_HID_Descriptor_t HID_GenericHID; + USB_HID_Descriptor_HID_t HID_GenericHID; USB_Descriptor_Endpoint_t HID_ReportINEndpoint; } USB_Descriptor_Configuration_t; -- cgit v1.2.3