summaryrefslogtreecommitdiff
path: root/usb-fast-audio-source
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-01-08 19:24:41 +0100
committerHarald Welte <laforge@gnumonks.org>2012-01-08 19:24:41 +0100
commitb497b17d2ae880ab2d11484dc0f2bad276060f80 (patch)
treef0b4897e34e6fb85bb9a1de2036e038f576a060f /usb-fast-audio-source
parent70594a0e640bb4e85f35b479b5d983e8e7a15b65 (diff)
fast-audio: embed DFU RT IF / FUNC descriptors
Diffstat (limited to 'usb-fast-audio-source')
-rw-r--r--usb-fast-audio-source/AUDDFastSourceDescriptors.c25
1 files changed, 16 insertions, 9 deletions
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 <usb/common/audio/AUDInputTerminalDescriptor.h>
#include <usb/common/audio/AUDOutputTerminalDescriptor.h>
+#include <usb/device/dfu/dfu.h>
+
//------------------------------------------------------------------------------
// 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.
personal git repositories of Harald Welte. Your mileage may vary