aboutsummaryrefslogtreecommitdiff
path: root/libraries/Bridge/Bridge.h
diff options
context:
space:
mode:
authorCristian Maglie <c.maglie@bug.st>2013-07-10 20:24:16 +0200
committerCristian Maglie <c.maglie@bug.st>2013-07-10 20:24:16 +0200
commitdec517181e596da42420807a50d61f4208cf4c49 (patch)
treeb700981dca9edcf17f980117c628005205bd1276 /libraries/Bridge/Bridge.h
parent3c39763ced9b42222ce54e35dee04ae4a9a0afe4 (diff)
Bridge: even more reliable startup
Diffstat (limited to 'libraries/Bridge/Bridge.h')
-rw-r--r--libraries/Bridge/Bridge.h4
1 files changed, 4 insertions, 0 deletions
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