From cd8688a55e62094cb6605ee8594985f862d57a95 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Tue, 8 Mar 2022 11:35:11 +0100 Subject: [PATCH 16/17] driver/i2c.h: expose i2c_hw_fsm_reset to RIOT code --- components/driver/i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/driver/i2c.c b/components/driver/i2c.c index be26fdeffc3..cff410b9d1b 100644 --- a/components/driver/i2c.c +++ b/components/driver/i2c.c @@ -209,7 +209,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); +esp_err_t IRAM_ATTR i2c_hw_fsm_reset(i2c_port_t i2c_num); static void i2c_hw_disable(i2c_port_t i2c_num) { @@ -595,7 +595,7 @@ static esp_err_t i2c_master_clear_bus(i2c_port_t i2c_num) * If we remove the power supply for the slave during I2C is reading, or directly connect SDA or SCL to ground, * this would cause the I2C FSM get stuck in wrong state, all we can do is to reset the I2C hardware in this case. **/ -static esp_err_t i2c_hw_fsm_reset(i2c_port_t i2c_num) +esp_err_t i2c_hw_fsm_reset(i2c_port_t i2c_num) { #if !SOC_I2C_SUPPORT_HW_FSM_RST int scl_low_period, scl_high_period; -- 2.17.1