* @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
| 52 | * If FeedbackLEDPin == USE_DEFAULT_FEEDBACK_LED_PIN / 0xFF and no LED_BUILTIN defined, disable LED feedback |
| 53 | */ |
| 54 | void 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() |
no outgoing calls
no test coverage detected