FreeRTOS port on GAP8/RISC-V
|
Macros | |
#define | I2C_SLAVE_ADDR0 |
#define | I2C_SLAVE_ADDR1 |
#define | I2C_ADDR_PUSH_DISABLE |
#define | I2C_ADDR_PUSH_ENABLE |
Functions | |
__attribute__ ((section(".text"))) | |
static void | __pi_i2c_slave_handle_error (int device_id) |
void | __pi_i2c_slave_unlock (struct i2c_slave_itf_data *itf_data, int is_rd) |
int | __pi_i2c_slave_open (struct i2c_slave_itf_data **data, struct pi_i2c_slave_conf *conf) |
void | __pi_i2c_slave_set_rx_channel (struct i2c_slave_itf_data *itf_data, void *l2_addr, uint32_t size) |
void | __pi_i2c_slave_set_tx_channel (struct i2c_slave_itf_data *itf_data, void *l2_addr, uint32_t size) |
void | __pi_i2c_slave_stop_rx (struct i2c_slave_itf_data *itf_data) |
void | __pi_i2c_slave_stop_tx (struct i2c_slave_itf_data *itf_data) |
void | __pi_i2c_slave_close (struct i2c_slave_itf_data *itf_data) |
Variables | |
struct i2c_slave_itf_data * | __global_i2c_slave_itf_data [UDMA_NB_I2C] |
#define I2C_ADDR_PUSH_DISABLE |
#define I2C_ADDR_PUSH_ENABLE |
Referenced by __pi_i2c_slave_open().
#define I2C_SLAVE_ADDR0 |
Internal defines
Referenced by __pi_i2c_slave_open().
#define I2C_SLAVE_ADDR1 |
Referenced by __pi_i2c_slave_open().
__attribute__ | ( | (section(".text")) | ) |
References I2C_TRACE_ERR.
void __pi_i2c_slave_close | ( | struct i2c_slave_itf_data * | itf_data | ) |
References i2c_slave_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_slave_itf_data::id, i2c_slave_itf_data::open_nb, pi_data_free, pi_udma_core_lin_free(), restore_irq(), i2c_slave_itf_data::rx_chan_id, SOC_EVENT_UDMA_CHAN_LIN, SOC_EVENT_UDMA_I2C_SLAVE_EVT, i2c_slave_itf_data::tx_chan_id, and UDMA_I2C_ID.
Referenced by pi_i2c_slave_close().
|
static |
int __pi_i2c_slave_open | ( | struct i2c_slave_itf_data ** | data, |
struct pi_i2c_slave_conf * | conf | ||
) |
References __i2c_prepare_timing(), i2c_slave_itf_data::addr, i2c_slave_itf_data::cmd_chan_id, CMD_CHANNEL, CMD_FOLL_ADDR, disable_irq(), 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_set_event_by_id(), hal_udma_i2c_slave_rx_dest_set(), hal_udma_i2c_slave_tx_dest_set(), I2C_ADDR_PUSH_ENABLE, I2C_CMD_EVENT, I2C_FLAG_CMD_EVENT_I, I2C_FLAG_PRESC_DIV10_EVENT_O, I2C_SLAVE_ADDR0, I2C_SLAVE_ADDR1, I2C_TRACE, memset(), i2c_slave_itf_data::open_nb, pi_data_malloc, pi_fc_event_handler_set(), pi_freq_get(), pi_time_wait_us(), pi_udma_core_lin_alloc(), restore_irq(), i2c_slave_itf_data::rx_callback, i2c_slave_itf_data::rx_chan_id, SOC_EVENT_UDMA_I2C_SLAVE_EVT, i2c_slave_itf_data::tx_callback, i2c_slave_itf_data::tx_chan_id, and UDMA_I2C_ID.
Referenced by pi_i2c_slave_open().
void __pi_i2c_slave_set_rx_channel | ( | struct i2c_slave_itf_data * | itf_data, |
void * | l2_addr, | ||
uint32_t | size | ||
) |
References disable_irq(), hal_udma_i2c_slave_enqueue(), i2c_slave_itf_data::id, restore_irq(), i2c_slave_itf_data::rx_buffer, i2c_slave_itf_data::rx_buffer_size, and RX_CHANNEL.
Referenced by pi_i2c_slave_set_rx(), and pi_i2c_slave_set_rx_channel().
void __pi_i2c_slave_set_tx_channel | ( | struct i2c_slave_itf_data * | itf_data, |
void * | l2_addr, | ||
uint32_t | size | ||
) |
References disable_irq(), hal_udma_i2c_slave_enqueue(), i2c_slave_itf_data::id, restore_irq(), i2c_slave_itf_data::tx_buffer, i2c_slave_itf_data::tx_buffer_size, and TX_CHANNEL.
Referenced by pi_i2c_slave_set_tx(), and pi_i2c_slave_set_tx_channel().
void __pi_i2c_slave_stop_rx | ( | struct i2c_slave_itf_data * | itf_data | ) |
References disable_irq(), hal_udma_i2c_slave_channel_stop(), i2c_slave_itf_data::id, restore_irq(), and RX_CHANNEL.
Referenced by pi_i2c_slave_stop_rx().
void __pi_i2c_slave_stop_tx | ( | struct i2c_slave_itf_data * | itf_data | ) |
References disable_irq(), hal_udma_i2c_slave_channel_stop(), i2c_slave_itf_data::id, restore_irq(), and TX_CHANNEL.
Referenced by pi_i2c_slave_stop_tx().
void __pi_i2c_slave_unlock | ( | struct i2c_slave_itf_data * | itf_data, |
int | is_rd | ||
) |
struct i2c_slave_itf_data* __global_i2c_slave_itf_data[UDMA_NB_I2C] |