Skip to content
Snippets Groups Projects
Commit 05402dea authored by Gaëtan Harter's avatar Gaëtan Harter
Browse files

samr21-xpro/gpio: set LED/BUTTON gpios as inverted

This makes LED go off when set to 0 and button reads 1 when pressed.
parent c75470e6
No related branches found
No related tags found
No related merge requests found
...@@ -37,12 +37,14 @@ static const saul_gpio_params_t saul_gpio_params[] = ...@@ -37,12 +37,14 @@ static const saul_gpio_params_t saul_gpio_params[] =
{ {
.name = "LED(orange)", .name = "LED(orange)",
.pin = LED0_PIN, .pin = LED0_PIN,
.mode = GPIO_OUT .mode = GPIO_OUT,
.flags = SAUL_GPIO_INVERTED,
}, },
{ {
.name = "Button(SW0)", .name = "Button(SW0)",
.pin = BTN0_PIN, .pin = BTN0_PIN,
.mode = BTN0_MODE .mode = BTN0_MODE,
.flags = SAUL_GPIO_INVERTED,
}, },
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment