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

Macros

#define ADDRESS_WRITE
 
#define ADDRESS_READ
 
#define MAX_SIZE
 

Functions

static void __pi_i2c_handler (void *arg)
 
static uint32_t __pi_i2c_clk_div_get (uint32_t baudrate)
 
static void __pi_i2c_cs_data_add (struct i2c_itf_data_s *driver_data, struct i2c_cs_data_s *cs_data)
 
static void __pi_i2c_cs_data_remove (struct i2c_itf_data_s *driver_data, struct i2c_cs_data_s *cs_data)
 
static void __pi_i2c_handle_pending_transfer (struct i2c_itf_data_s *driver_data)
 
static void __pi_i2c_send_stop_cmd (struct i2c_itf_data_s *driver_data)
 
static int32_t __pi_i2c_hw_fifo_both_empty (struct i2c_itf_data_s *driver_data)
 
static int32_t __pi_i2c_hw_fifo_empty (struct i2c_itf_data_s *driver_data, udma_channel_e channel)
 
static void __pi_i2c_hw_fifo_enqueue (struct i2c_itf_data_s *driver_data, struct pi_task *task, udma_channel_e channel)
 
static struct pi_task * __pi_i2c_hw_fifo_pop (struct i2c_itf_data_s *driver_data, udma_channel_e channel)
 
static void __pi_i2c_task_fifo_enqueue (struct i2c_itf_data_s *driver_data, struct pi_task *task)
 
static struct pi_task * __pi_i2c_task_fifo_pop (struct i2c_itf_data_s *driver_data)
 
static void __pi_i2c_copy_exec_read (struct i2c_itf_data_s *driver_data, struct pi_task *task)
 
static void __pi_i2c_copy_exec_write (struct i2c_itf_data_s *driver_data, struct pi_task *task)
 
static void __pi_i2c_freq_cb (void *args)
 
static int32_t __pi_i2c_baudrate_set (struct i2c_cs_data_s *cs_data, uint32_t new_baudrate)
 
void __pi_i2c_conf_init (pi_i2c_conf_t *conf)
 
int32_t __pi_i2c_open (struct pi_i2c_conf *conf, struct i2c_cs_data_s **device_data)
 
void __pi_i2c_close (struct i2c_cs_data_s *device_data)
 
void __pi_i2c_ioctl (struct i2c_cs_data_s *device_data, uint32_t cmd, void *arg)
 
void __pi_i2c_copy (struct i2c_cs_data_s *cs_data, uint32_t l2_buff, uint32_t length, pi_i2c_xfer_flags_e flags, udma_channel_e channel, struct pi_task *task)
 
int32_t __pi_i2c_detect (struct i2c_cs_data_s *cs_data, struct pi_i2c_conf *conf, uint8_t *rx_data, struct pi_task *task)
 

Variables

static struct i2c_itf_data_sg_i2c_itf_data [UDMA_NB_I2C]
 

Macro Definition Documentation

#define ADDRESS_READ
#define ADDRESS_WRITE
#define MAX_SIZE

Function Documentation

static int32_t __pi_i2c_baudrate_set ( struct i2c_cs_data_s cs_data,
uint32_t  new_baudrate 
)
static
static uint32_t __pi_i2c_clk_div_get ( uint32_t  baudrate)
static
void __pi_i2c_conf_init ( pi_i2c_conf_t *  conf)

Referenced by pi_i2c_conf_init().

void __pi_i2c_copy ( struct i2c_cs_data_s cs_data,
uint32_t  l2_buff,
uint32_t  length,
pi_i2c_xfer_flags_e  flags,
udma_channel_e  channel,
struct pi_task *  task 
)
static void __pi_i2c_cs_data_add ( struct i2c_itf_data_s driver_data,
struct i2c_cs_data_s cs_data 
)
static
static void __pi_i2c_cs_data_remove ( struct i2c_itf_data_s driver_data,
struct i2c_cs_data_s cs_data 
)
static
static int32_t __pi_i2c_hw_fifo_both_empty ( struct i2c_itf_data_s driver_data)
static
static int32_t __pi_i2c_hw_fifo_empty ( struct i2c_itf_data_s driver_data,
udma_channel_e  channel 
)
static
static void __pi_i2c_hw_fifo_enqueue ( struct i2c_itf_data_s driver_data,
struct pi_task *  task,
udma_channel_e  channel 
)
static
static struct pi_task * __pi_i2c_hw_fifo_pop ( struct i2c_itf_data_s driver_data,
udma_channel_e  channel 
)
static

References i2c_itf_data_s::hw_buffer.

Referenced by __pi_i2c_handler().

void __pi_i2c_ioctl ( struct i2c_cs_data_s device_data,
uint32_t  cmd,
void *  arg 
)

References __pi_i2c_baudrate_set().

Referenced by pi_i2c_ioctl().

static void __pi_i2c_task_fifo_enqueue ( struct i2c_itf_data_s driver_data,
struct pi_task *  task 
)
static
static struct pi_task * __pi_i2c_task_fifo_pop ( struct i2c_itf_data_s driver_data)
static

References i2c_itf_data_s::fifo_head.

Referenced by __pi_i2c_handler().

Variable Documentation

struct i2c_itf_data_s* g_i2c_itf_data[UDMA_NB_I2C]
static