27#ifndef _TUSB_USBH_CLASSDRIVER_H_
28#define _TUSB_USBH_CLASSDRIVER_H_
31#include "common/tusb_fifo.h"
32#include "common/tusb_private.h"
39#ifndef CFG_TUH_LOG_LEVEL
40 #define CFG_TUH_LOG_LEVEL 2
43#define TU_LOG_USBH(...) TU_LOG(CFG_TUH_LOG_LEVEL, __VA_ARGS__)
46 USBH_EPSIZE_BULK_MAX = (TUH_OPT_HIGH_SPEED ? TUSB_EPSIZE_BULK_HS : TUSB_EPSIZE_BULK_FS)
54 #if CFG_TUSB_DEBUG >= 2
58 void (*
const init )(void);
59 bool (*
const open )(uint8_t rhport, uint8_t dev_addr,
tusb_desc_interface_t const * itf_desc, uint16_t max_len);
60 bool (*
const set_config )(uint8_t dev_addr, uint8_t itf_num);
61 bool (*
const xfer_cb )(uint8_t dev_addr, uint8_t ep_addr, xfer_result_t result, uint32_t xferred_bytes);
62 void (*
const close )(uint8_t dev_addr);
66void usbh_driver_set_config_complete(uint8_t dev_addr, uint8_t itf_num);
68uint8_t usbh_get_rhport(uint8_t dev_addr);
70uint8_t* usbh_get_enum_buf(
void);
72void usbh_int_set(
bool enabled);
79bool usbh_edpt_xfer_with_callback(uint8_t dev_addr, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes,
80 tuh_xfer_cb_t complete_cb, uintptr_t user_data);
83static inline bool usbh_edpt_xfer(uint8_t dev_addr, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes)
85 return usbh_edpt_xfer_with_callback(dev_addr, ep_addr, buffer, total_bytes, NULL, 0);
91bool usbh_edpt_claim(uint8_t dev_addr, uint8_t ep_addr);
94bool usbh_edpt_release(uint8_t dev_addr, uint8_t ep_addr);
97bool usbh_edpt_busy(uint8_t dev_addr, uint8_t ep_addr);
AUDIO Channel Cluster Descriptor (4.1)
Definition audio.h:647
Definition usbh_classdriver.h:53