8000 Change to retry setting up I2C command rather than waiting without ma… · michifez/arduino-esp32@6fcc353 · GitHub
[go: up one dir, main page]

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 6fcc353

Browse files
committed
Change to retry setting up I2C command rather than waiting without making a reattempt.
1 parent adff071 commit 6fcc353

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cores/esp32/esp32-hal-i2c.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,8 @@ void i2cInitFix(i2c_t * i2c){
445445
i2c->dev->fifo_data.data = 0;
446446
i2cSetCmd(i2c, 1, I2C_CMD_WRITE, 1, false, false, false);
447447
i2cSetCmd(i2c, 2, I2C_CMD_STOP, 0, false, false, false);
448-
i2c->dev->ctr.trans_start = 1;
449-
while(!i2c->dev->command[2].done);
448+
do {
449+
i2c->dev->ctr.trans_start = 1;
450+
} while(!i2c->dev->command[2].done);
450451
I2C_MUTEX_UNLOCK();
451452
}

0 commit comments

Comments
 (0)
0