FreeRTOS port on GAP8/RISC-V
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gap9/pmsis/drivers/udma/i2c/i2c.c File Reference

Functions

void pi_i2c_conf_init (pi_i2c_conf_t *conf)
 
void pi_i2c_conf_set_wait_cycles (struct pi_i2c_conf *conf, uint16_t wait_cycles)
 
void pi_i2c_conf_set_slave_addr (struct pi_i2c_conf *conf, uint16_t slave_addr, int8_t is_10_bits)
 
int pi_i2c_open (struct pi_device *device)
 
void pi_i2c_close (struct pi_device *device)
 
void pi_i2c_ioctl (struct pi_device *device, uint32_t cmd, void *arg)
 
int pi_i2c_write (struct pi_device *device, uint8_t *tx_data, int length, pi_i2c_xfer_flags_e flags)
 
int pi_i2c_read (struct pi_device *device, uint8_t *rx_buff, int length, pi_i2c_xfer_flags_e flags)
 
void pi_i2c_read_async (struct pi_device *device, uint8_t *rx_buff, int length, pi_i2c_xfer_flags_e flags, pi_task_t *task)
 
void pi_i2c_write_async (struct pi_device *device, uint8_t *tx_data, int length, pi_i2c_xfer_flags_e flags, pi_task_t *task)
 
int pi_i2c_read_timeout (struct pi_device *device, uint8_t *rx_buff, int length, pi_i2c_xfer_flags_e flags, uint32_t timeout_us)
 
int pi_i2c_write_timeout (struct pi_device *device, uint8_t *tx_data, int length, pi_i2c_xfer_flags_e flags, uint32_t timeout_us)
 
int pi_i2c_get_request_status (pi_task_t *task)
 
void pi_i2c_write_read (struct pi_device *device, void *tx_buffer, void *rx_buffer, uint32_t tx_size, uint32_t rx_size)
 
void pi_i2c_write_read_async (struct pi_device *device, void *tx_buffer, void *rx_buffer, uint32_t tx_size, uint32_t rx_size, pi_task_t *callback)
 
void pi_i2c_write_dual_async (struct pi_device *device, void *tx_buffer0, void *tx_buffer1, uint32_t tx_size0, uint32_t tx_size1, pi_task_t *callback)
 

Function Documentation

void pi_i2c_close ( struct pi_device *  device)

References __pi_i2c_close().

void pi_i2c_conf_init ( pi_i2c_conf_t *  conf)
void pi_i2c_conf_set_slave_addr ( struct pi_i2c_conf *  conf,
uint16_t  slave_addr,
int8_t  is_10_bits 
)

accessors

void pi_i2c_conf_set_wait_cycles ( struct pi_i2c_conf *  conf,
uint16_t  wait_cycles 
)
int pi_i2c_get_request_status ( pi_task_t task)

References pi_task_t::data.

void pi_i2c_ioctl ( struct pi_device *  device,
uint32_t  cmd,
void *  arg 
)

References __pi_i2c_ioctl(), and I2C_TRACE.

int pi_i2c_open ( struct pi_device *  device)

device func

References __pi_i2c_open().

int pi_i2c_read ( struct pi_device *  device,
uint8_t *  rx_buff,
int  length,
pi_i2c_xfer_flags_e  flags 
)
void pi_i2c_read_async ( struct pi_device *  device,
uint8_t *  rx_buff,
int  length,
pi_i2c_xfer_flags_e  flags,
pi_task_t task 
)

References __pi_i2c_read().

int pi_i2c_read_timeout ( struct pi_device *  device,
uint8_t *  rx_buff,
int  length,
pi_i2c_xfer_flags_e  flags,
uint32_t  timeout_us 
)
int pi_i2c_write ( struct pi_device *  device,
uint8_t *  tx_data,
int  length,
pi_i2c_xfer_flags_e  flags 
)
void pi_i2c_write_async ( struct pi_device *  device,
uint8_t *  tx_data,
int  length,
pi_i2c_xfer_flags_e  flags,
pi_task_t task 
)

References __pi_i2c_write().

void pi_i2c_write_dual_async ( struct pi_device *  device,
void *  tx_buffer0,
void *  tx_buffer1,
uint32_t  tx_size0,
uint32_t  tx_size1,
pi_task_t callback 
)

References __pi_i2c_write_dual().

void pi_i2c_write_read ( struct pi_device *  device,
void *  tx_buffer,
void *  rx_buffer,
uint32_t  tx_size,
uint32_t  rx_size 
)
void pi_i2c_write_read_async ( struct pi_device *  device,
void *  tx_buffer,
void *  rx_buffer,
uint32_t  tx_size,
uint32_t  rx_size,
pi_task_t callback 
)

References __pi_i2c_write_read().

int pi_i2c_write_timeout ( struct pi_device *  device,
uint8_t *  tx_data,
int  length,
pi_i2c_xfer_flags_e  flags,
uint32_t  timeout_us 
)