Source code for the Trusted Boot Module.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tbm-mcu/source/platform/stm32f0/led.c

32 lines
457 B

#include <libopencm3/stm32/gpio.h>
#include <led.h>
#include <macros.h>
struct led leds[] = {
{ GPIOC, GPIO8, 0 },
};
size_t nleds = count_of(leds);
void led_enable(struct led *led)
{
if (!led)
return;
if (led->invert)
gpio_clear(led->port, led->pin);
else
gpio_set(led->port, led->pin);
}
void led_disable(struct led *led)
{
if (!led)
return;
if (led->invert)
gpio_set(led->port, led->pin);
else
gpio_clear(led->port, led->pin);
}