30 #ifndef __USB_AUDIO_CORE_H_ 31 #define __USB_AUDIO_CORE_H_ 55 #define AUDIO_OUT_PACKET (uint32_t)(((USBD_AUDIO_FREQ * 2 * 2) /1000)) 59 #define OUT_PACKET_NUM 4 61 #define TOTAL_OUT_BUF_SIZE ((uint32_t)(AUDIO_OUT_PACKET * OUT_PACKET_NUM)) 63 #define AUDIO_CONFIG_DESC_SIZE 109 64 #define AUDIO_INTERFACE_DESC_SIZE 9 65 #define USB_AUDIO_DESC_SIZ 0x09 66 #define AUDIO_STANDARD_ENDPOINT_DESC_SIZE 0x09 67 #define AUDIO_STREAMING_ENDPOINT_DESC_SIZE 0x07 69 #define AUDIO_DESCRIPTOR_TYPE 0x21 70 #define USB_DEVICE_CLASS_AUDIO 0x01 71 #define AUDIO_SUBCLASS_AUDIOCONTROL 0x01 72 #define AUDIO_SUBCLASS_AUDIOSTREAMING 0x02 73 #define AUDIO_PROTOCOL_UNDEFINED 0x00 74 #define AUDIO_STREAMING_GENERAL 0x01 75 #define AUDIO_STREAMING_FORMAT_TYPE 0x02 78 #define AUDIO_INTERFACE_DESCRIPTOR_TYPE 0x24 79 #define AUDIO_ENDPOINT_DESCRIPTOR_TYPE 0x25 82 #define AUDIO_CONTROL_HEADER 0x01 83 #define AUDIO_CONTROL_INPUT_TERMINAL 0x02 84 #define AUDIO_CONTROL_OUTPUT_TERMINAL 0x03 85 #define AUDIO_CONTROL_FEATURE_UNIT 0x06 87 #define AUDIO_INPUT_TERMINAL_DESC_SIZE 0x0C 88 #define AUDIO_OUTPUT_TERMINAL_DESC_SIZE 0x09 89 #define AUDIO_STREAMING_INTERFACE_DESC_SIZE 0x07 91 #define AUDIO_CONTROL_MUTE 0x0001 93 #define AUDIO_FORMAT_TYPE_I 0x01 94 #define AUDIO_FORMAT_TYPE_III 0x03 96 #define USB_ENDPOINT_TYPE_ISOCHRONOUS 0x01 97 #define AUDIO_ENDPOINT_GENERAL 0x01 99 #define AUDIO_REQ_GET_CUR 0x81 100 #define AUDIO_REQ_SET_CUR 0x01 102 #define AUDIO_OUT_STREAMING_CTRL 0x02 114 uint8_t (*
Init) (uint32_t AudioFreq, uint32_t Volume, uint32_t options);
131 #define AUDIO_PACKET_SZE(frq) (uint8_t)(((frq * 2 * 2)/1000) & 0xFF), \ 132 (uint8_t)((((frq * 2 * 2)/1000) >> 8) & 0xFF) 133 #define SAMPLE_FREQ(frq) (uint8_t)(frq), (uint8_t)((frq >> 8)), (uint8_t)((frq >> 16)) 155 #endif // __USB_AUDIO_CORE_H_ header file for the usbd_req.c file
uint8_t(* AudioCmd)(uint8_t *pbuf, uint32_t size, uint8_t cmd)
uint8_t(* PeriodicTC)(uint8_t cmd)
uint8_t(* GetState)(void)
uint8_t(* VolumeCtl)(uint8_t vol)
uint8_t(* Init)(uint32_t AudioFreq, uint32_t Volume, uint32_t options)
struct _Audio_Fops AUDIO_FOPS_TypeDef
header file for the usbd_ioreq.c file
USBD_Class_cb_TypeDef AUDIO_cb
uint8_t(* DeInit)(uint32_t options)
uint8_t(* MuteCtl)(uint8_t cmd)
header file for the usbd_desc.c file