Lines Matching full:sda
34 #define I2C_CLR_BUS_SCL_NUM 9 /* Number of SCL clocks to restore SDA signal */
35 #define I2C_CLR_BUS_HALF_PERIOD_US 5 /* Period of SCL clock to restore SDA signal */
81 const struct i2c_esp32_pin sda; member
159 gpio_pin_set_dt(&config->sda.gpio, 1); in i2c_esp32_config_pin()
160 ret = gpio_pin_configure_dt(&config->sda.gpio, GPIO_PULL_UP | GPIO_OUTPUT | GPIO_INPUT); in i2c_esp32_config_pin()
161 esp_rom_gpio_matrix_out(config->sda.gpio.pin, config->sda.sig_out, 0, 0); in i2c_esp32_config_pin()
162 esp_rom_gpio_matrix_in(config->sda.gpio.pin, config->sda.sig_in, 0); in i2c_esp32_config_pin()
173 /* Some slave device will die by accident and keep the SDA in low level,
175 * Slave mode of ESP32 might also get in wrong state that held the SDA low,
188 gpio_pin_configure_dt(&config->sda.gpio, GPIO_OUTPUT | GPIO_INPUT); in i2c_master_clear_bus()
190 /* the SLAVE device is controlling SDA. If the slave is sending a stream of ZERO bytes, */ in i2c_master_clear_bus()
191 /* it will only release SDA during the ACK bit period. So, this reset code needs */ in i2c_master_clear_bus()
194 gpio_pin_set_dt(&config->sda.gpio, 1); in i2c_master_clear_bus()
196 while (!gpio_pin_get_dt(&config->sda.gpio) && (i++ < I2C_CLR_BUS_SCL_NUM)) { in i2c_master_clear_bus()
202 gpio_pin_set_dt(&config->sda.gpio, 0); /* setup for STOP */ in i2c_master_clear_bus()
205 gpio_pin_set_dt(&config->sda.gpio, 1); /* STOP, SDA low -> high while SCL is HIGH */ in i2c_master_clear_bus()
384 /* If the I2C slave is powered off or the SDA/SCL is */ in i2c_esp32_transmit()
746 if (!gpio_is_ready_dt(&config->sda.gpio)) { in i2c_esp32_init()
747 LOG_ERR("SDA GPIO device is not ready"); in i2c_esp32_init()
793 .sda = { \
849 #error "Missing <sda-gpios> and <scl-gpios> properties to build for this target."
853 #error "Properties <sda-gpios> and <scl-gpios> are not required for this target."
862 #error "Missing <sda-gpios> and <scl-gpios> properties to build for this target."
866 #error "Properties <sda-gpios> and <scl-gpios> are not required for this target."