From ebe010125b8fbe674b19003b58ff792f67add137 Mon Sep 17 00:00:00 2001 From: MrKevinWeiss Date: Mon, 18 Nov 2019 10:08:46 +0100 Subject: [PATCH] boards/openmote-b: fix button pin define According to the schematics user button should be on `PD5` not `PC5` (so `GPIO_PIN(3, 5)`). Due to the super high values resistors being used for the external pullup it seems if you use a internal pullup it doesn't work. --- boards/openmote-b/board.c | 2 +- boards/openmote-b/include/board.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/boards/openmote-b/board.c b/boards/openmote-b/board.c index 80415fa77b..ceaaecec02 100644 --- a/boards/openmote-b/board.c +++ b/boards/openmote-b/board.c @@ -32,7 +32,7 @@ void board_init(void) /* The boot pin must be set to input otherwise it may lock the bootloader */ gpio_init(BOOT_PIN, GPIO_IN); - gpio_init(USER_BUTTON_PIN, GPIO_IN); + gpio_init(BTN0_PIN, BTN0_MODE); gpio_init(RF24_SWITCH_CC2538_PIN, GPIO_OUT); gpio_init(RF24_SWITCH_AT86RF215_PIN, GPIO_OUT); diff --git a/boards/openmote-b/include/board.h b/boards/openmote-b/include/board.h index 381da9b982..0e49505b90 100644 --- a/boards/openmote-b/include/board.h +++ b/boards/openmote-b/include/board.h @@ -36,8 +36,8 @@ #define LED1_PIN GPIO_PIN(2, 7) #define LED2_PIN GPIO_PIN(2, 6) #define LED3_PIN GPIO_PIN(2, 5) -#define LED3_PIN GPIO_PIN(2, 5) -#define USER_BUTTON_PIN GPIO_PIN(2, 5) +#define BTN0_PIN GPIO_PIN(3, 5) +#define BTN0_MODE GPIO_IN #define RF24_SWITCH_CC2538_PIN GPIO_PIN(3, 4) /**< PD4 -- CC2538 */ #define RF24_SWITCH_AT86RF215_PIN GPIO_PIN(3, 3) /**< PD3 -- AT86RF215 */