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

Method start

src/IRReceive.hpp:382–395  ·  view source on GitHub ↗

* Start the receiving process. * This configures the timer and the state machine for IR reception * and enables the receive sample timer interrupt which consumes a small amount of CPU every 50 us. */

Source from the content-addressed store, hash-verified

380 * and enables the receive sample timer interrupt which consumes a small amount of CPU every 50 us.
381 */
382void IRrecv::start() {
383
384 // Setup for cyclic 50 us interrupt
385 timerConfigForReceive(); // no interrupts enabled here!
386
387 // Initialize state machine state
388 resume();
389
390 // Timer interrupt is enabled after state machine reset
391 timerEnableReceiveInterrupt(); // Enables the receive sample timer interrupt which consumes a small amount of CPU every 50 us.
392#ifdef _IR_MEASURE_TIMING
393 pinModeFast(_IR_TIMING_TEST_PIN, OUTPUT);
394#endif
395}
396
397/*
398 * Restarts timer interrupts, adjusts TickCounterForISR for correct gap value after stopTimer(). Does not call resume()!

Callers 1

Calls 2

timerConfigForReceiveFunction · 0.85

Tested by

no test coverage detected