fast-audio: embed DFU RT IF / FUNC descriptors
This commit is contained in:
parent
70594a0e64
commit
b497b17d2a
|
@ -51,6 +51,8 @@
|
||||||
#include <usb/common/audio/AUDInputTerminalDescriptor.h>
|
#include <usb/common/audio/AUDInputTerminalDescriptor.h>
|
||||||
#include <usb/common/audio/AUDOutputTerminalDescriptor.h>
|
#include <usb/common/audio/AUDOutputTerminalDescriptor.h>
|
||||||
|
|
||||||
|
#include <usb/device/dfu/dfu.h>
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Definitions
|
// Definitions
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
@ -187,7 +189,8 @@ typedef struct {
|
||||||
AUDEndpointDescriptor streamingInEndpoint;
|
AUDEndpointDescriptor streamingInEndpoint;
|
||||||
/// Audio class descriptor for the streaming in endpoint.
|
/// Audio class descriptor for the streaming in endpoint.
|
||||||
AUDDataEndpointDescriptor streamingInDataEndpoint;
|
AUDDataEndpointDescriptor streamingInDataEndpoint;
|
||||||
|
// DFU Runtime
|
||||||
|
DFURT_IF_DESCRIPTOR_STRUCT
|
||||||
} __attribute__ ((packed)) AUDDLoopRecDriverConfigurationDescriptors; // GCC
|
} __attribute__ ((packed)) AUDDLoopRecDriverConfigurationDescriptors; // GCC
|
||||||
|
|
||||||
#ifdef __ICCARM__ // IAR
|
#ifdef __ICCARM__ // IAR
|
||||||
|
@ -241,7 +244,7 @@ const AUDDLoopRecDriverConfigurationDescriptors hsConfigurationDescriptors = {
|
||||||
sizeof(USBConfigurationDescriptor),
|
sizeof(USBConfigurationDescriptor),
|
||||||
USBGenericDescriptor_CONFIGURATION,
|
USBGenericDescriptor_CONFIGURATION,
|
||||||
sizeof(AUDDLoopRecDriverConfigurationDescriptors),
|
sizeof(AUDDLoopRecDriverConfigurationDescriptors),
|
||||||
3, // This configuration has 3 interfaces
|
3+DFURT_NUM_IF, // This configuration has 3 interfaces
|
||||||
1, // This is configuration #1
|
1, // This is configuration #1
|
||||||
0, // No string descriptor
|
0, // No string descriptor
|
||||||
BOARD_USB_BMATTRIBUTES,
|
BOARD_USB_BMATTRIBUTES,
|
||||||
|
@ -514,7 +517,8 @@ const AUDDLoopRecDriverConfigurationDescriptors hsConfigurationDescriptors = {
|
||||||
0, // No attributes
|
0, // No attributes
|
||||||
0, // Endpoint is not synchronized
|
0, // Endpoint is not synchronized
|
||||||
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.
|
/// HS Other Speed Configuration descriptors for a USB Audio Loop Record driver.
|
||||||
|
@ -526,7 +530,7 @@ const AUDDLoopRecDriverConfigurationDescriptors
|
||||||
sizeof(USBConfigurationDescriptor),
|
sizeof(USBConfigurationDescriptor),
|
||||||
USBGenericDescriptor_OTHERSPEEDCONFIGURATION,
|
USBGenericDescriptor_OTHERSPEEDCONFIGURATION,
|
||||||
sizeof(AUDDLoopRecDriverConfigurationDescriptors),
|
sizeof(AUDDLoopRecDriverConfigurationDescriptors),
|
||||||
3, // This configuration has 3 interfaces
|
3+DFURT_NUM_IF, // This configuration has 3 interfaces
|
||||||
1, // This is configuration #1
|
1, // This is configuration #1
|
||||||
0, // No string descriptor
|
0, // No string descriptor
|
||||||
BOARD_USB_BMATTRIBUTES,
|
BOARD_USB_BMATTRIBUTES,
|
||||||
|
@ -799,7 +803,8 @@ const AUDDLoopRecDriverConfigurationDescriptors
|
||||||
0, // No attributes
|
0, // No attributes
|
||||||
0, // Endpoint is not synchronized
|
0, // Endpoint is not synchronized
|
||||||
0 // Endpoint is not synchronized
|
0 // Endpoint is not synchronized
|
||||||
}
|
},
|
||||||
|
DFURT_IF_DESCRIPTOR(3, 0),
|
||||||
};
|
};
|
||||||
|
|
||||||
/// HS Other Speed Configuration descriptors.
|
/// HS Other Speed Configuration descriptors.
|
||||||
|
@ -811,7 +816,7 @@ const AUDDLoopRecDriverConfigurationDescriptors
|
||||||
sizeof(USBConfigurationDescriptor),
|
sizeof(USBConfigurationDescriptor),
|
||||||
USBGenericDescriptor_OTHERSPEEDCONFIGURATION,
|
USBGenericDescriptor_OTHERSPEEDCONFIGURATION,
|
||||||
sizeof(AUDDLoopRecDriverConfigurationDescriptors),
|
sizeof(AUDDLoopRecDriverConfigurationDescriptors),
|
||||||
3, // This configuration has 3 interfaces
|
3+DFURT_NUM_IF, // This configuration has 3 interfaces
|
||||||
1, // This is configuration #1
|
1, // This is configuration #1
|
||||||
0, // No string descriptor
|
0, // No string descriptor
|
||||||
BOARD_USB_BMATTRIBUTES,
|
BOARD_USB_BMATTRIBUTES,
|
||||||
|
@ -1084,7 +1089,8 @@ const AUDDLoopRecDriverConfigurationDescriptors
|
||||||
0, // No attributes
|
0, // No attributes
|
||||||
0, // Endpoint is not synchronized
|
0, // Endpoint is not synchronized
|
||||||
0 // Endpoint is not synchronized
|
0 // Endpoint is not synchronized
|
||||||
}
|
},
|
||||||
|
DFURT_IF_DESCRIPTOR(3, 0),
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // defined(CHIP_USB_UDPHS) || defined(CHIP_USB_OTGHS)
|
#endif // defined(CHIP_USB_UDPHS) || defined(CHIP_USB_OTGHS)
|
||||||
|
@ -1097,7 +1103,7 @@ const AUDDLoopRecDriverConfigurationDescriptors fsConfigurationDescriptors = {
|
||||||
sizeof(USBConfigurationDescriptor),
|
sizeof(USBConfigurationDescriptor),
|
||||||
USBGenericDescriptor_CONFIGURATION,
|
USBGenericDescriptor_CONFIGURATION,
|
||||||
sizeof(AUDDLoopRecDriverConfigurationDescriptors),
|
sizeof(AUDDLoopRecDriverConfigurationDescriptors),
|
||||||
3, // This configuration has 3 interfaces
|
3+DFURT_NUM_IF, // This configuration has 3 interfaces
|
||||||
1, // This is configuration #1
|
1, // This is configuration #1
|
||||||
0, // No string descriptor
|
0, // No string descriptor
|
||||||
BOARD_USB_BMATTRIBUTES,
|
BOARD_USB_BMATTRIBUTES,
|
||||||
|
@ -1370,7 +1376,8 @@ const AUDDLoopRecDriverConfigurationDescriptors fsConfigurationDescriptors = {
|
||||||
0, // No attributes
|
0, // No attributes
|
||||||
0, // Endpoint is not synchronized
|
0, // Endpoint is not synchronized
|
||||||
0 // Endpoint is not synchronized
|
0 // Endpoint is not synchronized
|
||||||
}
|
},
|
||||||
|
DFURT_IF_DESCRIPTOR(3, 0),
|
||||||
};
|
};
|
||||||
|
|
||||||
/// String descriptor with the supported languages.
|
/// String descriptor with the supported languages.
|
||||||
|
|
Loading…
Reference in New Issue