MCPcopy Create free account
hub / github.com/Arduino-IRremote/Arduino-IRremote / delayAndCheckForStop

Method delayAndCheckForStop

src/IRCommandDispatcher.hpp:469–477  ·  view source on GitHub ↗

* Special delay function for the IRCommandDispatcher. Returns prematurely if requestToStopReceived is set. * To be used in blocking functions as delay * @return true - as soon as stop received */

Source from the content-addressed store, hash-verified

467 * @return true - as soon as stop received
468 */
469bool IRCommandDispatcher::delayAndCheckForStop(uint16_t aDelayMillis) {
470 uint32_t tStartMillis = millis();
471 do {
472 if (requestToStopReceived) {
473 return true;
474 }
475 } while (millis() - tStartMillis < aDelayMillis);
476 return false;
477}
478
479void IRCommandDispatcher::printIRCommandStringForArrayIndex(Print *aSerial, uint_fast8_t aMappingArrayIndex) {
480#if defined(__AVR__)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected