aboutsummaryrefslogtreecommitdiff
path: root/libraries/Wire/src/Wire.h
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/Wire/src/Wire.h')
-rw-r--r--libraries/Wire/src/Wire.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/libraries/Wire/src/Wire.h b/libraries/Wire/src/Wire.h
index 702f37d..e70d72e 100644
--- a/libraries/Wire/src/Wire.h
+++ b/libraries/Wire/src/Wire.h
@@ -17,6 +17,7 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Modified 2012 by Todd Krein (todd@krein.org) to implement repeated starts
+ Modified 2020 by Greyson Christoforo (grey@christoforo.net) to implement timeouts
*/
#ifndef TwoWire_h
@@ -54,13 +55,16 @@ class TwoWire : public Stream
void begin(int);
void end();
void setClock(uint32_t);
+ void setWireTimeout(uint32_t timeout = 25000, bool reset_with_timeout = false);
+ bool getWireTimeoutFlag(void);
+ void clearWireTimeoutFlag(void);
void beginTransmission(uint8_t);
void beginTransmission(int);
uint8_t endTransmission(void);
uint8_t endTransmission(uint8_t);
uint8_t requestFrom(uint8_t, uint8_t);
uint8_t requestFrom(uint8_t, uint8_t, uint8_t);
- uint8_t requestFrom(uint8_t, uint8_t, uint32_t, uint8_t, uint8_t);
+ uint8_t requestFrom(uint8_t, uint8_t, uint32_t, uint8_t, uint8_t);
uint8_t requestFrom(int, int);
uint8_t requestFrom(int, int, int);
virtual size_t write(uint8_t);