diff --git a/components/driver/i2c.c b/components/driver/i2c.c index e020cfbbb270..0f55df3cec60 100644 --- a/components/driver/i2c.c +++ b/components/driver/i2c.c @@ -214,7 +214,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) { diff --git a/components/hal/i2c_hal.c b/components/hal/i2c_hal.c index 1003c7ea50d1..7f7b051f3d9a 100644 --- a/components/hal/i2c_hal.c +++ b/components/hal/i2c_hal.c @@ -131,16 +131,6 @@ 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); -} - #if SOC_I2C_SUPPORT_SLAVE void i2c_hal_set_slave_addr(i2c_hal_context_t *hal, uint16_t slave_addr, bool addr_10bit_en) { @@ -152,11 +142,6 @@ 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); @@ -212,8 +197,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); -} diff --git a/components/hal/i2c_hal_iram.c b/components/hal/i2c_hal_iram.c index a4d17740eaf5..303fda4546f5 100644 --- a/components/hal/i2c_hal_iram.c +++ b/components/hal/i2c_hal_iram.c @@ -39,4 +39,24 @@ 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); +} #endif // SOC_I2C_SUPPORT_SLAVE + +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); +}