Unverified Commit ff9f228e authored by Earle F. Philhower, III's avatar Earle F. Philhower, III Committed by GitHub

FreeRTOS compilation fix when no LED present (#1413)

Fixes #1412
parent f33dfd23
......@@ -2,6 +2,8 @@
# https://arduino.github.io/arduino-cli/library-specification/#keywords
# Formatted by a single true tab (not spaces)
FreeRTOS KEYWORD1
# Datatypes (KEYWORD1)
StackType_t KEYWORD1
BaseType_t KEYWORD1
......
......@@ -216,16 +216,20 @@ void vApplicationTickHook(void) {
Private function to enable board led to use it in application hooks
*/
void prvSetMainLedOn(void) {
#ifdef LED_BUILTIN
gpio_init(LED_BUILTIN);
gpio_set_dir(LED_BUILTIN, true);
gpio_put(LED_BUILTIN, true);
#endif
}
/**
Private function to blink board led to use it in application hooks
*/
void prvBlinkMainLed(void) {
#ifdef LED_BUILTIN
gpio_put(LED_BUILTIN, !gpio_get(LED_BUILTIN));
#endif
}
#endif
......
......@@ -6,7 +6,9 @@
#define NUM_ANALOG_OUTPUTS (0u)
#define ADC_RESOLUTION (12u)
#ifdef PIN_LED
#define LED_BUILTIN PIN_LED
#endif
static const uint8_t D0 = (0u);
static const uint8_t D1 = (1u);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment