Open FFBoard
Open source force feedback firmware
tusb_private.h File Reference

Go to the source code of this file.

Classes

struct  TU_ATTR_PACKED
 AUDIO Channel Cluster Descriptor (4.1) More...
 
struct  tu_edpt_stream_t
 
struct  tu_edpt_stream_t::TU_ATTR_PACKED
 

Typedefs

typedef struct TU_ATTR_PACKED tu_edpt_state_t
 

Functions

bool tu_edpt_validate (tusb_desc_endpoint_t const *desc_ep, tusb_speed_t speed)
 
void tu_edpt_bind_driver (uint8_t ep2drv[][2], tusb_desc_interface_t const *p_desc, uint16_t desc_len, uint8_t driver_id)
 
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_claim (tu_edpt_state_t *ep_state, osal_mutex_t mutex)
 
bool tu_edpt_release (tu_edpt_state_t *ep_state, osal_mutex_t mutex)
 
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)
 
bool tu_edpt_stream_deinit (tu_edpt_stream_t *s)
 
static TU_ATTR_ALWAYS_INLINE void tu_edpt_stream_open (tu_edpt_stream_t *s, tusb_desc_endpoint_t const *desc_ep)
 
static TU_ATTR_ALWAYS_INLINE void tu_edpt_stream_close (tu_edpt_stream_t *s)
 
static TU_ATTR_ALWAYS_INLINE bool tu_edpt_stream_clear (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)
 
uint32_t tu_edpt_stream_write_xfer (uint8_t hwid, tu_edpt_stream_t *s)
 
bool tu_edpt_stream_write_zlp_if_needed (uint8_t hwid, tu_edpt_stream_t *s, uint32_t last_xferred_bytes)
 
uint32_t tu_edpt_stream_write_available (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_read_xfer (uint8_t hwid, tu_edpt_stream_t *s)
 
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_read_xfer_complete_offset (tu_edpt_stream_t *s, uint32_t xferred_bytes, uint32_t skip_offset)
 
static TU_ATTR_ALWAYS_INLINE uint32_t tu_edpt_stream_read_available (tu_edpt_stream_t *s)
 
static TU_ATTR_ALWAYS_INLINE bool tu_edpt_stream_peek (tu_edpt_stream_t *s, uint8_t *ch)
 

Variables

 C
 

Typedef Documentation

◆ tu_edpt_state_t

Function Documentation

◆ tu_desc_get_interface_total_len()

uint16_t tu_desc_get_interface_total_len ( tusb_desc_interface_t const *  desc_itf,
uint8_t  itf_count,
uint16_t  max_len 
)

Definition at line 251 of file tusb.c.

◆ tu_edpt_bind_driver()

void tu_edpt_bind_driver ( uint8_t  ep2drv[][2],
tusb_desc_interface_t const *  p_desc,
uint16_t  desc_len,
uint8_t  driver_id 
)

Definition at line 236 of file tusb.c.

◆ tu_edpt_claim()

bool tu_edpt_claim ( tu_edpt_state_t ep_state,
osal_mutex_t  mutex 
)

Definition at line 171 of file tusb.c.

◆ tu_edpt_release()

bool tu_edpt_release ( tu_edpt_state_t ep_state,
osal_mutex_t  mutex 
)

Definition at line 188 of file tusb.c.

◆ tu_edpt_stream_clear()

static TU_ATTR_ALWAYS_INLINE bool tu_edpt_stream_clear ( tu_edpt_stream_t s)
inlinestatic

Definition at line 110 of file tusb_private.h.

◆ tu_edpt_stream_close()

static TU_ATTR_ALWAYS_INLINE void tu_edpt_stream_close ( tu_edpt_stream_t s)
inlinestatic

Definition at line 104 of file tusb_private.h.

◆ tu_edpt_stream_deinit()

bool tu_edpt_stream_deinit ( tu_edpt_stream_t s)

Definition at line 302 of file tusb.c.

◆ tu_edpt_stream_init()

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 
)

Definition at line 282 of file tusb.c.

◆ tu_edpt_stream_open()

static TU_ATTR_ALWAYS_INLINE void tu_edpt_stream_open ( tu_edpt_stream_t s,
tusb_desc_endpoint_t const *  desc_ep 
)
inlinestatic

Definition at line 97 of file tusb_private.h.

◆ tu_edpt_stream_peek()

static TU_ATTR_ALWAYS_INLINE bool tu_edpt_stream_peek ( tu_edpt_stream_t s,
uint8_t *  ch 
)
inlinestatic

Definition at line 164 of file tusb_private.h.

◆ tu_edpt_stream_read()

uint32_t tu_edpt_stream_read ( uint8_t  hwid,
tu_edpt_stream_t s,
void *  buffer,
uint32_t  bufsize 
)

Definition at line 461 of file tusb.c.

◆ tu_edpt_stream_read_available()

static TU_ATTR_ALWAYS_INLINE uint32_t tu_edpt_stream_read_available ( tu_edpt_stream_t s)
inlinestatic

Definition at line 159 of file tusb_private.h.

◆ tu_edpt_stream_read_xfer()

uint32_t tu_edpt_stream_read_xfer ( uint8_t  hwid,
tu_edpt_stream_t s 
)

Definition at line 426 of file tusb.c.

◆ tu_edpt_stream_read_xfer_complete()

static TU_ATTR_ALWAYS_INLINE void tu_edpt_stream_read_xfer_complete ( tu_edpt_stream_t s,
uint32_t  xferred_bytes 
)
inlinestatic

Definition at line 143 of file tusb_private.h.

◆ tu_edpt_stream_read_xfer_complete_offset()

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 
)
inlinestatic

Definition at line 151 of file tusb_private.h.

◆ tu_edpt_stream_write()

uint32_t tu_edpt_stream_write ( uint8_t  hwid,
tu_edpt_stream_t s,
void const *  buffer,
uint32_t  bufsize 
)

Definition at line 382 of file tusb.c.

◆ tu_edpt_stream_write_available()

uint32_t tu_edpt_stream_write_available ( uint8_t  hwid,
tu_edpt_stream_t s 
)

Definition at line 405 of file tusb.c.

◆ tu_edpt_stream_write_xfer()

uint32_t tu_edpt_stream_write_xfer ( uint8_t  hwid,
tu_edpt_stream_t s 
)

Definition at line 362 of file tusb.c.

◆ tu_edpt_stream_write_zlp_if_needed()

bool tu_edpt_stream_write_zlp_if_needed ( uint8_t  hwid,
tu_edpt_stream_t s,
uint32_t  last_xferred_bytes 
)

Definition at line 353 of file tusb.c.

◆ tu_edpt_validate()

bool tu_edpt_validate ( tusb_desc_endpoint_t const *  desc_ep,
tusb_speed_t  speed 
)

Definition at line 202 of file tusb.c.

Variable Documentation

◆ C

C
extern
Initial value:
{
#endif
#define TUP_USBIP_CONTROLLER_NUM 2
extern tusb_role_t _tusb_rhport_role[TUP_USBIP_CONTROLLER_NUM]