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

Go to the source code of this file.

Classes

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

Typedefs

typedef struct TU_ATTR_PACKED tcd_event_t
 

Enumerations

enum  { TCD_EVENT_INVALID = 0 , TCD_EVENT_CC_CHANGED , TCD_EVENT_RX_COMPLETE , TCD_EVENT_TX_COMPLETE }
 

Functions

bool tcd_init (uint8_t rhport, uint32_t port_type)
 
void tcd_int_enable (uint8_t rhport)
 
void tcd_int_disable (uint8_t rhport)
 
void tcd_int_handler (uint8_t rhport)
 
bool tcd_msg_receive (uint8_t rhport, uint8_t *buffer, uint16_t total_bytes)
 
bool tcd_msg_send (uint8_t rhport, uint8_t const *buffer, uint16_t total_bytes)
 
void tcd_event_handler (tcd_event_t const *event, bool in_isr)
 
static TU_ATTR_ALWAYS_INLINE void tcd_event_cc_changed (uint8_t rhport, uint8_t cc1, uint8_t cc2, bool in_isr)
 
static TU_ATTR_ALWAYS_INLINE void tcd_event_rx_complete (uint8_t rhport, uint16_t xferred_bytes, uint8_t result, bool in_isr)
 
static TU_ATTR_ALWAYS_INLINE void tcd_event_tx_complete (uint8_t rhport, uint16_t xferred_bytes, uint8_t result, bool in_isr)
 

Typedef Documentation

◆ tcd_event_t

typedef struct TU_ATTR_PACKED tcd_event_t

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
TCD_EVENT_INVALID 
TCD_EVENT_CC_CHANGED 
TCD_EVENT_RX_COMPLETE 
TCD_EVENT_TX_COMPLETE 

Definition at line 44 of file tcd.h.

Function Documentation

◆ tcd_event_cc_changed()

static TU_ATTR_ALWAYS_INLINE void tcd_event_cc_changed ( uint8_t  rhport,
uint8_t  cc1,
uint8_t  cc2,
bool  in_isr 
)
inlinestatic

Definition at line 99 of file tcd.h.

◆ tcd_event_handler()

void tcd_event_handler ( tcd_event_t const *  event,
bool  in_isr 
)

Definition at line 185 of file usbc.c.

◆ tcd_event_rx_complete()

static TU_ATTR_ALWAYS_INLINE void tcd_event_rx_complete ( uint8_t  rhport,
uint16_t  xferred_bytes,
uint8_t  result,
bool  in_isr 
)
inlinestatic

Definition at line 112 of file tcd.h.

◆ tcd_event_tx_complete()

static TU_ATTR_ALWAYS_INLINE void tcd_event_tx_complete ( uint8_t  rhport,
uint16_t  xferred_bytes,
uint8_t  result,
bool  in_isr 
)
inlinestatic

Definition at line 126 of file tcd.h.

◆ tcd_init()

bool tcd_init ( uint8_t  rhport,
uint32_t  port_type 
)

Definition at line 167 of file typec_stm32.c.

◆ tcd_int_disable()

void tcd_int_disable ( uint8_t  rhport)

Definition at line 208 of file typec_stm32.c.

◆ tcd_int_enable()

void tcd_int_enable ( uint8_t  rhport)

Definition at line 202 of file typec_stm32.c.

◆ tcd_int_handler()

void tcd_int_handler ( uint8_t  rhport)

Definition at line 238 of file typec_stm32.c.

◆ tcd_msg_receive()

bool tcd_msg_receive ( uint8_t  rhport,
uint8_t *  buffer,
uint16_t  total_bytes 
)

Definition at line 213 of file typec_stm32.c.

◆ tcd_msg_send()

bool tcd_msg_send ( uint8_t  rhport,
uint8_t const *  buffer,
uint16_t  total_bytes 
)

Definition at line 219 of file typec_stm32.c.