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

Method begin

src/IRReceive.hpp:314–329  ·  view source on GitHub ↗

* Initializes the receive and feedback pin * @param aReceivePin The Arduino pin number, where a demodulating IR receiver is connected. * @param aEnableLEDFeedback if true / ENABLE_LED_FEEDBACK, then let the feedback led blink on receiving IR signal * @param aFeedbackLEDPin if 0xFF, then take board specific LED_BUILTIN pin if it is defined as macro */

Source from the content-addressed store, hash-verified

312 * @param aFeedbackLEDPin if 0xFF, then take board specific LED_BUILTIN pin if it is defined as macro
313 */
314void IRrecv::begin(uint_fast8_t aReceivePin, bool aEnableLEDFeedback, uint_fast8_t aFeedbackLEDPin) {
315
316 setReceivePin(aReceivePin);
317#if defined(LED_RECEIVE_FEEDBACK_CODE)
318 setLEDFeedback(aEnableLEDFeedback);
319 setLEDFeedbackPin(aFeedbackLEDPin);
320#else
321 (void) aEnableLEDFeedback;
322 (void) aFeedbackLEDPin;
323#endif
324
325#if defined(_IR_MEASURE_TIMING) && defined(_IR_TIMING_TEST_PIN)
326 pinModeFast(_IR_TIMING_TEST_PIN, OUTPUT);
327#endif
328 start();
329}
330
331/**
332 * Sets / changes the receiver pin number

Callers

nothing calls this directly

Calls 2

setLEDFeedbackFunction · 0.85
setLEDFeedbackPinFunction · 0.85

Tested by

no test coverage detected