Skip to content

Commit ae442ce

Browse files
authored
i2c_ll_enable_arbitration(i2c->dev, true)
1 parent a8bead7 commit ae442ce

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: cores/esp32/esp32-hal-i2c-slave.c

+5
Original file line numberDiff line numberDiff line change
@@ -335,11 +335,16 @@ esp_err_t i2cSlaveInit(uint8_t num, int sda, int scl, uint16_t slaveID, uint32_t
335335
}
336336
#endif // !defined(CONFIG_IDF_TARGET_ESP32P4)
337337

338+
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 5, 0)
339+
i2c_ll_enable_arbitration(i2c->dev, true);
340+
i2c_ll_enable_fifo_mode(i2c->dev, true);
341+
#else
338342
i2c_ll_slave_init(i2c->dev);
339343
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
340344
i2c_ll_enable_fifo_mode(i2c->dev, true);
341345
#else
342346
i2c_ll_slave_set_fifo_mode(i2c->dev, true);
347+
#endif
343348
#endif
344349
i2c_ll_set_slave_addr(i2c->dev, slaveID, false);
345350
i2c_ll_set_tout(i2c->dev, I2C_LL_MAX_TIMEOUT);

0 commit comments

Comments
 (0)