FreeRTOS port on GAP8/RISC-V
|
Data Structures | |
struct | i2c_slave_itf_data |
Macros | |
#define | I2C_DRIVER_DATA_IMPLEM_SPECIFC |
#define | i2c_req_t |
UART request structure. More... | |
Typedefs | |
typedef uint32_t | i2c_cmd_t |
Functions | |
int | __pi_i2c_slave_open (struct i2c_slave_itf_data **data, struct pi_i2c_slave_conf *conf) |
void | __pi_i2c_slave_close (struct i2c_slave_itf_data *slave_data) |
void | __pi_i2c_slave_unlock (struct i2c_slave_itf_data *itf_data, int is_rd) |
void | __pi_i2c_slave_set_tx_channel (struct i2c_slave_itf_data *itf_data, void *l2_addr, uint32_t size) |
void | __pi_i2c_slave_set_rx_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) |
static uint32_t | __i2c_slave_prepare_timing (uint32_t max_baudrate, uint32_t periph_clock) |
#define I2C_DRIVER_DATA_IMPLEM_SPECIFC |
#define i2c_req_t |
typedef uint32_t i2c_cmd_t |
|
inlinestatic |
References I2C_CMD_TIMING, PI_I2C_FAST_MODE, and PI_I2C_STD_MODE.
void __pi_i2c_slave_close | ( | struct i2c_slave_itf_data * | slave_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().
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 | ||
) |