* 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. */
| 380 | * and enables the receive sample timer interrupt which consumes a small amount of CPU every 50 us. |
| 381 | */ |
| 382 | void 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()! |
no test coverage detected