mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
i2c: Correct hal functions iram placement and remove IRAM_ATTR for i2c_hw_fsm_reset
Closes https://github.com/espressif/esp-idf/issues/8422 Closes https://github.com/espressif/esp-idf/issues/7249 (cherry picked from commit 1ceb7c8cd6f2b5a2c6513eaf51658d51ae5e9088)
This commit is contained in:
parent
6c27359d13
commit
a7935539b5
@ -200,7 +200,7 @@ static i2c_clk_alloc_t i2c_clk_alloc[I2C_SCLK_MAX] = {
|
||||
static i2c_obj_t *p_i2c_obj[I2C_NUM_MAX] = {0};
|
||||
static void i2c_isr_handler_default(void *arg);
|
||||
static void IRAM_ATTR i2c_master_cmd_begin_static(i2c_port_t i2c_num);
|
||||
static esp_err_t IRAM_ATTR i2c_hw_fsm_reset(i2c_port_t i2c_num);
|
||||
static esp_err_t i2c_hw_fsm_reset(i2c_port_t i2c_num);
|
||||
|
||||
static void i2c_hw_disable(i2c_port_t i2c_num)
|
||||
{
|
||||
|
@ -144,26 +144,11 @@ bool i2c_hal_is_master_mode(i2c_hal_context_t *hal)
|
||||
return i2c_ll_is_master_mode(hal->dev);
|
||||
}
|
||||
|
||||
void i2c_hal_get_rxfifo_cnt(i2c_hal_context_t *hal, uint32_t *len)
|
||||
{
|
||||
*len = i2c_ll_get_rxfifo_cnt(hal->dev);
|
||||
}
|
||||
|
||||
void i2c_hal_get_txfifo_cnt(i2c_hal_context_t *hal, uint32_t *len)
|
||||
{
|
||||
*len = i2c_ll_get_txfifo_len(hal->dev);
|
||||
}
|
||||
|
||||
void i2c_hal_enable_slave_tx_it(i2c_hal_context_t *hal)
|
||||
{
|
||||
i2c_ll_slave_enable_tx_it(hal->dev);
|
||||
}
|
||||
|
||||
void i2c_hal_disable_slave_tx_it(i2c_hal_context_t *hal)
|
||||
{
|
||||
i2c_ll_slave_disable_tx_it(hal->dev);
|
||||
}
|
||||
|
||||
void i2c_hal_enable_slave_rx_it(i2c_hal_context_t *hal)
|
||||
{
|
||||
i2c_ll_slave_enable_rx_it(hal->dev);
|
||||
@ -218,8 +203,3 @@ void i2c_hal_master_init(i2c_hal_context_t *hal, int i2c_num)
|
||||
i2c_ll_txfifo_rst(hal->dev);
|
||||
i2c_ll_rxfifo_rst(hal->dev);
|
||||
}
|
||||
|
||||
void i2c_hal_update_config(i2c_hal_context_t *hal)
|
||||
{
|
||||
i2c_ll_update(hal->dev);
|
||||
}
|
||||
|
@ -42,3 +42,23 @@ void i2c_hal_slave_handle_event(i2c_hal_context_t *hal, i2c_intr_event_t *event)
|
||||
{
|
||||
i2c_ll_slave_get_event(hal->dev, event);
|
||||
}
|
||||
|
||||
void i2c_hal_disable_slave_tx_it(i2c_hal_context_t *hal)
|
||||
{
|
||||
i2c_ll_slave_disable_tx_it(hal->dev);
|
||||
}
|
||||
|
||||
void i2c_hal_update_config(i2c_hal_context_t *hal)
|
||||
{
|
||||
i2c_ll_update(hal->dev);
|
||||
}
|
||||
|
||||
void i2c_hal_get_rxfifo_cnt(i2c_hal_context_t *hal, uint32_t *len)
|
||||
{
|
||||
*len = i2c_ll_get_rxfifo_cnt(hal->dev);
|
||||
}
|
||||
|
||||
void i2c_hal_get_txfifo_cnt(i2c_hal_context_t *hal, uint32_t *len)
|
||||
{
|
||||
*len = i2c_ll_get_txfifo_len(hal->dev);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user