1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-10 14:42:08 +03:00

Explain function of special PolledTimeout to the code reader

This commit is contained in:
Dirk O. Kaar 2020-02-23 10:25:13 +01:00
parent f382fc9d77
commit 95b06cee0b

View File

@ -431,6 +431,7 @@ int8_t ESP8266WiFiSTAClass::waitForConnectResult(unsigned long timeoutLength) {
if((wifi_get_opmode() & 1) == 0) {
return WL_DISCONNECTED;
}
// if probing doesn't trip, this yields
using oneShotYieldMs = esp8266::polledTimeout::timeoutTemplate<false, esp8266::polledTimeout::YieldPolicy::YieldOrSkip>;
oneShotYieldMs timeout(timeoutLength); // number of milliseconds to wait before returning timeout error
while(!timeout) {