29#if (CFG_TUD_ENABLED && CFG_TUD_BTH)
48 uint8_t ep_voice_size[2][CFG_TUD_BTH_ISO_ALT_COUNT];
55 CFG_TUSB_MEM_ALIGN uint8_t epout_buf[CFG_TUD_BTH_DATA_EPSIZE];
66 uint8_t
const rhport = 0;
114 uint16_t drv_len = 0;
124 TU_ASSERT(itf_desc->
bNumEndpoints == 3 && max_len >= hci_itf_size);
144 for (
size_t p = 0; p < 2; p++) {
157 drv_len = hci_itf_size;
163 TU_ASSERT(itf_desc->
bNumEndpoints == 2 && max_len >= iso_alt_itf_size + drv_len);
181 drv_len += iso_alt_itf_size;
183 for (
int i = 1; i < CFG_TUD_BTH_ISO_ALT_COUNT && drv_len + iso_alt_itf_size <= max_len; ++i) {
209 drv_len += iso_alt_itf_size;
260 uint32_t xferred_bytes) {
283 if (xferred_bytes == 0) {
bool tud_bt_event_send(void *event, uint16_t event_len)
void btd_reset(uint8_t rhport)
CFG_TUD_MEM_SECTION btd_interface_t _btd_itf
bool btd_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_request_t const *request)
static bool bt_tx_data(uint8_t ep, void *data, uint16_t len)
bool btd_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t result, uint32_t xferred_bytes)
uint16_t btd_open(uint8_t rhport, tusb_desc_interface_t const *itf_desc, uint16_t max_len)
bool tud_bt_acl_data_send(void *event, uint16_t event_len)
TU_ATTR_WEAK void tud_bt_acl_data_sent_cb(uint16_t sent_bytes)
TU_ATTR_WEAK void tud_bt_event_sent_cb(uint16_t sent_bytes)
TU_ATTR_WEAK void tud_bt_acl_data_received_cb(void *acl_data, uint16_t data_len)
AUDIO Channel Cluster Descriptor (4.1)
struct TU_ATTR_PACKED::@16::TU_ATTR_PACKED bmRequestType_bit
uint8_t bmAttributes
See: audio_clock_source_attribute_t.
uint8_t bDescriptorType
Descriptor Type. Value: TUSB_DESC_CS_INTERFACE.
uint8_t bInterfaceClass
Class code (assigned by the USB-IF).
uint8_t bInterfaceSubClass
Subclass code (assigned by the USB-IF). These codes are qualified by the value of the bInterfaceCla...
uint8_t bRequest
Request type audio_cs_req_t.
uint8_t bNumEndpoints
Number of endpoints used by this interface (excluding endpoint zero). If this value is zero,...
uint8_t bInterfaceProtocol
Protocol code (assigned by the USB). These codes are qualified by the value of the bInterfaceClass ...
uint8_t bInterfaceNumber
Number of this interface. Zero-based value identifying the index in the array of concurrent interface...
uint8_t bAlternateSetting
Value used to select this alternate setting for the interface identified in the prior field.
uint8_t ep_voice_size[2][CFG_TUD_BTH_ISO_ALT_COUNT]
CFG_TUSB_MEM_ALIGN bt_hci_cmd_t hci_cmd
uint16_t ep_acl_in_pkt_sz
uint32_t prev_xferred_bytes
CFG_TUSB_MEM_ALIGN uint8_t epout_buf[CFG_TUD_BTH_DATA_EPSIZE]
static TU_ATTR_ALWAYS_INLINE uint16_t tu_min16(uint16_t x, uint16_t y)
@ TUSB_CLASS_WIRELESS_CONTROLLER
@ TUSB_REQ_RCPT_INTERFACE
static TU_ATTR_ALWAYS_INLINE uint16_t tu_edpt_packet_size(tusb_desc_endpoint_t const *desc_ep)
TU_ATTR_PACKED_END TU_ATTR_BIT_FIELD_ORDER_END static TU_ATTR_ALWAYS_INLINE tusb_dir_t tu_edpt_dir(uint8_t addr)
struct TU_ATTR_PACKED tusb_desc_interface_t
USB Interface Descriptor.
static TU_ATTR_ALWAYS_INLINE uint8_t const * tu_desc_next(void const *desc)
bool usbd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t *buffer, uint16_t total_bytes)
bool usbd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const *desc_ep)
bool usbd_edpt_busy(uint8_t rhport, uint8_t ep_addr)
bool usbd_open_edpt_pair(uint8_t rhport, uint8_t const *p_desc, uint8_t ep_count, uint8_t xfer_type, uint8_t *ep_out, uint8_t *ep_in)
bool tud_control_xfer(uint8_t rhport, tusb_control_request_t const *request, void *buffer, uint16_t len)
CFG_TUH_MEM_ALIGN tusb_control_request_t request