From 26c93e875514fbca1eb2b2e712216ccf8fce392a Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Tue, 27 Sep 2016 23:13:06 +0200 Subject: [PATCH] Ensure GPIO are on when using status led. --- extdrv/status_led.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extdrv/status_led.c b/extdrv/status_led.c index c76b05f..8965aee 100644 --- a/extdrv/status_led.c +++ b/extdrv/status_led.c @@ -54,6 +54,10 @@ struct pio green_led = LPC_GPIO_1_4; void status_led_config(const struct pio* green, const struct pio* red) { uint32_t mode = LPC_IO_MODE_PULL_UP | LPC_IO_DRIVE_HIGHCURENT; + + /* We must have GPIO on for status led. Calling it many times in only a waste + * of time, no other side effects */ + gpio_on(); /* Copy status led info */ pio_copy(&red_led, red); pio_copy(&green_led, green); -- 2.43.0