From: Nathael Pajani Date: Tue, 27 Sep 2016 21:13:06 +0000 (+0200) Subject: Ensure GPIO are on when using status led. X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=26c93e875514fbca1eb2b2e712216ccf8fce392a;p=soft%2Flpc122x%2Fcore Ensure GPIO are on when using status led. --- 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);