1
0
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:
Ivan Grokhotkov
2015-07-20 15:48:25 +03:00
parent 01361fc4c8
commit e5d2ba5db8
11 changed files with 193 additions and 177 deletions

View File

@ -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;