mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-11 15:22:13 +03:00
Pass timeout to optimistic_yield, add cont_can_yield check
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
/*
|
||||
/*
|
||||
HardwareSerial.cpp - esp8266 UART support
|
||||
|
||||
Copyright (c) 2014 Ivan Grokhotkov. All rights reserved.
|
||||
This file is part of the esp8266 core for Arduino environment.
|
||||
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
@ -559,7 +559,7 @@ int HardwareSerial::available(void) {
|
||||
}
|
||||
|
||||
if (!result) {
|
||||
optimistic_yield();
|
||||
optimistic_yield(USD(_uart->uart_nr) / 128);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
Reference in New Issue
Block a user