File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " EspSoftwareSerial" ,
3
- "version" : " 6.17.0 " ,
3
+ "version" : " 6.17.1 " ,
4
4
"description" : " Implementation of the Arduino software serial for ESP8266/ESP32." ,
5
5
"keywords" : [
6
6
" serial" , " io" , " softwareserial"
Original file line number Diff line number Diff line change 1
1
name =EspSoftwareSerial
2
- version =6.17.0
2
+ version =6.17.1
3
3
author =Dirk Kaar, Peter Lerup
4
4
maintainer =Dirk Kaar <dok@dok-net.net>
5
5
sentence =Implementation of the Arduino software serial for ESP8266/ESP32.
Original file line number Diff line number Diff line change @@ -351,16 +351,19 @@ void SoftwareSerial::lazyDelay() {
351
351
{
352
352
optimistic_yield (10000UL );
353
353
}
354
+ // Assure that below-ms part of delays are not elided
355
+ preciseDelay ();
354
356
// Disable interrupts again if applicable
355
357
if (!m_intTxEnabled) { disableInterrupts (); }
356
- preciseDelay ();
357
358
}
358
359
359
360
void IRAM_ATTR SoftwareSerial::preciseDelay () {
360
361
uint32_t ticks;
362
+ uint32_t expired;
361
363
do {
362
364
ticks = microsToTicks (micros ());
363
- } while ((ticks - m_periodStart) < m_periodDuration);
365
+ expired = ticks - m_periodStart;
366
+ } while (static_cast <int32_t >(m_periodDuration - expired) > 0 );
364
367
m_periodDuration = 0 ;
365
368
m_periodStart = ticks;
366
369
}
You can’t perform that action at this time.
0 commit comments