Skip to content

IDF master #11204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Apr 23, 2025
Prev Previous commit
Next Next commit
i2c_ll_enable_arbitration(i2c->dev, true) (#11271)
  • Loading branch information
Jason2866 authored Apr 22, 2025
commit 977ab1de0a677669a4f847806ae03dc5b55a252c
5 changes: 5 additions & 0 deletions cores/esp32/esp32-hal-i2c-slave.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,16 @@ esp_err_t i2cSlaveInit(uint8_t num, int sda, int scl, uint16_t slaveID, uint32_t
}
#endif // !defined(CONFIG_IDF_TARGET_ESP32P4)

#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 5, 0)
i2c_ll_enable_arbitration(i2c->dev, true);
i2c_ll_enable_fifo_mode(i2c->dev, true);
#else
i2c_ll_slave_init(i2c->dev);
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
i2c_ll_enable_fifo_mode(i2c->dev, true);
#else
i2c_ll_slave_set_fifo_mode(i2c->dev, true);
#endif
#endif
i2c_ll_set_slave_addr(i2c->dev, slaveID, false);
i2c_ll_set_tout(i2c->dev, I2C_LL_MAX_TIMEOUT);
Expand Down
Loading