Skip to content

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

Diff for: libraries/Wire/src/Wire.cpp

+1-1
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

Diff for: libraries/Wire/src/Wire.h

+1-1
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)