Skip to content

Commit 8a517b6

Browse files
bigdinotechcalvinatintel
authored andcommitted
CurieSoftwareSerial timing issue fixes
-fix some timing issues with slower baud rates
1 parent aaa453d commit 8a517b6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

libraries/CurieSoftwareSerial/src/SoftwareSerial.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ void SoftwareSerial::recv()
187187
}
188188

189189
// wait until we see a stop bit/s or timeout;
190-
uint8_t loopTimeout = 8;
190+
uint8_t loopTimeout = 32;
191191
if(invertedLogic)
192192
{
193193
while(digitalRead(_rxPin) && (loopTimeout >0))
@@ -306,6 +306,10 @@ void SoftwareSerial::begin(long speed)
306306
_rx_delay_init_intrabit = 0;
307307
_rx_delay_init_centering = 0;
308308
}
309+
else
310+
{
311+
_rx_delay_init_intrabit = _rx_delay_first_intrabit;
312+
}
309313

310314
#if _DEBUG
311315
pinMode(_DEBUG_PIN1, OUTPUT);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy