Skip to content

Commit 0801e1f

Browse files
authored
api changed
1 parent 42ae242 commit 0801e1f

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

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

+1-9
Original file line numberDiff line numberDiff line change
@@ -337,12 +337,8 @@ esp_err_t i2cSlaveInit(uint8_t num, int sda, int scl, uint16_t slaveID, uint32_t
337337
}
338338
#endif // !defined(CONFIG_IDF_TARGET_ESP32P4)
339339

340-
i2c_ll_slave_init(i2c->dev);
341-
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
340+
i2c_ll_enable_arbitration(i2c->dev, true);
342341
i2c_ll_enable_fifo_mode(i2c->dev, true);
343-
#else
344-
i2c_ll_slave_set_fifo_mode(i2c->dev, true);
345-
#endif
346342
i2c_ll_set_slave_addr(i2c->dev, slaveID, false);
347343
i2c_ll_set_tout(i2c->dev, I2C_LL_MAX_TIMEOUT);
348344
i2c_slave_set_frequency(i2c, frequency);
@@ -363,11 +359,7 @@ esp_err_t i2cSlaveInit(uint8_t num, int sda, int scl, uint16_t slaveID, uint32_t
363359

364360
i2c_ll_disable_intr_mask(i2c->dev, I2C_LL_INTR_MASK);
365361
i2c_ll_clear_intr_mask(i2c->dev, I2C_LL_INTR_MASK);
366-
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
367362
i2c_ll_enable_fifo_mode(i2c->dev, true);
368-
#else
369-
i2c_ll_slave_set_fifo_mode(i2c->dev, true);
370-
#endif
371363

372364
if (!i2c->intr_handle) {
373365
uint32_t flags = ESP_INTR_FLAG_LOWMED | ESP_INTR_FLAG_SHARED;

0 commit comments

Comments
 (0)