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

Commit 38ff552

Browse files
committed
Wire: add sensible defaults to setWireTimeout
1 parent deea929 commit 38ff552

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎libraries/Wire/src/Wire.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ void TwoWire::setClock(uint32_t clock)
9494
* @param reset_with_timeout if true then TWI interface will be automatically reset on timeout
9595
* if false then TWI interface will not be reset on timeout
9696
*/
97-
void TwoWire::setWireTimeoutUs(uint32_t timeout, bool reset_with_timeout){
97+
void TwoWire::setWireTimeout(uint32_t timeout, bool reset_with_timeout){
9898
twi_setTimeoutInMicros(timeout, reset_with_timeout);
9999
}
100100

‎libraries/Wire/src/Wire.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class TwoWire : public Stream
5555
void begin(int);
5656
void end();
5757
void setClock(uint32_t);
58-
void setWireTimeoutUs(uint32_t, bool);
58+
void setWireTimeout(uint32_t timeout = 25000, bool reset_with_timeout = false);
5959
bool getWireTimeoutFlag(void);
6060
void clearWireTimeoutFlag(void);
6161
void beginTransmission(uint8_t);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /