FreeRTOS port on GAP8/RISC-V
|
Functions | |
__attribute__ ((section(".text"))) | |
static void | __pi_i2c_send_request_from_irq (struct i2c_itf_data *itf_data, pi_task_t *task) |
static void | __pi_i2c_handle_error (int device_id, struct i2c_itf_data *itf_data) |
static void | __i2c_open_prepare_write_buf (uint32_t *write_buffer, struct pi_i2c_conf *conf) |
internal helper function for preparing write command buffer More... | |
static void | __i2c_open_prepare_read_buf (uint32_t *read_buffer, struct pi_i2c_conf *conf) |
internal helper function for preparing read command buffer More... | |
static void | __i2c_open_prepare_w_r_buf (uint32_t *w_r_buffer, struct pi_i2c_conf *conf) |
internal helper function for preparing write&read command buffer More... | |
int | __pi_i2c_open (struct i2c_slave_data **slave_data, struct pi_i2c_conf *conf) |
void | __pi_i2c_close (struct i2c_slave_data *slave_data) |
static void | __pi_i2c_baudrate_set (struct i2c_itf_data *driver_data) |
void | __pi_i2c_timeout_abort (void *arg) |
static void | __pi_i2c_udma_timeout_rx_set (struct i2c_itf_data *driver_data, uint8_t timeout_id) |
static void | __pi_i2c_udma_timeout_tx_set (struct i2c_itf_data *driver_data, uint8_t timeout_id) |
void | __pi_i2c_ioctl (struct i2c_slave_data *slave_data, uint32_t cmd, void *arg) |
Variables | |
struct i2c_itf_data * | __global_i2c_itf_data [UDMA_NB_I2C] |
__attribute__ | ( | (section(".text")) | ) |
|
inlinestatic |
References I2C_BUF_START_POS, I2C_CHAN_ADDR_REG, I2C_CHAN_CFG_REG, I2C_CHAN_SIZE_REG, I2C_CMD_EVENT, I2C_CMD_LEAD_SEND_IMM, I2C_CMD_LEAD_SEND_IMM_ADDR, I2C_CMD_LEAD_START, I2C_CMD_MISC_RECEIVE, I2C_CMD_MISC_RECEIVE_LAST, I2C_CMD_MISC_WAIT, I2C_CMD_NOP, I2C_CMD_RPT, I2C_CMD_UDMA_RX_CHAN_CFG, RD_BUF_RPT, RD_BUF_STOP_ID, and UDMA_CORE_LIN_ADDRGEN_CFG_CTRL_EN.
Referenced by __pi_i2c_open().
|
inlinestatic |
|
inlinestatic |
References I2C_BUF_START_POS, I2C_CHAN_ADDR_REG, I2C_CHAN_CFG_REG, I2C_CHAN_SIZE_REG, I2C_CMD_EVENT, I2C_CMD_LEAD_SEND_IMM_ADDR, I2C_CMD_LEAD_START, I2C_CMD_MISC_SEND, I2C_CMD_MISC_WAIT, I2C_CMD_NOP, I2C_CMD_RPT, I2C_CMD_UDMA_TX_CHAN_CFG, UDMA_CORE_LIN_ADDRGEN_CFG_CTRL_EN, and WR_BUF_STOP_ID.
Referenced by __pi_i2c_open().
|
static |
Referenced by __pi_i2c_ioctl().
void __pi_i2c_close | ( | struct i2c_slave_data * | slave_data | ) |
References __i2c_drv_remove_slave(), i2c_itf_data::cmd_chan_id, disable_irq(), hal_soc_eu_clear_fc_mask(), hal_udma_core_lin_get(), hal_udma_core_lin_reset(), hal_udma_ctrl_cg_enable(), hal_udma_ctrl_reset_enable(), I2C_TRACE, i2c_itf_data::id, i2c_slave_data::itf_data, i2c_itf_data::open_nb, pi_data_free, pi_udma_core_lin_free(), i2c_slave_data::ref_cnt, restore_irq(), i2c_itf_data::rx_chan_id, SOC_EVENT_UDMA_CHAN_LIN, SOC_EVENT_UDMA_I2C_LEAD_EVT, i2c_itf_data::tx_chan_id, and UDMA_I2C_ID.
|
inlinestatic |
References __pi_i2c_send_request_from_irq(), CMD_CHANNEL, pi_task_t::data, i2c_itf_data::end_task, hal_udma_i2c_channel_stop(), hal_udma_i2c_clr_event_mask(), hal_udma_i2c_get_event_by_id(), I2C_FLAG_PURGE_EVENT_O, I2C_FLAG_UNLOCK_EVENT_O, I2C_STATUS_ERROR_ARLO_EVENT, I2C_STATUS_ERROR_FRAMING_EVENT, I2C_STATUS_ERROR_NACK_EVENT, I2C_TRACE, I2C_TRACE_ERR, pi_task_t::id, pi_task_release(), pmsis_event_get_default_scheduler(), pmsis_event_push(), RX_CHANNEL, and TX_CHANNEL.
void __pi_i2c_ioctl | ( | struct i2c_slave_data * | slave_data, |
uint32_t | cmd, | ||
void * | arg | ||
) |
int __pi_i2c_open | ( | struct i2c_slave_data ** | slave_data, |
struct pi_i2c_conf * | conf | ||
) |
References ___i2c_drv_get_slave(), __i2c_drv_add_slave(), __i2c_open_prepare_read_buf(), __i2c_open_prepare_w_r_buf(), __i2c_open_prepare_write_buf(), __i2c_prepare_timing(), i2c_itf_data::cmd_chan_id, CMD_CHANNEL, disable_irq(), hal_soc_eu_clear_fc_mask(), hal_soc_eu_set_fc_mask(), hal_udma_ctrl_cg_disable(), hal_udma_ctrl_reset_disable(), hal_udma_i2c_clr_event_by_id(), hal_udma_i2c_cmd_dest_set(), hal_udma_i2c_enqueue(), hal_udma_i2c_get_event_by_id(), hal_udma_i2c_rx_dest_set(), hal_udma_i2c_set_event_by_id(), hal_udma_i2c_tx_dest_set(), I2C_CMD_EVENT, I2C_FLAG_CMD_EVENT_I, I2C_FLAG_PRESC_DIV10_EVENT_O, I2C_TRACE, memset(), i2c_itf_data::open_nb, pi_data_malloc, pi_fc_event_handler_set(), pi_freq_get(), pi_time_wait_us(), pi_udma_core_lin_alloc(), i2c_itf_data::read_cmd_buf, restore_irq(), i2c_itf_data::rx_chan_id, i2c_itf_data::rx_timeout_id, SOC_EVENT_UDMA_I2C_LEAD_EVT, i2c_itf_data::tx_chan_id, i2c_itf_data::tx_timeout_id, UDMA_I2C_ID, i2c_itf_data::w_r_cmd_buf, and i2c_itf_data::write_cmd_buf.
|
inlinestatic |
References __i2c_prepare_read_cmd_buffer(), __i2c_prepare_write_cmd_buffer(), __pi_i2c_timeout_abort(), __pi_i2c_timeout_config_set(), __pi_i2c_write_read(), CMD_CHANNEL, pi_task_t::data, hal_udma_i2c_enqueue(), I2C_READ, I2C_WRITE, I2C_WRITE_DUAL, I2C_WRITE_READ, i2c_itf_data::id, i2c_slave_data::is_10_bits, i2c_slave_data::itf_data, i2c_itf_data::read_cmd_buf, i2c_itf_data::rx_chan_id, i2c_itf_data::rx_timeout_id, i2c_slave_data::slave_addr, pi_task_t::timeout, i2c_itf_data::tx_chan_id, i2c_itf_data::tx_timeout_id, and i2c_itf_data::write_cmd_buf.
Referenced by __pi_i2c_handle_error(), and __pi_i2c_timeout_abort().
void __pi_i2c_timeout_abort | ( | void * | arg | ) |
References __i2c_drv_fifo_pop(), __pi_i2c_send_request_from_irq(), CMD_CHANNEL, i2c_itf_data::end_task, hal_udma_i2c_channel_stop(), hal_udma_i2c_clr_event_mask(), i2c_itf_data::id, RX_CHANNEL, TX_CHANNEL, UDMA_I2C_STATUS_REG_IDX_STATUS_I2C_SOFT_RESET_EVENT_O_IDX_BIT, UDMA_I2C_STATUS_REG_IDX_STATUS_LEAD_PURGE_EVENT_O_IDX_BIT, and UDMA_I2C_STATUS_REG_IDX_STATUS_LEAD_UNLOCK_EVENT_O_IDX_BIT.
Referenced by __pi_i2c_ioctl(), __pi_i2c_read(), __pi_i2c_send_request_from_irq(), and __pi_i2c_write().
|
static |
References i2c_itf_data::rx_timeout_id.
Referenced by __pi_i2c_ioctl().
|
static |
References i2c_itf_data::tx_timeout_id.
Referenced by __pi_i2c_ioctl().
struct i2c_itf_data* __global_i2c_itf_data[UDMA_NB_I2C] |