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

Go to the source code of this file.

Classes

struct  usbd_class_driver_t
 

Typedefs

typedef bool(* usbd_control_xfer_cb_t) (uint8_t rhport, uint8_t stage, tusb_control_request_t const *request)
 

Functions

usbd_class_driver_t const * usbd_app_driver_get_cb (uint8_t *driver_count) TU_ATTR_WEAK
 
void usbd_int_set (bool enabled)
 
bool usbd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const *desc_ep)
 
void usbd_edpt_close (uint8_t rhport, uint8_t ep_addr)
 
bool usbd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t *buffer, uint16_t total_bytes)
 
bool usbd_edpt_xfer_fifo (uint8_t rhport, uint8_t ep_addr, tu_fifo_t *ff, uint16_t total_bytes)
 
bool usbd_edpt_claim (uint8_t rhport, uint8_t ep_addr)
 
bool usbd_edpt_release (uint8_t rhport, uint8_t ep_addr)
 
bool usbd_edpt_busy (uint8_t rhport, uint8_t ep_addr)
 
void usbd_edpt_stall (uint8_t rhport, uint8_t ep_addr)
 
void usbd_edpt_clear_stall (uint8_t rhport, uint8_t ep_addr)
 
bool usbd_edpt_stalled (uint8_t rhport, uint8_t ep_addr)
 
bool usbd_edpt_iso_alloc (uint8_t rhport, uint8_t ep_addr, uint16_t largest_packet_size)
 
bool usbd_edpt_iso_activate (uint8_t rhport, tusb_desc_endpoint_t const *p_endpoint_desc)
 
static TU_ATTR_ALWAYS_INLINE bool usbd_edpt_ready (uint8_t rhport, uint8_t ep_addr)
 
void usbd_sof_enable (uint8_t rhport, sof_consumer_t consumer, bool en)
 
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)
 
void usbd_defer_func (osal_task_func_t func, void *param, bool in_isr)
 

Variables

 C
 

Typedef Documentation

◆ usbd_control_xfer_cb_t

typedef bool(* usbd_control_xfer_cb_t) (uint8_t rhport, uint8_t stage, tusb_control_request_t const *request)

Definition at line 68 of file usbd_pvt.h.

Function Documentation

◆ usbd_app_driver_get_cb()

usbd_class_driver_t const * usbd_app_driver_get_cb ( uint8_t *  driver_count)

◆ usbd_defer_func()

void usbd_defer_func ( osal_task_func_t  func,
void *  param,
bool  in_isr 
)

Definition at line 1262 of file usbd.c.

◆ usbd_edpt_busy()

bool usbd_edpt_busy ( uint8_t  rhport,
uint8_t  ep_addr 
)

Definition at line 1376 of file usbd.c.

◆ usbd_edpt_claim()

bool usbd_edpt_claim ( uint8_t  rhport,
uint8_t  ep_addr 
)

Definition at line 1286 of file usbd.c.

◆ usbd_edpt_clear_stall()

void usbd_edpt_clear_stall ( uint8_t  rhport,
uint8_t  ep_addr 
)

Definition at line 1398 of file usbd.c.

◆ usbd_edpt_close()

void usbd_edpt_close ( uint8_t  rhport,
uint8_t  ep_addr 
)

usbd_edpt_close will disable an endpoint. In progress transfers on this EP may be delivered after this call.

Definition at line 1424 of file usbd.c.

◆ usbd_edpt_iso_activate()

bool usbd_edpt_iso_activate ( uint8_t  rhport,
tusb_desc_endpoint_t const *  p_endpoint_desc 
)

Definition at line 1474 of file usbd.c.

◆ usbd_edpt_iso_alloc()

bool usbd_edpt_iso_alloc ( uint8_t  rhport,
uint8_t  ep_addr,
uint16_t  largest_packet_size 
)

Definition at line 1462 of file usbd.c.

◆ usbd_edpt_open()

bool usbd_edpt_open ( uint8_t  rhport,
tusb_desc_endpoint_t const *  desc_ep 
)

Definition at line 1277 of file usbd.c.

◆ usbd_edpt_ready()

static TU_ATTR_ALWAYS_INLINE bool usbd_edpt_ready ( uint8_t  rhport,
uint8_t  ep_addr 
)
inlinestatic

Definition at line 116 of file usbd_pvt.h.

◆ usbd_edpt_release()

bool usbd_edpt_release ( uint8_t  rhport,
uint8_t  ep_addr 
)

Definition at line 1299 of file usbd.c.

◆ usbd_edpt_stall()

void usbd_edpt_stall ( uint8_t  rhport,
uint8_t  ep_addr 
)

Definition at line 1385 of file usbd.c.

◆ usbd_edpt_stalled()

bool usbd_edpt_stalled ( uint8_t  rhport,
uint8_t  ep_addr 
)

Definition at line 1411 of file usbd.c.

◆ usbd_edpt_xfer()

bool usbd_edpt_xfer ( uint8_t  rhport,
uint8_t  ep_addr,
uint8_t *  buffer,
uint16_t  total_bytes 
)

Definition at line 1309 of file usbd.c.

◆ usbd_edpt_xfer_fifo()

bool usbd_edpt_xfer_fifo ( uint8_t  rhport,
uint8_t  ep_addr,
tu_fifo_t ff,
uint16_t  total_bytes 
)

Definition at line 1348 of file usbd.c.

◆ usbd_int_set()

void usbd_int_set ( bool  enabled)

Definition at line 1226 of file usbd.c.

◆ usbd_open_edpt_pair()

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 
)

Definition at line 1238 of file usbd.c.

◆ usbd_sof_enable()

void usbd_sof_enable ( uint8_t  rhport,
sof_consumer_t  consumer,
bool  en 
)

Definition at line 1445 of file usbd.c.

Variable Documentation

◆ C

C
extern
Initial value:
{
#endif
#define TU_LOG_USBD(...) TU_LOG(CFG_TUD_LOG_LEVEL, __VA_ARGS__)
typedef enum {
SOF_CONSUMER_USER = 0,
SOF_CONSUMER_AUDIO,
} sof_consumer_t