Skip to content

Commit 99520f6

Browse files
authored
Fix fail to set single byte that contains the slave address (#6840)
Checking here really does not work when called from within `onRequest`
1 parent 33011ed commit 99520f6

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

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

-12
Original file line numberDiff line numberDiff line change
@@ -390,18 +390,6 @@ size_t i2cSlaveWrite(uint8_t num, const uint8_t *buf, uint32_t len, uint32_t tim
390390
}
391391
I2C_SLAVE_MUTEX_LOCK();
392392
#if CONFIG_IDF_TARGET_ESP32
393-
//make sure that tx is idle
394-
uint64_t tout_at = esp_timer_get_time() + (timeout_ms * 1000);
395-
while(i2c_ll_slave_addressed(i2c->dev) && i2c_ll_slave_rw(i2c->dev)) {
396-
// ongoing MASTER READ
397-
//wait up to timeout_ms for current transaction to finish
398-
vTaskDelay(2);
399-
if((uint64_t)esp_timer_get_time() >= tout_at){
400-
log_e("TX IDLE WAIT TIMEOUT!");
401-
I2C_SLAVE_MUTEX_UNLOCK();
402-
return 0;
403-
}
404-
}
405393
i2c_ll_slave_disable_tx_it(i2c->dev);
406394
if (i2c_ll_get_txfifo_len(i2c->dev) < SOC_I2C_FIFO_LEN) {
407395
i2c_ll_txfifo_rst(i2c->dev);

0 commit comments

Comments
 (0)