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

Function setLEDFeedbackPin

src/IRFeedbackLED.hpp:54–69  ·  view source on GitHub ↗

* @param aFeedbackLEDPin If FeedbackLEDPin != USE_DEFAULT_FEEDBACK_LED_PIN / 0xFF, then use digitalWrite / digitalWriteFast(FeedbackLEDPin,..) * If FeedbackLEDPin == USE_DEFAULT_FEEDBACK_LED_PIN / 0xFF and LED_BUILTIN defined, then use digitalWriteFast(LED_BUILTIN,..) * If FeedbackLEDPin == USE_DEFAULT_FEEDBACK_LED_PIN / 0xFF and no LED_BUILTIN defin

Source from the content-addressed store, hash-verified

52 * If FeedbackLEDPin == USE_DEFAULT_FEEDBACK_LED_PIN / 0xFF and no LED_BUILTIN defined, disable LED feedback
53 */
54void setLEDFeedbackPin(uint8_t aFeedbackLEDPin) {
55 FeedbackLEDControl.FeedbackLEDPin = aFeedbackLEDPin;
56
57 // use fast macros here
58 if (aFeedbackLEDPin == USE_DEFAULT_FEEDBACK_LED_PIN) {
59#if defined(LED_BUILTIN)
60 pinModeFast(LED_BUILTIN, OUTPUT);
61#endif
62 } else {
63 if (__builtin_constant_p(aFeedbackLEDPin)) {
64 pinModeFast(aFeedbackLEDPin, OUTPUT);
65 } else {
66 pinMode(aFeedbackLEDPin, OUTPUT);
67 }
68 }
69}
70
71/*
72 * Direct replacement for blink13()

Callers 4

beginMethod · 0.85
setBlinkPinFunction · 0.85
IRrecvMethod · 0.85
beginMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected