Skip to content

Commit

Permalink
FIX: force led off at init
Browse files Browse the repository at this point in the history
  • Loading branch information
r2axz committed Dec 2, 2020
1 parent 18c2175 commit 3fbbf40
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions status_led.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@
#include "device_config.h"
#include "status_led.h"

static gpio_pin_t *status_led_pin;

void status_led_init() {
gpio_pin_init(&device_config_get()->status_led_pin);
status_led_pin = &device_config_get()->status_led_pin;
gpio_pin_init(status_led_pin);
gpio_pin_set(status_led_pin, 0);
}

void status_led_set(int on) {
(void)status_led_set; /* This function does not have to be used */
gpio_pin_set(&device_config_get()->status_led_pin, on);
gpio_pin_set(status_led_pin, on);
}

0 comments on commit 3fbbf40

Please sign in to comment.