1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards/remote: invert button logic in SAUL

This commit is contained in:
smlng 2018-01-15 15:34:43 +01:00
parent 469a1bb632
commit a42e4bd5fb
3 changed files with 48 additions and 36 deletions

View File

@ -32,24 +32,28 @@ extern "C" {
static const saul_gpio_params_t saul_gpio_params[] =
{
{
.name = "LED(red)",
.pin = LED0_PIN,
.mode = GPIO_OUT
.name = "LED(red)",
.pin = LED0_PIN,
.mode = GPIO_OUT,
.flags = 0x0,
},
{
.name = "LED(green)",
.pin = LED1_PIN,
.mode = GPIO_OUT
.name = "LED(green)",
.pin = LED1_PIN,
.mode = GPIO_OUT,
.flags = 0x0,
},
{
.name = "LED(blue)",
.pin = LED2_PIN,
.mode = GPIO_OUT
.name = "LED(blue)",
.pin = LED2_PIN,
.mode = GPIO_OUT,
.flags = 0x0,
},
{
.name = "Button(User)",
.pin = BTN0_PIN,
.mode = BTN0_MODE
.name = "Button(User)",
.pin = BTN0_PIN,
.mode = BTN0_MODE,
.flags = SAUL_GPIO_INVERTED,
},
};

View File

@ -32,24 +32,28 @@ extern "C" {
static const saul_gpio_params_t saul_gpio_params[] =
{
{
.name = "LED(red)",
.pin = LED0_PIN,
.mode = GPIO_OUT
.name = "LED(red)",
.pin = LED0_PIN,
.mode = GPIO_OUT,
.flags = 0x0,
},
{
.name = "LED(green)",
.pin = LED1_PIN,
.mode = GPIO_OUT
.name = "LED(green)",
.pin = LED1_PIN,
.mode = GPIO_OUT,
.flags = 0x0,
},
{
.name = "LED(blue)",
.pin = LED2_PIN,
.mode = GPIO_OUT
.name = "LED(blue)",
.pin = LED2_PIN,
.mode = GPIO_OUT,
.flags = 0x0,
},
{
.name = "Button(User)",
.pin = BTN0_PIN,
.mode = BTN0_MODE
.name = "Button(User)",
.pin = BTN0_PIN,
.mode = BTN0_MODE,
.flags = SAUL_GPIO_INVERTED,
},
};

View File

@ -32,24 +32,28 @@ extern "C" {
static const saul_gpio_params_t saul_gpio_params[] =
{
{
.name = "LED(red)",
.pin = LED0_PIN,
.mode = GPIO_OUT
.name = "LED(red)",
.pin = LED0_PIN,
.mode = GPIO_OUT,
.flags = 0x0,
},
{
.name = "LED(green)",
.pin = LED1_PIN,
.mode = GPIO_OUT
.name = "LED(green)",
.pin = LED1_PIN,
.mode = GPIO_OUT,
.flags = 0x0,
},
{
.name = "LED(blue)",
.pin = LED2_PIN,
.mode = GPIO_OUT
.name = "LED(blue)",
.pin = LED2_PIN,
.mode = GPIO_OUT,
.flags = 0x0,
},
{
.name = "Button(User)",
.pin = BTN0_PIN,
.mode = BTN0_MODE
.name = "Button(User)",
.pin = BTN0_PIN,
.mode = BTN0_MODE,
.flags = SAUL_GPIO_INVERTED,
},
};