Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitb6ee1c6

Browse files
dordnungfpistm
authored andcommitted
fix(Wire): only recover bus when device is master
1 parent1e7007c commitb6ee1c6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎libraries/Wire/src/Wire.cpp‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ void TwoWire::begin(uint8_t address, bool generalCall, bool NoStretchMode)
9090

9191
_i2c.NoStretchMode = (NoStretchMode ==true) ?1 :0;
9292

93-
recoverBus();// in case I2C bus (device) is stuck after a reset for example
93+
if (_i2c.isMaster ==1) {
94+
recoverBus();// in case I2C bus (device) is stuck after a reset for example
95+
}
9496

9597
i2c_init(&_i2c,100000, ownAddress);
9698

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp