From 05402dea298e43a0b5c155ff63565eb54dd618aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= Date: Fri, 8 Sep 2017 13:35:19 +0200 Subject: [PATCH] samr21-xpro/gpio: set LED/BUTTON gpios as inverted This makes LED go off when set to 0 and button reads 1 when pressed. --- boards/samr21-xpro/include/gpio_params.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/boards/samr21-xpro/include/gpio_params.h b/boards/samr21-xpro/include/gpio_params.h index 30ba529089..e1a36f35cc 100644 --- a/boards/samr21-xpro/include/gpio_params.h +++ b/boards/samr21-xpro/include/gpio_params.h @@ -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, }, };