mirror of
https://github.com/STMicroelectronics/stm32-mw-usb-device.git
synced 2026-02-08 20:18:07 -05:00
Release v2.10.0
This commit is contained in:
@@ -57,7 +57,10 @@ extern "C" {
|
||||
#define AUDIO_FS_BINTERVAL 0x01U
|
||||
#endif /* AUDIO_FS_BINTERVAL */
|
||||
|
||||
#ifndef AUDIO_OUT_EP
|
||||
#define AUDIO_OUT_EP 0x01U
|
||||
#endif /* AUDIO_OUT_EP */
|
||||
|
||||
#define USB_AUDIO_CONFIG_DESC_SIZ 0x6DU
|
||||
#define AUDIO_INTERFACE_DESC_SIZE 0x09U
|
||||
#define USB_AUDIO_DESC_SIZ 0x09U
|
||||
@@ -166,6 +169,115 @@ typedef struct
|
||||
int8_t (*PeriodicTC)(uint8_t *pbuf, uint32_t size, uint8_t cmd);
|
||||
int8_t (*GetState)(void);
|
||||
} USBD_AUDIO_ItfTypeDef;
|
||||
|
||||
/*
|
||||
* Audio Class specification release 1.0
|
||||
*/
|
||||
|
||||
/* Table 4-2: Class-Specific AC Interface Header Descriptor */
|
||||
typedef struct
|
||||
{
|
||||
uint8_t bLength;
|
||||
uint8_t bDescriptorType;
|
||||
uint8_t bDescriptorSubtype;
|
||||
uint16_t bcdADC;
|
||||
uint16_t wTotalLength;
|
||||
uint8_t bInCollection;
|
||||
uint8_t baInterfaceNr;
|
||||
} __PACKED USBD_SpeakerIfDescTypeDef;
|
||||
|
||||
/* Table 4-3: Input Terminal Descriptor */
|
||||
typedef struct
|
||||
{
|
||||
uint8_t bLength;
|
||||
uint8_t bDescriptorType;
|
||||
uint8_t bDescriptorSubtype;
|
||||
uint8_t bTerminalID;
|
||||
uint16_t wTerminalType;
|
||||
uint8_t bAssocTerminal;
|
||||
uint8_t bNrChannels;
|
||||
uint16_t wChannelConfig;
|
||||
uint8_t iChannelNames;
|
||||
uint8_t iTerminal;
|
||||
} __PACKED USBD_SpeakerInDescTypeDef;
|
||||
|
||||
/* USB Speaker Audio Feature Unit Descriptor */
|
||||
typedef struct
|
||||
{
|
||||
uint8_t bLength;
|
||||
uint8_t bDescriptorType;
|
||||
uint8_t bDescriptorSubtype;
|
||||
uint8_t bUnitID;
|
||||
uint8_t bSourceID;
|
||||
uint8_t bControlSize;
|
||||
uint16_t bmaControls;
|
||||
uint8_t iTerminal;
|
||||
} __PACKED USBD_SpeakerFeatureDescTypeDef;
|
||||
|
||||
/* Table 4-4: Output Terminal Descriptor */
|
||||
typedef struct
|
||||
{
|
||||
uint8_t bLength;
|
||||
uint8_t bDescriptorType;
|
||||
uint8_t bDescriptorSubtype;
|
||||
uint8_t bTerminalID;
|
||||
uint16_t wTerminalType;
|
||||
uint8_t bAssocTerminal;
|
||||
uint8_t bSourceID;
|
||||
uint8_t iTerminal;
|
||||
} __PACKED USBD_SpeakerOutDescTypeDef;
|
||||
|
||||
/* Table 4-19: Class-Specific AS Interface Descriptor */
|
||||
typedef struct
|
||||
{
|
||||
uint8_t bLength;
|
||||
uint8_t bDescriptorType;
|
||||
uint8_t bDescriptorSubtype;
|
||||
uint8_t bTerminalLink;
|
||||
uint8_t bDelay;
|
||||
uint16_t wFormatTag;
|
||||
} __PACKED USBD_SpeakerStreamIfDescTypeDef;
|
||||
|
||||
/* USB Speaker Audio Type III Format Interface Descriptor */
|
||||
typedef struct
|
||||
{
|
||||
uint8_t bLength;
|
||||
uint8_t bDescriptorType;
|
||||
uint8_t bDescriptorSubtype;
|
||||
uint8_t bFormatType;
|
||||
uint8_t bNrChannels;
|
||||
uint8_t bSubFrameSize;
|
||||
uint8_t bBitResolution;
|
||||
uint8_t bSamFreqType;
|
||||
uint8_t tSamFreq2;
|
||||
uint8_t tSamFreq1;
|
||||
uint8_t tSamFreq0;
|
||||
} USBD_SpeakerIIIFormatIfDescTypeDef;
|
||||
|
||||
/* Table 4-17: Standard AC Interrupt Endpoint Descriptor */
|
||||
typedef struct
|
||||
{
|
||||
uint8_t bLength;
|
||||
uint8_t bDescriptorType;
|
||||
uint8_t bEndpointAddress;
|
||||
uint8_t bmAttributes;
|
||||
uint16_t wMaxPacketSize;
|
||||
uint8_t bInterval;
|
||||
uint8_t bRefresh;
|
||||
uint8_t bSynchAddress;
|
||||
} __PACKED USBD_SpeakerEndDescTypeDef;
|
||||
|
||||
/* Table 4-21: Class-Specific AS Isochronous Audio Data Endpoint Descriptor */
|
||||
typedef struct
|
||||
{
|
||||
uint8_t bLength;
|
||||
uint8_t bDescriptorType;
|
||||
uint8_t bDescriptor;
|
||||
uint8_t bmAttributes;
|
||||
uint8_t bLockDelayUnits;
|
||||
uint16_t wLockDelay;
|
||||
} __PACKED USBD_SpeakerEndStDescTypeDef;
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
@@ -197,6 +309,11 @@ uint8_t USBD_AUDIO_RegisterInterface(USBD_HandleTypeDef *pdev,
|
||||
USBD_AUDIO_ItfTypeDef *fops);
|
||||
|
||||
void USBD_AUDIO_Sync(USBD_HandleTypeDef *pdev, AUDIO_OffsetTypeDef offset);
|
||||
|
||||
#ifdef USE_USBD_COMPOSITE
|
||||
uint32_t USBD_AUDIO_GetEpPcktSze(USBD_HandleTypeDef *pdev, uint8_t If, uint8_t Ep);
|
||||
#endif /* USE_USBD_COMPOSITE */
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user