43 #define LED_GREEN led_green 46 #define LED_RED led_red struct led * led_red
The green onboard LED.
Definition: leds.c:69
void register_led(struct led *const)
Add an LED to the cyclic processed LEDs.
Definition: leds.c:123
uint8_t prescaler
Prescaler for the counter in blinking mode.
Definition: leds.h:66
void flash_led(struct led *led)
Briefly flashes an LED.
Definition: leds.c:145
led_mode
Enumeration for the LED mode.
Definition: leds.h:52
GPIO configuration and service functions.
The LED blinks once per second.
Definition: leds.h:56
void init_leds_module(void)
Module initialization procedure.
Definition: leds.c:116
uint8_t counter
Counter for the blinking interval.
Definition: leds.h:67
void flash_led_multiple(struct led *led, uint8_t count)
Briefly flashes an LED.
Definition: leds.c:151
The LED flashes briefly and remains off.
Definition: leds.h:55
The LED can be turned on/off manually.
Definition: leds.h:54
Enumeration for the on-board LEDs.
Definition: leds.h:72
enum led_mode mode
The mode of the LED.
Definition: leds.h:65
void update_leds(void)
State machine task that updates the LEDs.
Definition: leds.c:195
Internal state of an LED.
Definition: leds.h:62
bool active
When the LED is on, this reads true
Definition: leds.h:64
struct led * led_green
The green onboard LED.
Definition: leds.c:67
Configuration of a single GPIO pin.
Definition: gpio.h:57
void toggle_led(struct led *led)
Toggles an LED.
Definition: leds.c:163
void blink_led(struct led *led, uint8_t prescaler)
Lets an LED blink in a fixed interval.
Definition: leds.c:139
const struct gpio_pin *const pin
Gpio pin connected to an LED.
Definition: leds.h:74
void set_led(struct led *led, bool enable)
Enables or disables an LED.
Definition: leds.c:157