From dec517181e596da42420807a50d61f4208cf4c49 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Wed, 10 Jul 2013 20:24:16 +0200 Subject: Bridge: even more reliable startup --- libraries/Bridge/Bridge.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libraries/Bridge/Bridge.h') diff --git a/libraries/Bridge/Bridge.h b/libraries/Bridge/Bridge.h index cfbbfa4..e4ed9f8 100644 --- a/libraries/Bridge/Bridge.h +++ b/libraries/Bridge/Bridge.h @@ -50,6 +50,9 @@ public: const uint8_t *buff2, uint16_t len2, uint8_t *rxbuff, uint16_t rxlen) { return transfer(buff1, len1, buff2, len2, NULL, 0, rxbuff, rxlen); } + + static const int TRANSFER_TIMEOUT = 0xFFFF; + private: uint8_t index; int timedRead(unsigned int timeout); @@ -66,6 +69,7 @@ private: static const char CTRL_C = 3; Stream &stream; bool started; + uint8_t max_retries; }; // This subclass uses a serial port Stream -- cgit v1.2.3-18-g5258