Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7eff707

Browse filesBrowse files
stickbreakerme-no-dev
authored andcommitted
Fix Early return when Address NAK is received (espressif#750)
The i2cWrite() function was returning to the app before the i2c transaction had completed. This caused the next Wire() call to return a I2C_ERROR_BUSY.
1 parent 81f225a commit 7eff707
Copy full SHA for 7eff707

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎cores/esp32/esp32-hal-i2c.c

Copy file name to clipboardExpand all lines: cores/esp32/esp32-hal-i2c.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ i2c_err_t i2cWrite(i2c_t * i2c, uint16_t address, bool addr_10bit, uint8_t * dat
229229
//Transmission did not finish and ACK_ERR is set
230230
if(i2c->dev->int_raw.ack_err) {
231231
log_w("Ack Error! Addr: %x", address >> 1);
232-
while((i2c->dev->status_reg.bus_busy) && ((millis() - startAt)>50));
232+
while((i2c->dev->status_reg.bus_busy) && ((millis() - startAt)<50));
233233
I2C_MUTEX_UNLOCK();
234234
return I2C_ERROR_ACK;
235235
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.