Open FFBoard
Open source force feedback firmware
Loading...
Searching...
No Matches
usbc.c File Reference

Go to the source code of this file.

Functions

void usbc_int_set (bool enabled)
 
 OSAL_QUEUE_DEF (usbc_int_set, _usbc_qdef, CFG_TUC_TASK_QUEUE_SZ, tcd_event_t)
 
static uint8_t _rx_buf[64] TU_ATTR_ALIGNED (4)
 
bool usbc_msg_send (uint8_t rhport, pd_header_t const *header, void const *data)
 
bool parse_msg_data (uint8_t rhport, pd_header_t const *header, uint8_t const *dobj, uint8_t const *p_end)
 
bool parse_msg_control (uint8_t rhport, pd_header_t const *header)
 
bool tuc_inited (uint8_t rhport)
 
bool tuc_init (uint8_t rhport, uint32_t port_type)
 
void tuc_task_ext (uint32_t timeout_ms, bool in_isr)
 
bool tuc_msg_request (uint8_t rhport, void const *rdo)
 
void tcd_event_handler (tcd_event_t const *event, bool in_isr)
 

Variables

tu_static osal_queue_t _usbc_q
 
static bool _usbc_inited = false
 
static bool _port_inited [TUP_TYPEC_RHPORTS_NUM]
 

Function Documentation

◆ OSAL_QUEUE_DEF()

OSAL_QUEUE_DEF ( usbc_int_set ,
_usbc_qdef ,
CFG_TUC_TASK_QUEUE_SZ ,
tcd_event_t  )

◆ parse_msg_control()

bool parse_msg_control ( uint8_t rhport,
pd_header_t const * header )

Definition at line 146 of file usbc.c.

◆ parse_msg_data()

bool parse_msg_data ( uint8_t rhport,
pd_header_t const * header,
uint8_t const * dobj,
uint8_t const * p_end )

Definition at line 138 of file usbc.c.

◆ tcd_event_handler()

void tcd_event_handler ( tcd_event_t const * event,
bool in_isr )

Definition at line 185 of file usbc.c.

◆ TU_ATTR_ALIGNED()

static uint8_t _rx_buf[64] TU_ATTR_ALIGNED ( 4 )
static

< reserved

Definition at line 35 of file dcd.h.

◆ tuc_init()

bool tuc_init ( uint8_t rhport,
uint32_t port_type )

Definition at line 69 of file usbc.c.

◆ tuc_inited()

bool tuc_inited ( uint8_t rhport)

Definition at line 65 of file usbc.c.

◆ tuc_msg_request()

bool tuc_msg_request ( uint8_t rhport,
void const * rdo )

Definition at line 171 of file usbc.c.

◆ tuc_task_ext()

void tuc_task_ext ( uint32_t timeout_ms,
bool in_isr )

Definition at line 95 of file usbc.c.

◆ usbc_int_set()

void usbc_int_set ( bool enabled)

Definition at line 206 of file usbc.c.

◆ usbc_msg_send()

bool usbc_msg_send ( uint8_t rhport,
pd_header_t const * header,
void const * data )

Definition at line 158 of file usbc.c.

Variable Documentation

◆ _port_inited

bool _port_inited[TUP_TYPEC_RHPORTS_NUM]
static

Definition at line 52 of file usbc.c.

◆ _usbc_inited

bool _usbc_inited = false
static

Definition at line 49 of file usbc.c.

◆ _usbc_q

tu_static osal_queue_t _usbc_q

Definition at line 46 of file usbc.c.