feat(idf): Add support for IDF v5.4 (#10823)
This commit is contained in:
parent
dbfde15b6a
commit
47343a43f7
3 changed files with 10 additions and 2 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
# idf.py build
|
# idf.py build
|
||||||
|
|
||||||
set(min_supported_idf_version "5.3.0")
|
set(min_supported_idf_version "5.3.0")
|
||||||
set(max_supported_idf_version "5.3.99")
|
set(max_supported_idf_version "5.4.99")
|
||||||
set(idf_version "${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}.${IDF_VERSION_PATCH}")
|
set(idf_version "${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}.${IDF_VERSION_PATCH}")
|
||||||
|
|
||||||
if ("${idf_version}" AND NOT "$ENV{ARDUINO_SKIP_IDF_VERSION_CHECK}")
|
if ("${idf_version}" AND NOT "$ENV{ARDUINO_SKIP_IDF_VERSION_CHECK}")
|
||||||
|
|
|
||||||
|
|
@ -336,7 +336,11 @@ esp_err_t i2cSlaveInit(uint8_t num, int sda, int scl, uint16_t slaveID, uint32_t
|
||||||
#endif // !defined(CONFIG_IDF_TARGET_ESP32P4)
|
#endif // !defined(CONFIG_IDF_TARGET_ESP32P4)
|
||||||
|
|
||||||
i2c_ll_slave_init(i2c->dev);
|
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);
|
i2c_ll_slave_set_fifo_mode(i2c->dev, true);
|
||||||
|
#endif
|
||||||
i2c_ll_set_slave_addr(i2c->dev, slaveID, false);
|
i2c_ll_set_slave_addr(i2c->dev, slaveID, false);
|
||||||
i2c_ll_set_tout(i2c->dev, I2C_LL_MAX_TIMEOUT);
|
i2c_ll_set_tout(i2c->dev, I2C_LL_MAX_TIMEOUT);
|
||||||
i2c_slave_set_frequency(i2c, frequency);
|
i2c_slave_set_frequency(i2c, frequency);
|
||||||
|
|
@ -357,7 +361,11 @@ esp_err_t i2cSlaveInit(uint8_t num, int sda, int scl, uint16_t slaveID, uint32_t
|
||||||
|
|
||||||
i2c_ll_disable_intr_mask(i2c->dev, I2C_LL_INTR_MASK);
|
i2c_ll_disable_intr_mask(i2c->dev, I2C_LL_INTR_MASK);
|
||||||
i2c_ll_clear_intr_mask(i2c->dev, I2C_LL_INTR_MASK);
|
i2c_ll_clear_intr_mask(i2c->dev, I2C_LL_INTR_MASK);
|
||||||
|
#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);
|
i2c_ll_slave_set_fifo_mode(i2c->dev, true);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!i2c->intr_handle) {
|
if (!i2c->intr_handle) {
|
||||||
uint32_t flags = ESP_INTR_FLAG_LOWMED | ESP_INTR_FLAG_SHARED;
|
uint32_t flags = ESP_INTR_FLAG_LOWMED | ESP_INTR_FLAG_SHARED;
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ files:
|
||||||
- "platform.txt"
|
- "platform.txt"
|
||||||
- "programmers.txt"
|
- "programmers.txt"
|
||||||
dependencies:
|
dependencies:
|
||||||
idf: ">=5.3,<5.4"
|
idf: ">=5.3,<5.5"
|
||||||
# mdns 1.2.1 is necessary to build H2 with no WiFi
|
# mdns 1.2.1 is necessary to build H2 with no WiFi
|
||||||
espressif/mdns:
|
espressif/mdns:
|
||||||
version: "^1.2.3"
|
version: "^1.2.3"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue