Skip to content

Commit

Permalink
samr21-xpro/gpio: set LED/BUTTON gpios as inverted
Browse files Browse the repository at this point in the history
This makes LED go off when set to 0 and button reads 1 when pressed.
  • Loading branch information
cladmi committed Oct 5, 2017
1 parent c75470e commit 05402de
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions boards/samr21-xpro/include/gpio_params.h
Expand Up @@ -37,12 +37,14 @@ static const saul_gpio_params_t saul_gpio_params[] =
{
.name = "LED(orange)",
.pin = LED0_PIN,
.mode = GPIO_OUT
.mode = GPIO_OUT,
.flags = SAUL_GPIO_INVERTED,
},
{
.name = "Button(SW0)",
.pin = BTN0_PIN,
.mode = BTN0_MODE
.mode = BTN0_MODE,
.flags = SAUL_GPIO_INVERTED,
},
};

Expand Down

0 comments on commit 05402de

Please sign in to comment.