177 #ifdef USB_OTG_HS_CORE 430 #ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED 431 pbuf = usbd_audio_Desc;
450 if ((uint8_t)(req->
wValue) < AUDIO_TOTAL_IF_NUM)
512 if (epnum == AUDIO_OUT_EP)
void USBD_CtlError(USB_OTG_CORE_HANDLE *pdev, USB_SETUP_REQ *req)
USBD_CtlError Handle USB low level Error.
#define USB_REQ_TYPE_STANDARD
uint8_t(* AudioCmd)(uint8_t *pbuf, uint32_t size, uint8_t cmd)
#define AUDIO_SUBCLASS_AUDIOCONTROL
uint32_t DCD_EP_Close(USB_OTG_CORE_HANDLE *pdev, uint8_t ep_addr)
called when an EP is disabled
#define AUDIO_INTERFACE_DESC_SIZE
static uint8_t usbd_audio_EP0_RxReady(void *pdev)
usbd_audio_EP0_RxReady Handles audio control requests data.
#define AUDIO_REQ_SET_CUR
#define AUDIO_PACKET_SZE(frq)
static uint8_t usbd_audio_DeInit(void *pdev, uint8_t cfgidx)
usbd_audio_Init DeInitializes the AUDIO layer.
static __IO uint32_t usbd_audio_AltSet
#define USB_REQ_TYPE_CLASS
USBD_Status USBD_CtlSendData(USB_OTG_CORE_HANDLE *pdev, uint8_t *buf, uint16_t len)
USBD_CtlSendData send data on the ctl pipe.
#define AUDIO_FORMAT_TYPE_III
#define USB_REQ_SET_INTERFACE
#define USB_REQ_GET_INTERFACE
#define AUDIO_STREAMING_ENDPOINT_DESC_SIZE
#define USB_DEVICE_CLASS_AUDIO
#define AUDIO_ENDPOINT_GENERAL
static uint8_t usbd_audio_DataOut(void *pdev, uint8_t epnum)
usbd_audio_DataOut Handles the Audio Out data stage.
#define AUDIO_SUBCLASS_AUDIOSTREAMING
#define AUDIO_OUT_STREAMING_CTRL
#define AUDIO_DESCRIPTOR_TYPE
static uint8_t usbd_audio_OUT_Incplt(void *pdev)
usbd_audio_OUT_Incplt Handles the iso out incomplete event.
#define AUDIO_STREAMING_INTERFACE_DESC_SIZE
#define AUDIO_PROTOCOL_UNDEFINED
#define USB_CONFIGURATION_DESCRIPTOR_TYPE
#define TOTAL_OUT_BUF_SIZE
#define USB_ENDPOINT_TYPE_ISOCHRONOUS
uint32_t DCD_EP_Open(USB_OTG_CORE_HANDLE *pdev, uint8_t ep_addr, uint16_t ep_mps, uint8_t ep_type)
Configure an EP.
USBD_Status USBD_CtlPrepareRx(USB_OTG_CORE_HANDLE *pdev, uint8_t *pbuf, uint16_t len)
USBD_CtlPrepareRx receive data on the ctl pipe.
static void AUDIO_Req_GetCurrent(void *pdev, USB_SETUP_REQ *req)
AUDIO_Req_GetCurrent Handles the GET_CUR Audio control request.
#define AUDIO_REQ_GET_CUR
static uint8_t * USBD_audio_GetCfgDesc(uint8_t speed, uint16_t *length)
USBD_audio_GetCfgDesc Returns configuration descriptor.
#define AUDIO_INTERFACE_DESCRIPTOR_TYPE
#define AUDIO_STANDARD_ENDPOINT_DESC_SIZE
#define USB_INTERFACE_DESCRIPTOR_TYPE
uint8_t(* Init)(uint32_t AudioFreq, uint32_t Volume, uint32_t options)
static uint8_t usbd_audio_Init(void *pdev, uint8_t cfgidx)
usbd_audio_Init Initilaizes the AUDIO interface.
AUDIO_FOPS_TypeDef AUDIO_OUT_fops
#define USB_REQ_GET_DESCRIPTOR
#define USB_AUDIO_DESC_SIZ
uint32_t DCD_EP_PrepareRx(USB_OTG_CORE_HANDLE *pdev, uint8_t ep_addr, uint8_t *pbuf, uint16_t buf_len)
DCD_EP_PrepareRx.
#define AUDIO_CONTROL_FEATURE_UNIT
#define AUDIO_CONTROL_HEADER
uint8_t IsocOutBuff[TOTAL_OUT_BUF_SIZE *2]
#define AUDIO_INPUT_TERMINAL_DESC_SIZE
#define AUDIO_CONTROL_OUTPUT_TERMINAL
static uint8_t usbd_audio_DataIn(void *pdev, uint8_t epnum)
usbd_audio_DataIn Handles the audio IN data stage.
#define AUDIO_CONFIG_DESC_SIZE
static void AUDIO_Req_SetCurrent(void *pdev, USB_SETUP_REQ *req)
AUDIO_Req_SetCurrent Handles the SET_CUR Audio control request.
#define AUDIO_STREAMING_GENERAL
static uint8_t usbd_audio_Setup(void *pdev, USB_SETUP_REQ *req)
usbd_audio_Setup Handles the Audio control request parsing.
header file for the usbd_audio_out_if.c file.
#define USB_ENDPOINT_DESCRIPTOR_TYPE
header file for the usbd_audio_core.c file.
#define AUDIO_ENDPOINT_DESCRIPTOR_TYPE
#define AUDIO_STREAMING_FORMAT_TYPE
#define AUDIO_CONTROL_INPUT_TERMINAL
uint8_t(* DeInit)(uint32_t options)
#define USB_REQ_TYPE_MASK
USBD_Class_cb_TypeDef AUDIO_cb
static uint8_t usbd_audio_CfgDesc[AUDIO_CONFIG_DESC_SIZE]
#define AUDIO_CONTROL_MUTE
uint8_t(* MuteCtl)(uint8_t cmd)
static uint8_t usbd_audio_SOF(void *pdev)
usbd_audio_SOF Handles the SOF event (data buffer update and synchronization).