diff options
Diffstat (limited to 'Demos')
44 files changed, 244 insertions, 257 deletions
diff --git a/Demos/Device/ClassDriver/AudioInput/Descriptors.c b/Demos/Device/ClassDriver/AudioInput/Descriptors.c index ba8c00182..991b33e30 100644 --- a/Demos/Device/ClassDriver/AudioInput/Descriptors.c +++ b/Demos/Device/ClassDriver/AudioInput/Descriptors.c @@ -104,8 +104,8 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Audio_ControlInterface_SPC = { - .Header = {.Size = sizeof(USB_Audio_Descriptor_Interface_AC_t), .Type = DTYPE_AudioInterface}, - .Subtype = DSUBTYPE_Header, + .Header = {.Size = sizeof(USB_Audio_Descriptor_Interface_AC_t), .Type = DTYPE_CSInterface}, + .Subtype = AUDIO_DSUBTYPE_CSInterface_Header, .ACSpecification = VERSION_BCD(01.00), .TotalLength = (sizeof(USB_Audio_Descriptor_Interface_AC_t) + @@ -113,13 +113,13 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = sizeof(USB_Audio_Descriptor_OutputTerminal_t)), .InCollection = 1, - .InterfaceNumbers = {1}, + .InterfaceNumber = 1, }, .Audio_InputTerminal = { - .Header = {.Size = sizeof(USB_Audio_Descriptor_InputTerminal_t), .Type = DTYPE_AudioInterface}, - .Subtype = DSUBTYPE_InputTerminal, + .Header = {.Size = sizeof(USB_Audio_Descriptor_InputTerminal_t), .Type = DTYPE_CSInterface}, + .Subtype = AUDIO_DSUBTYPE_CSInterface_InputTerminal, .TerminalID = 0x01, .TerminalType = TERMINAL_IN_MIC, @@ -134,8 +134,8 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Audio_OutputTerminal = { - .Header = {.Size = sizeof(USB_Audio_Descriptor_OutputTerminal_t), .Type = DTYPE_AudioInterface}, - .Subtype = DSUBTYPE_OutputTerminal, + .Header = {.Size = sizeof(USB_Audio_Descriptor_OutputTerminal_t), .Type = DTYPE_CSInterface}, + .Subtype = AUDIO_DSUBTYPE_CSInterface_OutputTerminal, .TerminalID = 0x02, .TerminalType = TERMINAL_STREAMING, @@ -180,8 +180,8 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Audio_StreamInterface_SPC = { - .Header = {.Size = sizeof(USB_Audio_Descriptor_Interface_AS_t), .Type = DTYPE_AudioInterface}, - .Subtype = DSUBTYPE_General, + .Header = {.Size = sizeof(USB_Audio_Descriptor_Interface_AS_t), .Type = DTYPE_CSInterface}, + .Subtype = AUDIO_DSUBTYPE_CSInterface_General, .TerminalLink = 0x02, @@ -191,8 +191,8 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Audio_AudioFormat = { - .Header = {.Size = sizeof(USB_Audio_Descriptor_Format_t), .Type = DTYPE_AudioInterface}, - .Subtype = DSUBTYPE_Format, + .Header = {.Size = sizeof(USB_Audio_Descriptor_Format_t), .Type = DTYPE_CSInterface}, + .Subtype = AUDIO_DSUBTYPE_CSInterface_FormatType, .FormatType = 0x01, .Channels = 0x01, @@ -222,8 +222,8 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Audio_StreamEndpoint_SPC = { - .Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint}, - .Subtype = DSUBTYPE_General, + .Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Spc_t), .Type = DTYPE_CSEndpoint}, + .Subtype = AUDIO_DSUBTYPE_CSEndpoint_General, .Attributes = 0x00, diff --git a/Demos/Device/ClassDriver/AudioOutput/Descriptors.c b/Demos/Device/ClassDriver/AudioOutput/Descriptors.c index 9f385017a..57668f2df 100644 --- a/Demos/Device/ClassDriver/AudioOutput/Descriptors.c +++ b/Demos/Device/ClassDriver/AudioOutput/Descriptors.c @@ -104,8 +104,8 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Audio_ControlInterface_SPC = { - .Header = {.Size = sizeof(USB_Audio_Descriptor_Interface_AC_t), .Type = DTYPE_AudioInterface}, - .Subtype = DSUBTYPE_Header, + .Header = {.Size = sizeof(USB_Audio_Descriptor_Interface_AC_t), .Type = DTYPE_CSInterface}, + .Subtype = AUDIO_DSUBTYPE_CSInterface_Header, .ACSpecification = VERSION_BCD(01.00), .TotalLength = (sizeof(USB_Audio_Descriptor_Interface_AC_t) + @@ -113,13 +113,13 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = sizeof(USB_Audio_Descriptor_OutputTerminal_t)), .InCollection = 1, - .InterfaceNumbers = {1}, + .InterfaceNumber = 1, }, .Audio_InputTerminal = { - .Header = {.Size = sizeof(USB_Audio_Descriptor_InputTerminal_t), .Type = DTYPE_AudioInterface}, - .Subtype = DSUBTYPE_InputTerminal, + .Header = {.Size = sizeof(USB_Audio_Descriptor_InputTerminal_t), .Type = DTYPE_CSInterface}, + .Subtype = AUDIO_DSUBTYPE_CSInterface_InputTerminal, .TerminalID = 0x01, .TerminalType = TERMINAL_STREAMING, @@ -134,8 +134,8 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Audio_OutputTerminal = { - .Header = {.Size = sizeof(USB_Audio_Descriptor_OutputTerminal_t), .Type = DTYPE_AudioInterface}, - .Subtype = DSUBTYPE_OutputTerminal, + .Header = {.Size = sizeof(USB_Audio_Descriptor_OutputTerminal_t), .Type = DTYPE_CSInterface}, + .Subtype = AUDIO_DSUBTYPE_CSInterface_OutputTerminal, .TerminalID = 0x02, .TerminalType = TERMINAL_OUT_SPEAKER, @@ -180,8 +180,8 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Audio_StreamInterface_SPC = { - .Header = {.Size = sizeof(USB_Audio_Descriptor_Interface_AS_t), .Type = DTYPE_AudioInterface}, - .Subtype = DSUBTYPE_General, + .Header = {.Size = sizeof(USB_Audio_Descriptor_Interface_AS_t), .Type = DTYPE_CSInterface}, + .Subtype = AUDIO_DSUBTYPE_CSInterface_General, .TerminalLink = 0x01, @@ -191,8 +191,8 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Audio_AudioFormat = { - .Header = {.Size = sizeof(USB_Audio_Descriptor_Format_t), .Type = DTYPE_AudioInterface}, - .Subtype = DSUBTYPE_Format, + .Header = {.Size = sizeof(USB_Audio_Descriptor_Format_t), .Type = DTYPE_CSInterface}, + .Subtype = AUDIO_DSUBTYPE_CSInterface_FormatType, .FormatType = 0x01, .Channels = 0x02, @@ -222,8 +222,8 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Audio_StreamEndpoint_SPC = { - .Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint}, - .Subtype = DSUBTYPE_General, + .Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Spc_t), .Type = DTYPE_CSEndpoint}, + .Subtype = AUDIO_DSUBTYPE_CSEndpoint_General, .Attributes = EP_ACCEPTS_SMALL_PACKETS, diff --git a/Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.c b/Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.c index 617cebd46..20ba4936c 100644 --- a/Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.c +++ b/Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.c @@ -128,28 +128,29 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .InterfaceStrIndex = NO_DESCRIPTOR }, - .CDC1_Functional_IntHeader = + .CDC1_Functional_Header = { - .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24}, - .SubType = 0x00, + .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalHeader_t), .Type = DTYPE_CSInterface}, + .Subtype = CDC_DSUBTYPE_CSInterface_Header, - .Data = {0x01, 0x10} + .CDCSpecification = VERSION_BCD(01.10), }, - .CDC1_Functional_AbstractControlManagement = + .CDC1_Functional_ACM = { - .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), .Type = 0x24}, - .SubType = 0x02, + .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalACM_t), .Type = DTYPE_CSInterface}, + .Subtype = CDC_DSUBTYPE_CSInterface_ACM, - .Data = {0x06} + .Capabilities = 0x06, }, .CDC1_Functional_Union = { - .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24}, - .SubType = 0x06, + .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalUnion_t), .Type = DTYPE_CSInterface}, + .Subtype = CDC_DSUBTYPE_CSInterface_Union, - .Data = {0x00, 0x01} + .MasterInterfaceNumber = 0, + .SlaveInterfaceNumber = 1, }, .CDC1_ManagementEndpoint = @@ -228,28 +229,29 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .InterfaceStrIndex = NO_DESCRIPTOR }, - .CDC2_Functional_IntHeader = + .CDC2_Functional_Header = { - .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24}, - .SubType = 0x00, + .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalHeader_t), .Type = DTYPE_CSInterface}, + .Subtype = CDC_DSUBTYPE_CSInterface_Header, - .Data = {0x01, 0x10} + .CDCSpecification = VERSION_BCD(01.10), }, - .CDC2_Functional_AbstractControlManagement = + .CDC2_Functional_ACM = { - .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), .Type = 0x24}, - .SubType = 0x02, + .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalACM_t), .Type = DTYPE_CSInterface}, + .Subtype = CDC_DSUBTYPE_CSInterface_ACM, - .Data = {0x06} + .Capabilities = 0x06, }, .CDC2_Functional_Union = { - .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24}, - .SubType = 0x06, + .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalUnion_t), .Type = DTYPE_CSInterface}, + .Subtype = CDC_DSUBTYPE_CSInterface_Union, - .Data = {0x02, 0x03} + .MasterInterfaceNumber = 2, + .SlaveInterfaceNumber = 3, }, .CDC2_ManagementEndpoint = diff --git a/Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.h b/Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.h index fd6735ec0..5c1bf53bb 100644 --- a/Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.h +++ b/Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.h @@ -77,18 +77,18 @@ USB_Descriptor_Configuration_Header_t Config; USB_Descriptor_Interface_Association_t CDC1_IAD; USB_Descriptor_Interface_t CDC1_CCI_Interface; - CDC_FUNCTIONAL_DESCRIPTOR(2) CDC1_Functional_IntHeader; - CDC_FUNCTIONAL_DESCRIPTOR(1) CDC1_Functional_AbstractControlManagement; - CDC_FUNCTIONAL_DESCRIPTOR(2) CDC1_Functional_Union; + USB_CDC_Descriptor_FunctionalHeader_t CDC1_Functional_Header; + USB_CDC_Descriptor_FunctionalACM_t CDC1_Functional_ACM; + USB_CDC_Descriptor_FunctionalUnion_t CDC1_Functional_Union; USB_Descriptor_Endpoint_t CDC1_ManagementEndpoint; USB_Descriptor_Interface_t CDC1_DCI_Interface; USB_Descriptor_Endpoint_t CDC1_DataOutEndpoint; USB_Descriptor_Endpoint_t CDC1_DataInEndpoint; USB_Descriptor_Interface_Association_t CDC2_IAD; USB_Descriptor_Interface_t CDC2_CCI_Interface; - CDC_FUNCTIONAL_DESCRIPTOR(2) CDC2_Functional_IntHeader; - CDC_FUNCTIONAL_DESCRIPTOR(1) CDC2_Functional_AbstractControlManagement; - CDC_FUNCTIONAL_DESCRIPTOR(2) CDC2_Functional_Union; + USB_CDC_Descriptor_FunctionalHeader_t CDC2_Functional_Header; + USB_CDC_Descriptor_FunctionalACM_t CDC2_Functional_ACM; + USB_CDC_Descriptor_FunctionalUnion_t CDC2_Functional_Union; USB_Descriptor_Endpoint_t CDC2_ManagementEndpoint; USB_Descriptor_Interface_t CDC2_DCI_Interface; USB_Descriptor_Endpoint_t CDC2_DataOutEndpoint; diff --git a/Demos/Device/ClassDriver/GenericHID/Descriptors.c b/Demos/Device/ClassDriver/GenericHID/Descriptors.c index 26d672c45..1964d533c 100644 --- a/Demos/Device/ClassDriver/GenericHID/Descriptors.c +++ b/Demos/Device/ClassDriver/GenericHID/Descriptors.c @@ -123,19 +123,19 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Class = 0x03, .SubClass = 0x00, - .Protocol = HID_NON_BOOT_PROTOCOL, + .Protocol = HID_BOOTP_NonBootProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, .HID_GenericHID = { - .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = DTYPE_HID}, + .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, .HIDSpec = VERSION_BCD(01.11), .CountryCode = 0x00, .TotalReportDescriptors = 1, - .HIDReportType = DTYPE_Report, + .HIDReportType = HID_DTYPE_Report, .HIDReportLength = sizeof(GenericReport) }, @@ -227,11 +227,11 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, } break; - case DTYPE_HID: + case HID_DTYPE_HID: Address = &ConfigurationDescriptor.HID_GenericHID; Size = sizeof(USB_HID_Descriptor_HID_t); break; - case DTYPE_Report: + case HID_DTYPE_Report: Address = &GenericReport; Size = sizeof(GenericReport); break; diff --git a/Demos/Device/ClassDriver/GenericHID/GenericHID.c b/Demos/Device/ClassDriver/GenericHID/GenericHID.c index 4fe58a8a2..d64c1648e 100644 --- a/Demos/Device/ClassDriver/GenericHID/GenericHID.c +++ b/Demos/Device/ClassDriver/GenericHID/GenericHID.c @@ -138,7 +138,7 @@ void EVENT_USB_Device_StartOfFrame(void) * * \param[in] HIDInterfaceInfo Pointer to the HID class interface configuration structure being referenced * \param[in,out] ReportID Report ID requested by the host if non-zero, otherwise callback should set to the generated report ID - * \param[in] ReportType Type of the report to create, either REPORT_ITEM_TYPE_In or REPORT_ITEM_TYPE_Feature + * \param[in] ReportType Type of the report to create, either HID_REPORT_ITEM_In or HID_REPORT_ITEM_Feature * \param[out] ReportData Pointer to a buffer where the created report should be stored * \param[out] ReportSize Number of bytes written in the report (or zero if no report is to be sent * @@ -163,7 +163,7 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn * * \param[in] HIDInterfaceInfo Pointer to the HID class interface configuration structure being referenced * \param[in] ReportID Report ID of the received report from the host - * \param[in] ReportType The type of report that the host has sent, either REPORT_ITEM_TYPE_Out or REPORT_ITEM_TYPE_Feature + * \param[in] ReportType The type of report that the host has sent, either HID_REPORT_ITEM_Out or HID_REPORT_ITEM_Feature * \param[in] ReportData Pointer to a buffer where the created report has been stored * \param[in] ReportSize Size in bytes of the received HID report */ diff --git a/Demos/Device/ClassDriver/Joystick/Descriptors.c b/Demos/Device/ClassDriver/Joystick/Descriptors.c index 217016fd3..8696e207e 100644 --- a/Demos/Device/ClassDriver/Joystick/Descriptors.c +++ b/Demos/Device/ClassDriver/Joystick/Descriptors.c @@ -133,19 +133,19 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Class = 0x03, .SubClass = 0x00, - .Protocol = HID_NON_BOOT_PROTOCOL, + .Protocol = HID_BOOTP_NonBootProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, .HID_JoystickHID = { - .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = DTYPE_HID}, + .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, .HIDSpec = VERSION_BCD(01.11), .CountryCode = 0x00, .TotalReportDescriptors = 1, - .HIDReportType = DTYPE_Report, + .HIDReportType = HID_DTYPE_Report, .HIDReportLength = sizeof(JoystickReport) }, @@ -237,11 +237,11 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, } break; - case DTYPE_HID: + case HID_DTYPE_HID: Address = &ConfigurationDescriptor.HID_JoystickHID; Size = sizeof(USB_HID_Descriptor_HID_t); break; - case DTYPE_Report: + case HID_DTYPE_Report: Address = &JoystickReport; Size = sizeof(JoystickReport); break; diff --git a/Demos/Device/ClassDriver/Joystick/Joystick.c b/Demos/Device/ClassDriver/Joystick/Joystick.c index 622106fd4..c759e1346 100644 --- a/Demos/Device/ClassDriver/Joystick/Joystick.c +++ b/Demos/Device/ClassDriver/Joystick/Joystick.c @@ -132,7 +132,7 @@ void EVENT_USB_Device_StartOfFrame(void) * * \param[in] HIDInterfaceInfo Pointer to the HID class interface configuration structure being referenced * \param[in,out] ReportID Report ID requested by the host if non-zero, otherwise callback should set to the generated report ID - * \param[in] ReportType Type of the report to create, either REPORT_ITEM_TYPE_In or REPORT_ITEM_TYPE_Feature + * \param[in] ReportType Type of the report to create, either HID_REPORT_ITEM_In or HID_REPORT_ITEM_Feature * \param[out] ReportData Pointer to a buffer where the created report should be stored * \param[out] ReportSize Number of bytes written in the report (or zero if no report is to be sent * @@ -173,7 +173,7 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn * * \param[in] HIDInterfaceInfo Pointer to the HID class interface configuration structure being referenced * \param[in] ReportID Report ID of the received report from the host - * \param[in] ReportType The type of report that the host has sent, either REPORT_ITEM_TYPE_Out or REPORT_ITEM_TYPE_Feature + * \param[in] ReportType The type of report that the host has sent, either HID_REPORT_ITEM_Out or HID_REPORT_ITEM_Feature * \param[in] ReportData Pointer to a buffer where the created report has been stored * \param[in] ReportSize Size in bytes of the received HID report */ diff --git a/Demos/Device/ClassDriver/Keyboard/Descriptors.c b/Demos/Device/ClassDriver/Keyboard/Descriptors.c index 63114b182..ed2cb6c49 100644 --- a/Demos/Device/ClassDriver/Keyboard/Descriptors.c +++ b/Demos/Device/ClassDriver/Keyboard/Descriptors.c @@ -139,19 +139,19 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Class = 0x03, .SubClass = 0x01, - .Protocol = HID_BOOT_KEYBOARD_PROTOCOL, + .Protocol = HID_BOOTP_KeyboardBootProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, .HID_KeyboardHID = { - .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = DTYPE_HID}, + .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, .HIDSpec = VERSION_BCD(01.11), .CountryCode = 0x00, .TotalReportDescriptors = 1, - .HIDReportType = DTYPE_Report, + .HIDReportType = HID_DTYPE_Report, .HIDReportLength = sizeof(KeyboardReport) }, @@ -243,11 +243,11 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, } break; - case DTYPE_HID: + case HID_DTYPE_HID: Address = &ConfigurationDescriptor.HID_KeyboardHID; Size = sizeof(USB_HID_Descriptor_HID_t); break; - case DTYPE_Report: + case HID_DTYPE_Report: Address = &KeyboardReport; Size = sizeof(KeyboardReport); break; diff --git a/Demos/Device/ClassDriver/Keyboard/Keyboard.c b/Demos/Device/ClassDriver/Keyboard/Keyboard.c index 8d8503031..755c25a72 100644 --- a/Demos/Device/ClassDriver/Keyboard/Keyboard.c +++ b/Demos/Device/ClassDriver/Keyboard/Keyboard.c @@ -132,7 +132,7 @@ void EVENT_USB_Device_StartOfFrame(void) * * \param[in] HIDInterfaceInfo Pointer to the HID class interface configuration structure being referenced * \param[in,out] ReportID Report ID requested by the host if non-zero, otherwise callback should set to the generated report ID - * \param[in] ReportType Type of the report to create, either REPORT_ITEM_TYPE_In or REPORT_ITEM_TYPE_Feature + * \param[in] ReportType Type of the report to create, either HID_REPORT_ITEM_In or HID_REPORT_ITEM_Feature * \param[out] ReportData Pointer to a buffer where the created report should be stored * \param[out] ReportSize Number of bytes written in the report (or zero if no report is to be sent * @@ -175,7 +175,7 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn * * \param[in] HIDInterfaceInfo Pointer to the HID class interface configuration structure being referenced * \param[in] ReportID Report ID of the received report from the host - * \param[in] ReportType The type of report that the host has sent, either REPORT_ITEM_TYPE_Out or REPORT_ITEM_TYPE_Feature + * \param[in] ReportType The type of report that the host has sent, either HID_REPORT_ITEM_Out or HID_REPORT_ITEM_Feature * \param[in] ReportData Pointer to a buffer where the created report has been stored * \param[in] ReportSize Size in bytes of the received HID report */ diff --git a/Demos/Device/ClassDriver/KeyboardMouse/Descriptors.c b/Demos/Device/ClassDriver/KeyboardMouse/Descriptors.c index 4f7c55b09..bba7ca20d 100644 --- a/Demos/Device/ClassDriver/KeyboardMouse/Descriptors.c +++ b/Demos/Device/ClassDriver/KeyboardMouse/Descriptors.c @@ -172,19 +172,19 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Class = 0x03, .SubClass = 0x01, - .Protocol = HID_BOOT_KEYBOARD_PROTOCOL, + .Protocol = HID_BOOTP_KeyboardBootProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, .HID1_KeyboardHID = { - .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = DTYPE_HID}, + .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, .HIDSpec = VERSION_BCD(01.11), .CountryCode = 0x00, .TotalReportDescriptors = 1, - .HIDReportType = DTYPE_Report, + .HIDReportType = HID_DTYPE_Report, .HIDReportLength = sizeof(KeyboardReport) }, @@ -209,19 +209,19 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Class = 0x03, .SubClass = 0x01, - .Protocol = HID_BOOT_MOUSE_PROTOCOL, + .Protocol = HID_BOOTP_MouseBootProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, .HID2_MouseHID = { - .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = DTYPE_HID}, + .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, .HIDSpec = VERSION_BCD(01.11), .CountryCode = 0x00, .TotalReportDescriptors = 1, - .HIDReportType = DTYPE_Report, + .HIDReportType = HID_DTYPE_Report, .HIDReportLength = sizeof(MouseReport) }, @@ -313,7 +313,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, } break; - case DTYPE_HID: + case HID_DTYPE_HID: if (!(wIndex)) { Address = &ConfigurationDescriptor.HID1_KeyboardHID; @@ -325,7 +325,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, Size = sizeof(USB_HID_Descriptor_HID_t); } break; - case DTYPE_Report: + case HID_DTYPE_Report: if (!(wIndex)) { Address = &KeyboardReport; diff --git a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c index 6ba7ce3d0..96c430a22 100644 --- a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c +++ b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c @@ -158,7 +158,7 @@ void EVENT_USB_Device_StartOfFrame(void) * * \param[in] HIDInterfaceInfo Pointer to the HID class interface configuration structure being referenced * \param[in,out] ReportID Report ID requested by the host if non-zero, otherwise callback should set to the generated report ID - * \param[in] ReportType Type of the report to create, either REPORT_ITEM_TYPE_In or REPORT_ITEM_TYPE_Feature + * \param[in] ReportType Type of the report to create, either HID_REPORT_ITEM_In or HID_REPORT_ITEM_Feature * \param[out] ReportData Pointer to a buffer where the created report should be stored * \param[out] ReportSize Number of bytes written in the report (or zero if no report is to be sent * @@ -230,7 +230,7 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn * * \param[in] HIDInterfaceInfo Pointer to the HID class interface configuration structure being referenced * \param[in] ReportID Report ID of the received report from the host - * \param[in] ReportType The type of report that the host has sent, either REPORT_ITEM_TYPE_Out or REPORT_ITEM_TYPE_Feature + * \param[in] ReportType The type of report that the host has sent, either HID_REPORT_ITEM_Out or HID_REPORT_ITEM_Feature * \param[in] ReportData Pointer to a buffer where the created report has been stored * \param[in] ReportSize Size in bytes of the received HID report */ diff --git a/Demos/Device/ClassDriver/MIDI/Descriptors.c b/Demos/Device/ClassDriver/MIDI/Descriptors.c index 34595419d..b842bd27e 100644 --- a/Demos/Device/ClassDriver/MIDI/Descriptors.c +++ b/Demos/Device/ClassDriver/MIDI/Descriptors.c @@ -104,14 +104,14 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Audio_ControlInterface_SPC = { - .Header = {.Size = sizeof(USB_Audio_Descriptor_Interface_AC_t), .Type = DTYPE_AudioInterface}, - .Subtype = DSUBTYPE_Header, + .Header = {.Size = sizeof(USB_Audio_Descriptor_Interface_AC_t), .Type = DTYPE_CSInterface}, + .Subtype = AUDIO_DSUBTYPE_CSInterface_Header, .ACSpecification = VERSION_BCD(01.00), .TotalLength = sizeof(USB_Audio_Descriptor_Interface_AC_t), .InCollection = 1, - .InterfaceNumbers = {1}, + .InterfaceNumber = 1, }, .Audio_StreamInterface = @@ -132,8 +132,8 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Audio_StreamInterface_SPC = { - .Header = {.Size = sizeof(USB_MIDI_Descriptor_AudioInterface_AS_t), .Type = DTYPE_AudioInterface}, - .Subtype = DSUBTYPE_General, + .Header = {.Size = sizeof(USB_MIDI_Descriptor_AudioInterface_AS_t), .Type = DTYPE_CSInterface}, + .Subtype = AUDIO_DSUBTYPE_CSInterface_General, .AudioSpecification = VERSION_BCD(01.00), @@ -143,10 +143,10 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .MIDI_In_Jack_Emb = { - .Header = {.Size = sizeof(USB_MIDI_Descriptor_InputJack_t), .Type = DTYPE_AudioInterface}, - .Subtype = DSUBTYPE_InputJack, + .Header = {.Size = sizeof(USB_MIDI_Descriptor_InputJack_t), .Type = DTYPE_CSInterface}, + .Subtype = AUDIO_DSUBTYPE_CSInterface_InputTerminal, - .JackType = MIDI_JACKTYPE_EMBEDDED, + .JackType = MIDI_JACKTYPE_Embedded, .JackID = 0x01, .JackStrIndex = NO_DESCRIPTOR @@ -154,10 +154,10 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .MIDI_In_Jack_Ext = { - .Header = {.Size = sizeof(USB_MIDI_Descriptor_InputJack_t), .Type = DTYPE_AudioInterface}, - .Subtype = DSUBTYPE_InputJack, + .Header = {.Size = sizeof(USB_MIDI_Descriptor_InputJack_t), .Type = DTYPE_CSInterface}, + .Subtype = AUDIO_DSUBTYPE_CSInterface_InputTerminal, - .JackType = MIDI_JACKTYPE_EXTERNAL, + .JackType = MIDI_JACKTYPE_External, .JackID = 0x02, .JackStrIndex = NO_DESCRIPTOR @@ -165,10 +165,10 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .MIDI_Out_Jack_Emb = { - .Header = {.Size = sizeof(USB_MIDI_Descriptor_OutputJack_t), .Type = DTYPE_AudioInterface}, - .Subtype = DSUBTYPE_OutputJack, + .Header = {.Size = sizeof(USB_MIDI_Descriptor_OutputJack_t), .Type = DTYPE_CSInterface}, + .Subtype = AUDIO_DSUBTYPE_CSInterface_OutputTerminal, - .JackType = MIDI_JACKTYPE_EMBEDDED, + .JackType = MIDI_JACKTYPE_Embedded, .JackID = 0x03, .NumberOfPins = 1, @@ -180,10 +180,10 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .MIDI_Out_Jack_Ext = { - .Header = {.Size = sizeof(USB_MIDI_Descriptor_OutputJack_t), .Type = DTYPE_AudioInterface}, - .Subtype = DSUBTYPE_OutputJack, + .Header = {.Size = sizeof(USB_MIDI_Descriptor_OutputJack_t), .Type = DTYPE_CSInterface}, + .Subtype = AUDIO_DSUBTYPE_CSInterface_OutputTerminal, - .JackType = MIDI_JACKTYPE_EXTERNAL, + .JackType = MIDI_JACKTYPE_External, .JackID = 0x04, .NumberOfPins = 1, @@ -211,8 +211,8 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .MIDI_In_Jack_Endpoint_SPC = { - .Header = {.Size = sizeof(USB_MIDI_Descriptor_Jack_Endpoint_t), .Type = DTYPE_AudioEndpoint}, - .Subtype = DSUBTYPE_General, + .Header = {.Size = sizeof(USB_MIDI_Descriptor_Jack_Endpoint_t), .Type = DTYPE_CSEndpoint}, + .Subtype = AUDIO_DSUBTYPE_CSEndpoint_General, .TotalEmbeddedJacks = 0x01, .AssociatedJackID = {0x01} @@ -236,8 +236,8 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .MIDI_Out_Jack_Endpoint_SPC = { - .Header = {.Size = sizeof(USB_MIDI_Descriptor_Jack_Endpoint_t), .Type = DTYPE_AudioEndpoint}, - .Subtype = DSUBTYPE_General, + .Header = {.Size = sizeof(USB_MIDI_Descriptor_Jack_Endpoint_t), .Type = DTYPE_CSEndpoint}, + .Subtype = AUDIO_DSUBTYPE_CSEndpoint_General, .TotalEmbeddedJacks = 0x01, .AssociatedJackID = {0x03} diff --git a/Demos/Device/ClassDriver/MassStorageKeyboard/Descriptors.c b/Demos/Device/ClassDriver/MassStorageKeyboard/Descriptors.c index c14e4c7c9..12422ad13 100644 --- a/Demos/Device/ClassDriver/MassStorageKeyboard/Descriptors.c +++ b/Demos/Device/ClassDriver/MassStorageKeyboard/Descriptors.c @@ -188,19 +188,19 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Class = 0x03, .SubClass = 0x01, - .Protocol = 0x01, + .Protocol = HID_BOOTP_KeyboardBootProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, .HID_KeyboardHID = { - .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = DTYPE_HID}, + .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, .HIDSpec = VERSION_BCD(01.11), .CountryCode = 0x00, .TotalReportDescriptors = 1, - .HIDReportType = DTYPE_Report, + .HIDReportType = HID_DTYPE_Report, .HIDReportLength = sizeof(KeyboardReport) }, @@ -292,11 +292,11 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, } break; - case DTYPE_HID: + case HID_DTYPE_HID: Address = &ConfigurationDescriptor.HID_KeyboardHID; Size = sizeof(USB_HID_Descriptor_HID_t); break; - case DTYPE_Report: + case HID_DTYPE_Report: Address = &KeyboardReport; Size = sizeof(KeyboardReport); break; diff --git a/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c b/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c index ba6213076..e5dbfb675 100644 --- a/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c +++ b/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c @@ -178,7 +178,7 @@ void EVENT_USB_Device_StartOfFrame(void) * * \param[in] HIDInterfaceInfo Pointer to the HID class interface configuration structure being referenced * \param[in,out] ReportID Report ID requested by the host if non-zero, otherwise callback should set to the generated report ID - * \param[in] ReportType Type of the report to create, either REPORT_ITEM_TYPE_In or REPORT_ITEM_TYPE_Feature + * \param[in] ReportType Type of the report to create, either HID_REPORT_ITEM_In or HID_REPORT_ITEM_Feature * \param[out] ReportData Pointer to a buffer where the created report should be stored * \param[out] ReportSize Number of bytes written in the report (or zero if no report is to be sent * @@ -221,7 +221,7 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn * * \param[in] HIDInterfaceInfo Pointer to the HID class interface configuration structure being referenced * \param[in] ReportID Report ID of the received report from the host - * \param[in] ReportType The type of report that the host has sent, either REPORT_ITEM_TYPE_Out or REPORT_ITEM_TYPE_Feature + * \param[in] ReportType The type of report that the host has sent, either HID_REPORT_ITEM_Out or HID_REPORT_ITEM_Feature * \param[in] ReportData Pointer to a buffer where the created report has been stored * \param[in] ReportSize Size in bytes of the received HID report */ diff --git a/Demos/Device/ClassDriver/Mouse/Descriptors.c b/Demos/Device/ClassDriver/Mouse/Descriptors.c index 830255570..6a699b03d 100644 --- a/Demos/Device/ClassDriver/Mouse/Descriptors.c +++ b/Demos/Device/ClassDriver/Mouse/Descriptors.c @@ -133,19 +133,19 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Class = 0x03, .SubClass = 0x01, - .Protocol = HID_BOOT_MOUSE_PROTOCOL, + .Protocol = HID_BOOTP_MouseBootProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, .HID_MouseHID = { - .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = DTYPE_HID}, + .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, .HIDSpec = VERSION_BCD(01.11), .CountryCode = 0x00, .TotalReportDescriptors = 1, - .HIDReportType = DTYPE_Report, + .HIDReportType = HID_DTYPE_Report, .HIDReportLength = sizeof(MouseReport) }, @@ -237,11 +237,11 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, } break; - case DTYPE_HID: + case HID_DTYPE_HID: Address = &ConfigurationDescriptor.HID_MouseHID; Size = sizeof(USB_HID_Descriptor_HID_t); break; - case DTYPE_Report: + case HID_DTYPE_Report: Address = &MouseReport; Size = sizeof(MouseReport); break; diff --git a/Demos/Device/ClassDriver/Mouse/Mouse.c b/Demos/Device/ClassDriver/Mouse/Mouse.c index 6efdb9973..aabd96138 100644 --- a/Demos/Device/ClassDriver/Mouse/Mouse.c +++ b/Demos/Device/ClassDriver/Mouse/Mouse.c @@ -132,7 +132,7 @@ void EVENT_USB_Device_StartOfFrame(void) * * \param[in] HIDInterfaceInfo Pointer to the HID class interface configuration structure being referenced * \param[in,out] ReportID Report ID requested by the host if non-zero, otherwise callback should set to the generated report ID - * \param[in] ReportType Type of the report to create, either REPORT_ITEM_TYPE_In or REPORT_ITEM_TYPE_Feature + * \param[in] ReportType Type of the report to create, either HID_REPORT_ITEM_In or HID_REPORT_ITEM_Feature * \param[out] ReportData Pointer to a buffer where the created report should be stored * \param[out] ReportSize Number of bytes written in the report (or zero if no report is to be sent * @@ -173,7 +173,7 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn * * \param[in] HIDInterfaceInfo Pointer to the HID class interface configuration structure being referenced * \param[in] ReportID Report ID of the received report from the host - * \param[in] ReportType The type of report that the host has sent, either REPORT_ITEM_TYPE_Out or REPORT_ITEM_TYPE_Feature + * \param[in] ReportType The type of report that the host has sent, either HID_REPORT_ITEM_Out or HID_REPORT_ITEM_Feature * \param[in] ReportData Pointer to a buffer where the created report has been stored * \param[in] ReportSize Size in bytes of the received HID report */ diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Descriptors.c b/Demos/Device/ClassDriver/RNDISEthernet/Descriptors.c index 174880962..d259390c3 100644 --- a/Demos/Device/ClassDriver/RNDISEthernet/Descriptors.c +++ b/Demos/Device/ClassDriver/RNDISEthernet/Descriptors.c @@ -104,26 +104,27 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .CDC_Functional_Header = { - .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24}, - .SubType = 0x00, + .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalHeader_t), .Type = DTYPE_CSInterface}, + .Subtype = CDC_DSUBTYPE_CSInterface_Header, - .Data = {0x01, 0x10} + .CDCSpecification = VERSION_BCD(01.10), }, - - .CDC_Functional_AbstractControlManagement = + + .CDC_Functional_ACM = { - .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), .Type = 0x24}, - .SubType = 0x02, + .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalACM_t), .Type = DTYPE_CSInterface}, + .Subtype = CDC_DSUBTYPE_CSInterface_ACM, - .Data = {0x00} + .Capabilities = 0x00, }, - + .CDC_Functional_Union = { - .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24}, - .SubType = 0x06, + .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalUnion_t), .Type = DTYPE_CSInterface}, + .Subtype = CDC_DSUBTYPE_CSInterface_Union, - .Data = {0x00, 0x01} + .MasterInterfaceNumber = 0, + .SlaveInterfaceNumber = 1, }, .CDC_NotificationEndpoint = diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Descriptors.h b/Demos/Device/ClassDriver/RNDISEthernet/Descriptors.h index ed4d274b2..26bd57127 100644 --- a/Demos/Device/ClassDriver/RNDISEthernet/Descriptors.h +++ b/Demos/Device/ClassDriver/RNDISEthernet/Descriptors.h @@ -67,9 +67,9 @@ { USB_Descriptor_Configuration_Header_t Config; USB_Descriptor_Interface_t CDC_CCI_Interface; - CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Header; - CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement; - CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union; + USB_CDC_Descriptor_FunctionalHeader_t CDC_Functional_Header; + USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM; + USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union; USB_Descriptor_Endpoint_t CDC_NotificationEndpoint; USB_Descriptor_Interface_t CDC_DCI_Interface; USB_Descriptor_Endpoint_t RNDIS_DataOutEndpoint; diff --git a/Demos/Device/ClassDriver/VirtualSerial/Descriptors.c b/Demos/Device/ClassDriver/VirtualSerial/Descriptors.c index 3deaf6d4b..2e47069fd 100644 --- a/Demos/Device/ClassDriver/VirtualSerial/Descriptors.c +++ b/Demos/Device/ClassDriver/VirtualSerial/Descriptors.c @@ -114,28 +114,29 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .InterfaceStrIndex = NO_DESCRIPTOR }, - .CDC_Functional_IntHeader = + .CDC_Functional_Header = { - .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24}, - .SubType = 0x00, + .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalHeader_t), .Type = DTYPE_CSInterface}, + .Subtype = CDC_DSUBTYPE_CSInterface_Header, - .Data = {0x01, 0x10} + .CDCSpecification = VERSION_BCD(01.10), }, - .CDC_Functional_AbstractControlManagement = + .CDC_Functional_ACM = { - .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), .Type = 0x24}, - .SubType = 0x02, + .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalACM_t), .Type = DTYPE_CSInterface}, + .Subtype = CDC_DSUBTYPE_CSInterface_ACM, - .Data = {0x06} + .Capabilities = 0x06, }, .CDC_Functional_Union = { - .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24}, - .SubType = 0x06, + .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalUnion_t), .Type = DTYPE_CSInterface}, + .Subtype = CDC_DSUBTYPE_CSInterface_Union, - .Data = {0x00, 0x01} + .MasterInterfaceNumber = 0, + .SlaveInterfaceNumber = 1, }, .CDC_NotificationEndpoint = diff --git a/Demos/Device/ClassDriver/VirtualSerial/Descriptors.h b/Demos/Device/ClassDriver/VirtualSerial/Descriptors.h index 1c1f4694d..159d8d265 100644 --- a/Demos/Device/ClassDriver/VirtualSerial/Descriptors.h +++ b/Demos/Device/ClassDriver/VirtualSerial/Descriptors.h @@ -67,9 +67,9 @@ { USB_Descriptor_Configuration_Header_t Config; USB_Descriptor_Interface_t CDC_CCI_Interface; - CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_IntHeader; - CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement; - CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union; + USB_CDC_Descriptor_FunctionalHeader_t CDC_Functional_Header; + USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM; + USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union; USB_Descriptor_Endpoint_t CDC_NotificationEndpoint; USB_Descriptor_Interface_t CDC_DCI_Interface; USB_Descriptor_Endpoint_t CDC_DataOutEndpoint; diff --git a/Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.c b/Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.c index 7d383a4cc..72e89ef27 100644 --- a/Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.c +++ b/Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.c @@ -164,28 +164,29 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .InterfaceStrIndex = NO_DESCRIPTOR }, - .CDC_Functional_IntHeader = + .CDC_Functional_Header = { - .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24}, - .SubType = 0x00, + .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalHeader_t), .Type = DTYPE_CSInterface}, + .Subtype = CDC_DSUBTYPE_CSInterface_Header, - .Data = {0x01, 0x10} + .CDCSpecification = VERSION_BCD(01.10), }, - .CDC_Functional_AbstractControlManagement = + .CDC_Functional_ACM = { - .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), .Type = 0x24}, - .SubType = 0x02, + .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalACM_t), .Type = DTYPE_CSInterface}, + .Subtype = CDC_DSUBTYPE_CSInterface_ACM, - .Data = {0x06} + .Capabilities = 0x06, }, .CDC_Functional_Union = { - .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24}, - .SubType = 0x06, + .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalUnion_t), .Type = DTYPE_CSInterface}, + .Subtype = CDC_DSUBTYPE_CSInterface_Union, - .Data = {0x00, 0x01} + .MasterInterfaceNumber = 0, + .SlaveInterfaceNumber = 1, }, .CDC_NotificationEndpoint = @@ -245,19 +246,19 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Class = 0x03, .SubClass = 0x01, - .Protocol = HID_BOOT_MOUSE_PROTOCOL, + .Protocol = HID_BOOTP_MouseBootProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, .HID_MouseHID = { - .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = DTYPE_HID}, + .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, .HIDSpec = VERSION_BCD(01.11), .CountryCode = 0x00, .TotalReportDescriptors = 1, - .HIDReportType = DTYPE_Report, + .HIDReportType = HID_DTYPE_Report, .HIDReportLength = sizeof(MouseReport) }, @@ -349,11 +350,11 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, } break; - case DTYPE_HID: + case HID_DTYPE_HID: Address = &ConfigurationDescriptor.HID_MouseHID; Size = sizeof(USB_HID_Descriptor_HID_t); break; - case DTYPE_Report: + case HID_DTYPE_Report: Address = &MouseReport; Size = sizeof(MouseReport); break; diff --git a/Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.h b/Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.h index dfe6c1147..6b6178a93 100644 --- a/Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.h +++ b/Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.h @@ -75,9 +75,9 @@ USB_Descriptor_Configuration_Header_t Config; USB_Descriptor_Interface_Association_t CDC_IAD; USB_Descriptor_Interface_t CDC_CCI_Interface; - CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_IntHeader; - CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement; - CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union; + USB_CDC_Descriptor_FunctionalHeader_t CDC_Functional_Header; + USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM; + USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union; USB_Descriptor_Endpoint_t CDC_NotificationEndpoint; USB_Descriptor_Interface_t CDC_DCI_Interface; USB_Descriptor_Endpoint_t CDC_DataOutEndpoint; diff --git a/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c b/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c index 86cdb4e7a..8372d4e1b 100644 --- a/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c +++ b/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c @@ -191,7 +191,7 @@ void EVENT_USB_Device_StartOfFrame(void) * * \param[in] HIDInterfaceInfo Pointer to the HID class interface configuration structure being referenced * \param[in,out] ReportID Report ID requested by the host if non-zero, otherwise callback should set to the generated report ID - * \param[in] ReportType Type of the report to create, either REPORT_ITEM_TYPE_In or REPORT_ITEM_TYPE_Feature + * \param[in] ReportType Type of the report to create, either HID_REPORT_ITEM_In or HID_REPORT_ITEM_Feature * \param[out] ReportData Pointer to a buffer where the created report should be stored * \param[out] ReportSize Number of bytes written in the report (or zero if no report is to be sent * @@ -232,7 +232,7 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn * * \param[in] HIDInterfaceInfo Pointer to the HID class interface configuration structure being referenced * \param[in] ReportID Report ID of the received report from the host - * \param[in] ReportType The type of report that the host has sent, either REPORT_ITEM_TYPE_Out or REPORT_ITEM_TYPE_Feature + * \param[in] ReportType The type of report that the host has sent, either HID_REPORT_ITEM_Out or HID_REPORT_ITEM_Feature * \param[in] ReportData Pointer to a buffer where the created report has been stored * \param[in] ReportSize Size in bytes of the received HID report */ diff --git a/Demos/Device/LowLevel/AudioInput/Descriptors.c b/Demos/Device/LowLevel/AudioInput/Descriptors.c index 46b43acab..307439611 100644 --- a/Demos/Device/LowLevel/AudioInput/Descriptors.c +++ b/Demos/Device/LowLevel/AudioInput/Descriptors.c @@ -104,8 +104,8 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Audio_ControlInterface_SPC = { - .Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_AudioInterface}, - .Subtype = DSUBTYPE_Header, + .Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_CSInterface}, + .Subtype = DSUBTYPE_AudioHeader, .ACSpecification = VERSION_BCD(01.00), .TotalLength = (sizeof(USB_Audio_Interface_AC_t) + @@ -118,7 +118,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Audio_InputTerminal = { - .Header = {.Size = sizeof(USB_Audio_InputTerminal_t), .Type = DTYPE_AudioInterface}, + .Header = {.Size = sizeof(USB_Audio_InputTerminal_t), .Type = DTYPE_CSInterface}, .Subtype = DSUBTYPE_InputTerminal, .TerminalID = 0x01, @@ -134,7 +134,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Audio_OutputTerminal = { - .Header = {.Size = sizeof(USB_Audio_OutputTerminal_t), .Type = DTYPE_AudioInterface}, + .Header = {.Size = sizeof(USB_Audio_OutputTerminal_t), .Type = DTYPE_CSInterface}, .Subtype = DSUBTYPE_OutputTerminal, .TerminalID = 0x02, @@ -180,7 +180,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Audio_StreamInterface_SPC = { - .Header = {.Size = sizeof(USB_Audio_Interface_AS_t), .Type = DTYPE_AudioInterface}, + .Header = {.Size = sizeof(USB_Audio_Interface_AS_t), .Type = DTYPE_CSInterface}, .Subtype = DSUBTYPE_General, .TerminalLink = 0x02, @@ -191,7 +191,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Audio_AudioFormat = { - .Header = {.Size = sizeof(USB_Audio_Format_t), .Type = DTYPE_AudioInterface}, + .Header = {.Size = sizeof(USB_Audio_Format_t), .Type = DTYPE_CSInterface}, .Subtype = DSUBTYPE_Format, .FormatType = 0x01, @@ -223,7 +223,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Audio_StreamEndpoint_SPC = { - .Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint}, + .Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Spc_t), .Type = DTYPE_CSEndpoint}, .Subtype = DSUBTYPE_General, .Attributes = 0x00, diff --git a/Demos/Device/LowLevel/AudioInput/Descriptors.h b/Demos/Device/LowLevel/AudioInput/Descriptors.h index 1b700a6d3..d154f01a4 100644 --- a/Demos/Device/LowLevel/AudioInput/Descriptors.h +++ b/Demos/Device/LowLevel/AudioInput/Descriptors.h @@ -42,14 +42,8 @@ #include <avr/pgmspace.h> /* Macros: */ - /** Descriptor header constant to indicate a Audio class interface descriptor. */ - #define DTYPE_AudioInterface 0x24 - - /** Descriptor header constant to indicate a Audio class endpoint descriptor. */ - #define DTYPE_AudioEndpoint 0x25 - /** Audio class descriptor subtype value for a Audio class specific header descriptor. */ - #define DSUBTYPE_Header 0x01 + #define DSUBTYPE_AudioHeader 0x01 /** Audio class descriptor subtype value for an Output Terminal Audio class specific descriptor. */ #define DSUBTYPE_InputTerminal 0x02 diff --git a/Demos/Device/LowLevel/AudioOutput/Descriptors.c b/Demos/Device/LowLevel/AudioOutput/Descriptors.c index 20ce79eaa..2d749fcd3 100644 --- a/Demos/Device/LowLevel/AudioOutput/Descriptors.c +++ b/Demos/Device/LowLevel/AudioOutput/Descriptors.c @@ -104,8 +104,8 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Audio_ControlInterface_SPC = { - .Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_AudioInterface}, - .Subtype = DSUBTYPE_Header, + .Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_CSInterface}, + .Subtype = DSUBTYPE_AudioHeader, .ACSpecification = VERSION_BCD(01.00), .TotalLength = (sizeof(USB_Audio_Interface_AC_t) + @@ -118,7 +118,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Audio_InputTerminal = { - .Header = {.Size = sizeof(USB_Audio_InputTerminal_t), .Type = DTYPE_AudioInterface}, + .Header = {.Size = sizeof(USB_Audio_InputTerminal_t), .Type = DTYPE_CSInterface}, .Subtype = DSUBTYPE_InputTerminal, .TerminalID = 0x01, @@ -134,7 +134,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Audio_OutputTerminal = { - .Header = {.Size = sizeof(USB_Audio_OutputTerminal_t), .Type = DTYPE_AudioInterface}, + .Header = {.Size = sizeof(USB_Audio_OutputTerminal_t), .Type = DTYPE_CSInterface}, .Subtype = DSUBTYPE_OutputTerminal, .TerminalID = 0x02, @@ -180,7 +180,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Audio_StreamInterface_SPC = { - .Header = {.Size = sizeof(USB_Audio_Interface_AS_t), .Type = DTYPE_AudioInterface}, + .Header = {.Size = sizeof(USB_Audio_Interface_AS_t), .Type = DTYPE_CSInterface}, .Subtype = DSUBTYPE_General, .TerminalLink = 0x01, @@ -191,7 +191,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Audio_AudioFormat = { - .Header = {.Size = sizeof(USB_Audio_Format_t), .Type = DTYPE_AudioInterface}, + .Header = {.Size = sizeof(USB_Audio_Format_t), .Type = DTYPE_CSInterface}, .Subtype = DSUBTYPE_Format, .FormatType = 0x01, @@ -223,7 +223,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Audio_StreamEndpoint_SPC = { - .Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint}, + .Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Spc_t), .Type = DTYPE_CSEndpoint}, .Subtype = DSUBTYPE_General, .Attributes = EP_ACCEPTS_SMALL_PACKETS, diff --git a/Demos/Device/LowLevel/AudioOutput/Descriptors.h b/Demos/Device/LowLevel/AudioOutput/Descriptors.h index 112b90079..cd6b2b8cf 100644 --- a/Demos/Device/LowLevel/AudioOutput/Descriptors.h +++ b/Demos/Device/LowLevel/AudioOutput/Descriptors.h @@ -42,14 +42,8 @@ #include <avr/pgmspace.h> /* Macros: */ - /** Descriptor header constant to indicate a Audio class interface descriptor. */ - #define DTYPE_AudioInterface 0x24 - - /** Descriptor header constant to indicate a Audio class endpoint descriptor. */ - #define DTYPE_AudioEndpoint 0x25 - /** Audio class descriptor subtype value for a Audio class specific header descriptor. */ - #define DSUBTYPE_Header 0x01 + #define DSUBTYPE_AudioHeader 0x01 /** Audio class descriptor subtype value for an Output Terminal Audio class specific descriptor. */ #define DSUBTYPE_InputTerminal 0x02 diff --git a/Demos/Device/LowLevel/MIDI/Descriptors.c b/Demos/Device/LowLevel/MIDI/Descriptors.c index 33fba26b9..af52cba43 100644 --- a/Demos/Device/LowLevel/MIDI/Descriptors.c +++ b/Demos/Device/LowLevel/MIDI/Descriptors.c @@ -104,8 +104,8 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Audio_ControlInterface_SPC = { - .Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_AudioInterface}, - .Subtype = DSUBTYPE_Header, + .Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_CSInterface}, + .Subtype = DSUBTYPE_AudioHeader, .ACSpecification = VERSION_BCD(01.00), .TotalLength = sizeof(USB_Audio_Interface_AC_t), @@ -132,7 +132,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .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_CSInterface}, .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_In_Jack_t), .Type = DTYPE_CSInterface}, .Subtype = DSUBTYPE_InputJack, .JackType = 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_In_Jack_t), .Type = DTYPE_CSInterface}, .Subtype = DSUBTYPE_InputJack, .JackType = 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_Out_Jack_t), .Type = DTYPE_CSInterface}, .Subtype = DSUBTYPE_OutputJack, .JackType = 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_Out_Jack_t), .Type = DTYPE_CSInterface}, .Subtype = DSUBTYPE_OutputJack, .JackType = JACKTYPE_EXTERNAL, @@ -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_Jack_Endpoint_t), .Type = DTYPE_CSEndpoint}, .Subtype = DSUBTYPE_General, .TotalEmbeddedJacks = 0x01, @@ -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_Jack_Endpoint_t), .Type = DTYPE_CSEndpoint}, .Subtype = DSUBTYPE_General, .TotalEmbeddedJacks = 0x01, diff --git a/Demos/Device/LowLevel/MIDI/Descriptors.h b/Demos/Device/LowLevel/MIDI/Descriptors.h index ba65a89cd..5aebd8fdb 100644 --- a/Demos/Device/LowLevel/MIDI/Descriptors.h +++ b/Demos/Device/LowLevel/MIDI/Descriptors.h @@ -42,14 +42,8 @@ #include <avr/pgmspace.h> /* Macros: */ - /** Descriptor header constant to indicate a Audio class interface descriptor. */ - #define DTYPE_AudioInterface 0x24 - - /** Descriptor header constant to indicate a Audio class endpoint descriptor. */ - #define DTYPE_AudioEndpoint 0x25 - /** Audio class descriptor subtype value for a Audio class specific header descriptor. */ - #define DSUBTYPE_Header 0x01 + #define DSUBTYPE_AudioHeader 0x01 /** Audio class descriptor subtype value for a Audio class specific MIDI input jack descriptor. */ #define DSUBTYPE_InputJack 0x02 diff --git a/Demos/Device/LowLevel/MassStorage/MassStorage.h b/Demos/Device/LowLevel/MassStorage/MassStorage.h index 97b9de04f..5a5c5f800 100644 --- a/Demos/Device/LowLevel/MassStorage/MassStorage.h +++ b/Demos/Device/LowLevel/MassStorage/MassStorage.h @@ -89,7 +89,7 @@ /** LED mask for the library LED driver, to indicate that the USB interface is busy. */ #define LEDMASK_USB_BUSY LEDS_LED2 - /* Type defines: */ + /* Type Defines: */ /** Type define for a Command Block Wrapper, used in the Mass Storage Bulk-Only Transport protocol. */ typedef struct { diff --git a/Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.c b/Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.c index 830255570..6a699b03d 100644 --- a/Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.c +++ b/Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.c @@ -133,19 +133,19 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Class = 0x03, .SubClass = 0x01, - .Protocol = HID_BOOT_MOUSE_PROTOCOL, + .Protocol = HID_BOOTP_MouseBootProtocol, .InterfaceStrIndex = NO_DESCRIPTOR }, .HID_MouseHID = { - .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = DTYPE_HID}, + .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, .HIDSpec = VERSION_BCD(01.11), .CountryCode = 0x00, .TotalReportDescriptors = 1, - .HIDReportType = DTYPE_Report, + .HIDReportType = HID_DTYPE_Report, .HIDReportLength = sizeof(MouseReport) }, @@ -237,11 +237,11 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, } break; - case DTYPE_HID: + case HID_DTYPE_HID: Address = &ConfigurationDescriptor.HID_MouseHID; Size = sizeof(USB_HID_Descriptor_HID_t); break; - case DTYPE_Report: + case HID_DTYPE_Report: Address = &MouseReport; Size = sizeof(MouseReport); break; diff --git a/Demos/DualRole/ClassDriver/MouseHostDevice/DeviceFunctions.c b/Demos/DualRole/ClassDriver/MouseHostDevice/DeviceFunctions.c index e2a2128e9..be01a2d6b 100644 --- a/Demos/DualRole/ClassDriver/MouseHostDevice/DeviceFunctions.c +++ b/Demos/DualRole/ClassDriver/MouseHostDevice/DeviceFunctions.c @@ -98,7 +98,7 @@ void EVENT_USB_Device_StartOfFrame(void) * * \param[in] HIDInterfaceInfo Pointer to the HID class interface configuration structure being referenced * \param[in,out] ReportID Report ID requested by the host if non-zero, otherwise callback should set to the generated report ID - * \param[in] ReportType Type of the report to create, either REPORT_ITEM_TYPE_In or REPORT_ITEM_TYPE_Feature + * \param[in] ReportType Type of the report to create, either HID_REPORT_ITEM_In or HID_REPORT_ITEM_Feature * \param[out] ReportData Pointer to a buffer where the created report should be stored * \param[out] ReportSize Number of bytes written in the report (or zero if no report is to be sent * @@ -139,7 +139,7 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn * * \param[in] HIDInterfaceInfo Pointer to the HID class interface configuration structure being referenced * \param[in] ReportID Report ID of the received report from the host - * \param[in] ReportType The type of report that the host has sent, either REPORT_ITEM_TYPE_Out or REPORT_ITEM_TYPE_Feature + * \param[in] ReportType The type of report that the host has sent, either HID_REPORT_ITEM_Out or HID_REPORT_ITEM_Feature * \param[in] ReportData Pointer to a buffer where the created report has been stored * \param[in] ReportSize Size in bytes of the received HID report */ diff --git a/Demos/DualRole/ClassDriver/MouseHostDevice/HostFunctions.c b/Demos/DualRole/ClassDriver/MouseHostDevice/HostFunctions.c index dfd67ae62..4e794dcf2 100644 --- a/Demos/DualRole/ClassDriver/MouseHostDevice/HostFunctions.c +++ b/Demos/DualRole/ClassDriver/MouseHostDevice/HostFunctions.c @@ -47,7 +47,7 @@ USB_ClassInfo_HID_Host_t Mouse_HID_Host_Interface = .DataINPipeNumber = 1, .DataOUTPipeNumber = 2, - .HIDInterfaceProtocol = HID_BOOT_MOUSE_PROTOCOL, + .HIDInterfaceProtocol = HID_BOOTP_MouseBootProtocol, }, }; diff --git a/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c b/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c index 8420d05ab..fb48c2b17 100644 --- a/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c +++ b/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c @@ -53,7 +53,7 @@ USB_ClassInfo_HID_Host_t Joystick_HID_Interface = .DataOUTPipeNumber = 2, .DataOUTPipeDoubleBank = false, - .HIDInterfaceProtocol = HID_NON_BOOT_PROTOCOL, + .HIDInterfaceProtocol = HID_BOOTP_NonBootProtocol, .HIDParserData = &HIDReportInfo }, @@ -138,7 +138,7 @@ int main(void) /* Determine what report item is being tested, process updated value as needed */ if ((ReportItem->Attributes.Usage.Page == USAGE_PAGE_BUTTON) && - (ReportItem->ItemType == REPORT_ITEM_TYPE_In)) + (ReportItem->ItemType == HID_REPORT_ITEM_In)) { if (ReportItem->Value) LEDMask = LEDS_ALL_LEDS; @@ -146,7 +146,7 @@ int main(void) else if ((ReportItem->Attributes.Usage.Page == USAGE_PAGE_GENERIC_DCTRL) && ((ReportItem->Attributes.Usage.Usage == USAGE_X) || (ReportItem->Attributes.Usage.Usage == USAGE_Y)) && - (ReportItem->ItemType == REPORT_ITEM_TYPE_In)) + (ReportItem->ItemType == HID_REPORT_ITEM_In)) { int16_t DeltaMovement = HID_ALIGN_DATA(ReportItem, int16_t); diff --git a/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c b/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c index 8bdf2b6ec..ddce64c24 100644 --- a/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c +++ b/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c @@ -50,7 +50,7 @@ USB_ClassInfo_HID_Host_t Keyboard_HID_Interface = .DataOUTPipeNumber = 2, .DataOUTPipeDoubleBank = false, - .HIDInterfaceProtocol = HID_BOOT_KEYBOARD_PROTOCOL, + .HIDInterfaceProtocol = HID_BOOTP_KeyboardBootProtocol, }, }; diff --git a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c index 9135e53eb..3fd23f051 100644 --- a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c +++ b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c @@ -53,7 +53,7 @@ USB_ClassInfo_HID_Host_t Keyboard_HID_Interface = .DataOUTPipeNumber = 2, .DataOUTPipeDoubleBank = false, - .HIDInterfaceProtocol = HID_NON_BOOT_PROTOCOL, + .HIDInterfaceProtocol = HID_BOOTP_NonBootProtocol, .HIDParserData = &HIDReportInfo }, @@ -138,7 +138,7 @@ int main(void) if ((ReportItem->Attributes.Usage.Page == USAGE_PAGE_KEYBOARD) && (ReportItem->Attributes.BitSize == 8) && (ReportItem->Attributes.Logical.Maximum > 1) && - (ReportItem->ItemType == REPORT_ITEM_TYPE_In)) + (ReportItem->ItemType == HID_REPORT_ITEM_In)) { /* Key code is an unsigned char in length, cast to the appropriate type */ uint8_t KeyCode = (uint8_t)ReportItem->Value; diff --git a/Demos/Host/ClassDriver/MouseHost/MouseHost.c b/Demos/Host/ClassDriver/MouseHost/MouseHost.c index a03381cc6..d76f048d9 100644 --- a/Demos/Host/ClassDriver/MouseHost/MouseHost.c +++ b/Demos/Host/ClassDriver/MouseHost/MouseHost.c @@ -50,7 +50,7 @@ USB_ClassInfo_HID_Host_t Mouse_HID_Interface = .DataOUTPipeNumber = 2, .DataOUTPipeDoubleBank = false, - .HIDInterfaceProtocol = HID_BOOT_MOUSE_PROTOCOL, + .HIDInterfaceProtocol = HID_BOOTP_MouseBootProtocol, }, }; diff --git a/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c b/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c index 7482b01b0..d02424c7b 100644 --- a/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c +++ b/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c @@ -53,7 +53,7 @@ USB_ClassInfo_HID_Host_t Mouse_HID_Interface = .DataOUTPipeNumber = 2, .DataOUTPipeDoubleBank = false, - .HIDInterfaceProtocol = HID_NON_BOOT_PROTOCOL, + .HIDInterfaceProtocol = HID_BOOTP_NonBootProtocol, .HIDParserData = &HIDReportInfo }, @@ -138,14 +138,14 @@ int main(void) /* Determine what report item is being tested, process updated value as needed */ if ((ReportItem->Attributes.Usage.Page == USAGE_PAGE_BUTTON) && - (ReportItem->ItemType == REPORT_ITEM_TYPE_In)) + (ReportItem->ItemType == HID_REPORT_ITEM_In)) { if (ReportItem->Value) LEDMask = LEDS_ALL_LEDS; } else if ((ReportItem->Attributes.Usage.Page == USAGE_PAGE_GENERIC_DCTRL) && (ReportItem->Attributes.Usage.Usage == USAGE_SCROLL_WHEEL) && - (ReportItem->ItemType == REPORT_ITEM_TYPE_In)) + (ReportItem->ItemType == HID_REPORT_ITEM_In)) { int16_t WheelDelta = HID_ALIGN_DATA(ReportItem, int16_t); @@ -155,7 +155,7 @@ int main(void) else if ((ReportItem->Attributes.Usage.Page == USAGE_PAGE_GENERIC_DCTRL) && ((ReportItem->Attributes.Usage.Usage == USAGE_X) || (ReportItem->Attributes.Usage.Usage == USAGE_Y)) && - (ReportItem->ItemType == REPORT_ITEM_TYPE_In)) + (ReportItem->ItemType == HID_REPORT_ITEM_In)) { int16_t DeltaMovement = HID_ALIGN_DATA(ReportItem, int16_t); diff --git a/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c b/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c index 152639fef..f5d1b23fd 100644 --- a/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c +++ b/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c @@ -86,8 +86,8 @@ int main(void) break; } - if (SImage_Host_ConfigurePipes(&DigitalCamera_SI_Interface, - ConfigDescriptorSize, ConfigDescriptorData) != SI_ENUMERROR_NoError) + if (SI_Host_ConfigurePipes(&DigitalCamera_SI_Interface, + ConfigDescriptorSize, ConfigDescriptorData) != SI_ENUMERROR_NoError) { puts_P(PSTR("Attached Device Not a Valid Still Image Class Device.\r\n")); LEDs_SetAllLEDs(LEDMASK_USB_ERROR); @@ -110,7 +110,7 @@ int main(void) case HOST_STATE_Configured: puts_P(PSTR("Opening Session...\r\n")); - if (SImage_Host_OpenSession(&DigitalCamera_SI_Interface) != PIPE_RWSTREAM_NoError) + if (SI_Host_OpenSession(&DigitalCamera_SI_Interface) != PIPE_RWSTREAM_NoError) { puts_P(PSTR("Could not open PIMA session.\r\n")); USB_HostState = HOST_STATE_WaitForDeviceRemoval; @@ -119,8 +119,8 @@ int main(void) puts_P(PSTR("Turning off Device...\r\n")); - SImage_Host_SendCommand(&DigitalCamera_SI_Interface, 0x1013, 0, NULL); - if (SImage_Host_ReceiveResponse(&DigitalCamera_SI_Interface)) + SI_Host_SendCommand(&DigitalCamera_SI_Interface, 0x1013, 0, NULL); + if (SI_Host_ReceiveResponse(&DigitalCamera_SI_Interface)) { puts_P(PSTR("Could not turn off device.\r\n")); USB_HostState = HOST_STATE_WaitForDeviceRemoval; @@ -131,7 +131,7 @@ int main(void) puts_P(PSTR("Closing Session...\r\n")); - if (SImage_Host_CloseSession(&DigitalCamera_SI_Interface) != PIPE_RWSTREAM_NoError) + if (SI_Host_CloseSession(&DigitalCamera_SI_Interface) != PIPE_RWSTREAM_NoError) { puts_P(PSTR("Could not close PIMA session.\r\n")); USB_HostState = HOST_STATE_WaitForDeviceRemoval; @@ -143,7 +143,7 @@ int main(void) break; } - SImage_Host_USBTask(&DigitalCamera_SI_Interface); + SI_Host_USBTask(&DigitalCamera_SI_Interface); USB_USBTask(); } } diff --git a/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c b/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c index e92c242d2..cf469ffec 100644 --- a/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c +++ b/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c @@ -193,9 +193,9 @@ void Joystick_HID_Task(void) { HID_ReportSizeInfo_t* CurrReportIDInfo = &HIDReportInfo.ReportIDSizes[i]; - uint8_t ReportSizeInBits = CurrReportIDInfo->ReportSizeBits[REPORT_ITEM_TYPE_In]; - uint8_t ReportSizeOutBits = CurrReportIDInfo->ReportSizeBits[REPORT_ITEM_TYPE_Out]; - uint8_t ReportSizeFeatureBits = CurrReportIDInfo->ReportSizeBits[REPORT_ITEM_TYPE_Feature]; + uint8_t ReportSizeInBits = CurrReportIDInfo->ReportSizeBits[HID_REPORT_ITEM_In]; + uint8_t ReportSizeOutBits = CurrReportIDInfo->ReportSizeBits[HID_REPORT_ITEM_Out]; + uint8_t ReportSizeFeatureBits = CurrReportIDInfo->ReportSizeBits[HID_REPORT_ITEM_Feature]; /* Print out the byte sizes of each report within the device */ printf_P(PSTR(" + Report ID %d - In: %d bytes, Out: %d bytes, Feature: %d bytes\r\n"), @@ -258,7 +258,7 @@ void ProcessJoystickReport(uint8_t* JoystickReport) bool FoundData; if ((ReportItem->Attributes.Usage.Page == USAGE_PAGE_BUTTON) && - (ReportItem->ItemType == REPORT_ITEM_TYPE_In)) + (ReportItem->ItemType == HID_REPORT_ITEM_In)) { /* Get the joystick button value */ FoundData = USB_GetHIDReportItemInfo(JoystickReport, ReportItem); @@ -274,7 +274,7 @@ void ProcessJoystickReport(uint8_t* JoystickReport) else if ((ReportItem->Attributes.Usage.Page == USAGE_PAGE_GENERIC_DCTRL) && ((ReportItem->Attributes.Usage.Usage == USAGE_X) || (ReportItem->Attributes.Usage.Usage == USAGE_Y)) && - (ReportItem->ItemType == REPORT_ITEM_TYPE_In)) + (ReportItem->ItemType == HID_REPORT_ITEM_In)) { /* Get the joystick relative position value */ FoundData = USB_GetHIDReportItemInfo(JoystickReport, ReportItem); diff --git a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c index dfb1a4a08..94aca2fef 100644 --- a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c +++ b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c @@ -194,9 +194,9 @@ void Keyboard_HID_Task(void) { HID_ReportSizeInfo_t* CurrReportIDInfo = &HIDReportInfo.ReportIDSizes[i]; - uint8_t ReportSizeInBits = CurrReportIDInfo->ReportSizeBits[REPORT_ITEM_TYPE_In]; - uint8_t ReportSizeOutBits = CurrReportIDInfo->ReportSizeBits[REPORT_ITEM_TYPE_Out]; - uint8_t ReportSizeFeatureBits = CurrReportIDInfo->ReportSizeBits[REPORT_ITEM_TYPE_Feature]; + uint8_t ReportSizeInBits = CurrReportIDInfo->ReportSizeBits[HID_REPORT_ITEM_In]; + uint8_t ReportSizeOutBits = CurrReportIDInfo->ReportSizeBits[HID_REPORT_ITEM_Out]; + uint8_t ReportSizeFeatureBits = CurrReportIDInfo->ReportSizeBits[HID_REPORT_ITEM_Feature]; /* Print out the byte sizes of each report within the device */ printf_P(PSTR(" + Report ID %d - In: %d bytes, Out: %d bytes, Feature: %d bytes\r\n"), @@ -258,7 +258,7 @@ void ProcessKeyboardReport(uint8_t* KeyboardReport) if ((ReportItem->Attributes.Usage.Page == USAGE_PAGE_KEYBOARD) && (ReportItem->Attributes.BitSize == 8) && (ReportItem->Attributes.Logical.Maximum > 1) && - (ReportItem->ItemType == REPORT_ITEM_TYPE_In)) + (ReportItem->ItemType == HID_REPORT_ITEM_In)) { /* Retrieve the keyboard scan-code from the report data retrieved from the device */ bool FoundData = USB_GetHIDReportItemInfo(KeyboardReport, ReportItem); diff --git a/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.h b/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.h index d9e90a8da..bb038f1c5 100644 --- a/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.h +++ b/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.h @@ -75,7 +75,7 @@ /** Additional error code for Mass Storage functions when a device returns a logical command failure. */ #define MASS_STORE_SCSI_COMMAND_FAILED 0xC0 - /* Type defines: */ + /* Type Defines: */ /** Type define for a Mass Storage class Command Block Wrapper, used to wrap SCSI * commands for transport over the USB bulk endpoints to the device. */ diff --git a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c index 38e4b2564..5536d872b 100644 --- a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c +++ b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c @@ -194,9 +194,9 @@ void Mouse_HID_Task(void) { HID_ReportSizeInfo_t* CurrReportIDInfo = &HIDReportInfo.ReportIDSizes[i]; - uint8_t ReportSizeInBits = CurrReportIDInfo->ReportSizeBits[REPORT_ITEM_TYPE_In]; - uint8_t ReportSizeOutBits = CurrReportIDInfo->ReportSizeBits[REPORT_ITEM_TYPE_Out]; - uint8_t ReportSizeFeatureBits = CurrReportIDInfo->ReportSizeBits[REPORT_ITEM_TYPE_Feature]; + uint8_t ReportSizeInBits = CurrReportIDInfo->ReportSizeBits[HID_REPORT_ITEM_In]; + uint8_t ReportSizeOutBits = CurrReportIDInfo->ReportSizeBits[HID_REPORT_ITEM_Out]; + uint8_t ReportSizeFeatureBits = CurrReportIDInfo->ReportSizeBits[HID_REPORT_ITEM_Feature]; /* Print out the byte sizes of each report within the device */ printf_P(PSTR(" + Report ID %d - In: %d bytes, Out: %d bytes, Feature: %d bytes\r\n"), @@ -259,7 +259,7 @@ void ProcessMouseReport(uint8_t* MouseReport) bool FoundData; if ((ReportItem->Attributes.Usage.Page == USAGE_PAGE_BUTTON) && - (ReportItem->ItemType == REPORT_ITEM_TYPE_In)) + (ReportItem->ItemType == HID_REPORT_ITEM_In)) { /* Get the mouse button value */ FoundData = USB_GetHIDReportItemInfo(MouseReport, ReportItem); @@ -274,7 +274,7 @@ void ProcessMouseReport(uint8_t* MouseReport) } else if ((ReportItem->Attributes.Usage.Page == USAGE_PAGE_GENERIC_DCTRL) && (ReportItem->Attributes.Usage.Usage == USAGE_SCROLL_WHEEL) && - (ReportItem->ItemType == REPORT_ITEM_TYPE_In)) + (ReportItem->ItemType == HID_REPORT_ITEM_In)) { /* Get the mouse wheel value if it is contained within the current * report, if not, skip to the next item in the parser list @@ -290,7 +290,7 @@ void ProcessMouseReport(uint8_t* MouseReport) else if ((ReportItem->Attributes.Usage.Page == USAGE_PAGE_GENERIC_DCTRL) && ((ReportItem->Attributes.Usage.Usage == USAGE_X) || (ReportItem->Attributes.Usage.Usage == USAGE_Y)) && - (ReportItem->ItemType == REPORT_ITEM_TYPE_In)) + (ReportItem->ItemType == HID_REPORT_ITEM_In)) { /* Get the mouse relative position value */ FoundData = USB_GetHIDReportItemInfo(MouseReport, ReportItem); |