27#ifndef TUSB_PRIVATE_H_
28#define TUSB_PRIVATE_H_
36#define TUP_USBIP_CONTROLLER_NUM 2
90 void* ff_buf, uint16_t ff_bufsize, uint8_t* ep_buf, uint16_t ep_bufsize);
96TU_ATTR_ALWAYS_INLINE
static inline
103TU_ATTR_ALWAYS_INLINE
static inline
109TU_ATTR_ALWAYS_INLINE
static inline
142TU_ATTR_ALWAYS_INLINE
static inline
150TU_ATTR_ALWAYS_INLINE
static inline
158TU_ATTR_ALWAYS_INLINE
static inline
163TU_ATTR_ALWAYS_INLINE
static inline
SemaphoreHandle_t osal_mutex_t
AUDIO Channel Cluster Descriptor (4.1)
OSAL_MUTEX_DEF(ff_mutexdef)
tusb_role_t _tusb_rhport_role[TUP_USBIP_CONTROLLER_NUM]
uint16_t tu_fifo_count(tu_fifo_t *f)
Get number of items in FIFO.
uint16_t tu_fifo_write_n(tu_fifo_t *f, const void *data, uint16_t n)
This function will write n elements into the array index specified by the write pointer and increment...
bool tu_fifo_peek(tu_fifo_t *f, void *p_buffer)
Read one item without removing it from the FIFO. This function checks for an overflow and corrects re...
bool tu_fifo_clear(tu_fifo_t *f)
Clear the fifo read and write pointers.
static TU_ATTR_ALWAYS_INLINE uint16_t tu_fifo_depth(tu_fifo_t *f)
bool tu_edpt_validate(tusb_desc_endpoint_t const *desc_ep, tusb_speed_t speed)
bool tu_edpt_stream_write_zlp_if_needed(uint8_t hwid, tu_edpt_stream_t *s, uint32_t last_xferred_bytes)
bool tu_edpt_claim(tu_edpt_state_t *ep_state, osal_mutex_t mutex)
static TU_ATTR_ALWAYS_INLINE bool tu_edpt_stream_clear(tu_edpt_stream_t *s)
static TU_ATTR_ALWAYS_INLINE void tu_edpt_stream_read_xfer_complete_offset(tu_edpt_stream_t *s, uint32_t xferred_bytes, uint32_t skip_offset)
static TU_ATTR_ALWAYS_INLINE void tu_edpt_stream_close(tu_edpt_stream_t *s)
static TU_ATTR_ALWAYS_INLINE bool tu_edpt_stream_peek(tu_edpt_stream_t *s, uint8_t *ch)
static TU_ATTR_ALWAYS_INLINE uint32_t tu_edpt_stream_read_available(tu_edpt_stream_t *s)
uint32_t tu_edpt_stream_read_xfer(uint8_t hwid, tu_edpt_stream_t *s)
uint32_t tu_edpt_stream_read(uint8_t hwid, tu_edpt_stream_t *s, void *buffer, uint32_t bufsize)
uint32_t tu_edpt_stream_write_available(uint8_t hwid, tu_edpt_stream_t *s)
uint32_t tu_edpt_stream_write_xfer(uint8_t hwid, tu_edpt_stream_t *s)
uint32_t tu_edpt_stream_write(uint8_t hwid, tu_edpt_stream_t *s, void const *buffer, uint32_t bufsize)
struct TU_ATTR_PACKED tu_edpt_state_t
static TU_ATTR_ALWAYS_INLINE void tu_edpt_stream_read_xfer_complete(tu_edpt_stream_t *s, uint32_t xferred_bytes)
static TU_ATTR_ALWAYS_INLINE void tu_edpt_stream_open(tu_edpt_stream_t *s, tusb_desc_endpoint_t const *desc_ep)
bool tu_edpt_release(tu_edpt_state_t *ep_state, osal_mutex_t mutex)
uint16_t tu_desc_get_interface_total_len(tusb_desc_interface_t const *desc_itf, uint8_t itf_count, uint16_t max_len)
bool tu_edpt_stream_init(tu_edpt_stream_t *s, bool is_host, bool is_tx, bool overwritable, void *ff_buf, uint16_t ff_bufsize, uint8_t *ep_buf, uint16_t ep_bufsize)
void tu_edpt_bind_driver(uint8_t ep2drv[][2], tusb_desc_interface_t const *p_desc, uint16_t desc_len, uint8_t driver_id)
bool tu_edpt_stream_deinit(tu_edpt_stream_t *s)
tusb_speed_t
defined base on EHCI specs value for Endpoint Speed
static TU_ATTR_ALWAYS_INLINE uint16_t tu_edpt_packet_size(tusb_desc_endpoint_t const *desc_ep)