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

Go to the source code of this file.

Enumerations

enum  { DWC2_CONTROLLER_COUNT = TU_ARRAY_SIZE(_dwc2_controller) }
 
enum  { OTG_INT_COMMON = 0 }
 

Functions

static TU_ATTR_ALWAYS_INLINE dwc2_regs_tDWC2_REG (uint8_t rhport)
 
bool dwc2_core_is_highspeed (dwc2_regs_t *dwc2, tusb_role_t role)
 
bool dwc2_core_init (uint8_t rhport, bool is_highspeed)
 
void dwc2_core_handle_common_irq (uint8_t rhport, bool in_isr)
 
static TU_ATTR_ALWAYS_INLINE void dfifo_flush_tx (dwc2_regs_t *dwc2, uint8_t fnum)
 
static TU_ATTR_ALWAYS_INLINE void dfifo_flush_rx (dwc2_regs_t *dwc2)
 
void dfifo_read_packet (dwc2_regs_t *dwc2, uint8_t *dst, uint16_t len)
 
void dfifo_write_packet (dwc2_regs_t *dwc2, uint8_t fifo_num, uint8_t const *src, uint16_t len)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
DWC2_CONTROLLER_COUNT 

Definition at line 56 of file dwc2_common.h.

◆ anonymous enum

anonymous enum
Enumerator
OTG_INT_COMMON 

Definition at line 60 of file dwc2_common.h.

Function Documentation

◆ dfifo_flush_rx()

static TU_ATTR_ALWAYS_INLINE void dfifo_flush_rx ( dwc2_regs_t dwc2)
inlinestatic

Definition at line 88 of file dwc2_common.h.

◆ dfifo_flush_tx()

static TU_ATTR_ALWAYS_INLINE void dfifo_flush_tx ( dwc2_regs_t dwc2,
uint8_t  fnum 
)
inlinestatic

Definition at line 82 of file dwc2_common.h.

◆ dfifo_read_packet()

void dfifo_read_packet ( dwc2_regs_t dwc2,
uint8_t *  dst,
uint16_t  len 
)

Definition at line 252 of file dwc2_common.c.

◆ dfifo_write_packet()

void dfifo_write_packet ( dwc2_regs_t dwc2,
uint8_t  fifo_num,
uint8_t const *  src,
uint16_t  len 
)

Definition at line 277 of file dwc2_common.c.

◆ dwc2_core_handle_common_irq()

void dwc2_core_handle_common_irq ( uint8_t  rhport,
bool  in_isr 
)

◆ dwc2_core_init()

bool dwc2_core_init ( uint8_t  rhport,
bool  is_highspeed 
)

Definition at line 197 of file dwc2_common.c.

◆ dwc2_core_is_highspeed()

bool dwc2_core_is_highspeed ( dwc2_regs_t dwc2,
tusb_role_t  role 
)

Definition at line 172 of file dwc2_common.c.

◆ DWC2_REG()

static TU_ATTR_ALWAYS_INLINE dwc2_regs_t * DWC2_REG ( uint8_t  rhport)
inlinestatic

Definition at line 67 of file dwc2_common.h.