From b497b17d2ae880ab2d11484dc0f2bad276060f80 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 8 Jan 2012 19:24:41 +0100 Subject: fast-audio: embed DFU RT IF / FUNC descriptors --- usb-fast-audio-source/AUDDFastSourceDescriptors.c | 25 +++++++++++++++-------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'usb-fast-audio-source') diff --git a/usb-fast-audio-source/AUDDFastSourceDescriptors.c b/usb-fast-audio-source/AUDDFastSourceDescriptors.c index e117de8..89a19d8 100644 --- a/usb-fast-audio-source/AUDDFastSourceDescriptors.c +++ b/usb-fast-audio-source/AUDDFastSourceDescriptors.c @@ -51,6 +51,8 @@ #include #include +#include + //------------------------------------------------------------------------------ // Definitions //------------------------------------------------------------------------------ @@ -187,7 +189,8 @@ typedef struct { AUDEndpointDescriptor streamingInEndpoint; /// Audio class descriptor for the streaming in endpoint. AUDDataEndpointDescriptor streamingInDataEndpoint; - + // DFU Runtime + DFURT_IF_DESCRIPTOR_STRUCT } __attribute__ ((packed)) AUDDLoopRecDriverConfigurationDescriptors; // GCC #ifdef __ICCARM__ // IAR @@ -241,7 +244,7 @@ const AUDDLoopRecDriverConfigurationDescriptors hsConfigurationDescriptors = { sizeof(USBConfigurationDescriptor), USBGenericDescriptor_CONFIGURATION, sizeof(AUDDLoopRecDriverConfigurationDescriptors), - 3, // This configuration has 3 interfaces + 3+DFURT_NUM_IF, // This configuration has 3 interfaces 1, // This is configuration #1 0, // No string descriptor BOARD_USB_BMATTRIBUTES, @@ -514,7 +517,8 @@ const AUDDLoopRecDriverConfigurationDescriptors hsConfigurationDescriptors = { 0, // No attributes 0, // Endpoint is not synchronized 0 // Endpoint is not synchronized - } + }, + DFURT_IF_DESCRIPTOR(3, 0), }; /// HS Other Speed Configuration descriptors for a USB Audio Loop Record driver. @@ -526,7 +530,7 @@ const AUDDLoopRecDriverConfigurationDescriptors sizeof(USBConfigurationDescriptor), USBGenericDescriptor_OTHERSPEEDCONFIGURATION, sizeof(AUDDLoopRecDriverConfigurationDescriptors), - 3, // This configuration has 3 interfaces + 3+DFURT_NUM_IF, // This configuration has 3 interfaces 1, // This is configuration #1 0, // No string descriptor BOARD_USB_BMATTRIBUTES, @@ -799,7 +803,8 @@ const AUDDLoopRecDriverConfigurationDescriptors 0, // No attributes 0, // Endpoint is not synchronized 0 // Endpoint is not synchronized - } + }, + DFURT_IF_DESCRIPTOR(3, 0), }; /// HS Other Speed Configuration descriptors. @@ -811,7 +816,7 @@ const AUDDLoopRecDriverConfigurationDescriptors sizeof(USBConfigurationDescriptor), USBGenericDescriptor_OTHERSPEEDCONFIGURATION, sizeof(AUDDLoopRecDriverConfigurationDescriptors), - 3, // This configuration has 3 interfaces + 3+DFURT_NUM_IF, // This configuration has 3 interfaces 1, // This is configuration #1 0, // No string descriptor BOARD_USB_BMATTRIBUTES, @@ -1084,7 +1089,8 @@ const AUDDLoopRecDriverConfigurationDescriptors 0, // No attributes 0, // Endpoint is not synchronized 0 // Endpoint is not synchronized - } + }, + DFURT_IF_DESCRIPTOR(3, 0), }; #endif // defined(CHIP_USB_UDPHS) || defined(CHIP_USB_OTGHS) @@ -1097,7 +1103,7 @@ const AUDDLoopRecDriverConfigurationDescriptors fsConfigurationDescriptors = { sizeof(USBConfigurationDescriptor), USBGenericDescriptor_CONFIGURATION, sizeof(AUDDLoopRecDriverConfigurationDescriptors), - 3, // This configuration has 3 interfaces + 3+DFURT_NUM_IF, // This configuration has 3 interfaces 1, // This is configuration #1 0, // No string descriptor BOARD_USB_BMATTRIBUTES, @@ -1370,7 +1376,8 @@ const AUDDLoopRecDriverConfigurationDescriptors fsConfigurationDescriptors = { 0, // No attributes 0, // Endpoint is not synchronized 0 // Endpoint is not synchronized - } + }, + DFURT_IF_DESCRIPTOR(3, 0), }; /// String descriptor with the supported languages. -- cgit v1.2.3