From c08cbb1700ec5e91a2e2f063d7a0506081dc47c9 Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Wed, 2 Mar 2016 12:10:55 +0100 Subject: [PATCH 1/3] boards/nucleo-xx: added pin define for user button --- boards/nucleo-f091/include/board.h | 5 +++++ boards/nucleo-f103/include/board.h | 6 ++---- boards/nucleo-f303/include/board.h | 5 +++++ boards/nucleo-f334/include/board.h | 5 +++++ boards/nucleo-f401/include/board.h | 4 ++++ boards/nucleo-l1/include/board.h | 5 +++++ 6 files changed, 26 insertions(+), 4 deletions(-) diff --git a/boards/nucleo-f091/include/board.h b/boards/nucleo-f091/include/board.h index 6725b0bde9..e0e275e870 100644 --- a/boards/nucleo-f091/include/board.h +++ b/boards/nucleo-f091/include/board.h @@ -56,6 +56,11 @@ extern "C" { #define LED_ORANGE_TOGGLE /** @} */ +/** + * @brief User button + */ +#define BTN_B1_PIN GPIO_PIN(PORT_C, 13) + /** * @brief Initialize board specific hardware, including clock, LEDs and std-IO */ diff --git a/boards/nucleo-f103/include/board.h b/boards/nucleo-f103/include/board.h index 749016656e..c23d62eebd 100755 --- a/boards/nucleo-f103/include/board.h +++ b/boards/nucleo-f103/include/board.h @@ -60,11 +60,9 @@ extern "C" { /** @} */ /** - * @name Buttons - * @{ + * @brief User button */ -#define BUTTON_USER_GPIO GPIO_PIN(PORT_C, 13) -/** @} */ +#define BTN_B1_PIN GPIO_PIN(PORT_C, 13) /** * @name xtimer configuration diff --git a/boards/nucleo-f303/include/board.h b/boards/nucleo-f303/include/board.h index 5c47e914c4..66c1a96bb7 100755 --- a/boards/nucleo-f303/include/board.h +++ b/boards/nucleo-f303/include/board.h @@ -57,6 +57,11 @@ extern "C" { #define LED_ORANGE_TOGGLE /** @} */ +/** + * @brief User button + */ +#define BTN_B1_PIN GPIO_PIN(PORT_C, 13) + /** * @brief Initialize board specific hardware, including clock, LEDs and std-IO */ diff --git a/boards/nucleo-f334/include/board.h b/boards/nucleo-f334/include/board.h index be2fe0460b..6216c2b989 100644 --- a/boards/nucleo-f334/include/board.h +++ b/boards/nucleo-f334/include/board.h @@ -55,6 +55,11 @@ extern "C" { #define LED_ORANGE_TOGGLE /** @} */ +/** + * @brief User button + */ +#define BTN_B1_PIN GPIO_PIN(PORT_C, 13) + /** * @name xtimer tuning values * @{ diff --git a/boards/nucleo-f401/include/board.h b/boards/nucleo-f401/include/board.h index 5d87b5c9d3..4078011f9a 100644 --- a/boards/nucleo-f401/include/board.h +++ b/boards/nucleo-f401/include/board.h @@ -64,6 +64,10 @@ extern "C" { #define LED_ORANGE_TOGGLE /** @} */ +/** + * @brief User button + */ +#define BTN_B1_PIN GPIO_PIN(PORT_C, 13) /** * @brief Initialize board specific hardware, including clock, LEDs and std-IO diff --git a/boards/nucleo-l1/include/board.h b/boards/nucleo-l1/include/board.h index 0d016c2f02..9598c5e33e 100644 --- a/boards/nucleo-l1/include/board.h +++ b/boards/nucleo-l1/include/board.h @@ -65,6 +65,11 @@ extern "C" { #define LED_ORANGE_TOGGLE /** @} */ +/** + * @brief User button + */ +#define BTN_B1_PIN GPIO_PIN(PORT_C, 13) + /** * @brief Initialize board specific hardware, including clock, LEDs and std-IO */ From 70013e004f5609ba68b3c89f0185802700e629d2 Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Wed, 2 Mar 2016 12:11:16 +0100 Subject: [PATCH 2/3] boards/saml21-xpro: added pin define for SW0 button --- boards/saml21-xpro/include/board.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/boards/saml21-xpro/include/board.h b/boards/saml21-xpro/include/board.h index 608f8d7545..2acc559ff6 100644 --- a/boards/saml21-xpro/include/board.h +++ b/boards/saml21-xpro/include/board.h @@ -55,6 +55,11 @@ extern "C" { #define LED_RED_TOGGLE /* not available */ /** @} */ +/** + * @brief User button pin + */ +#define SW0_PIN GPIO_PIN(PA, 2) + /** * @brief Initialize board specific hardware, including clock, LEDs and std-IO */ From ce2fdd78655256be2fb60217c5ee2ae410868a05 Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Wed, 2 Mar 2016 12:11:34 +0100 Subject: [PATCH 3/3] boards/stm*discovery: added define for user button --- boards/stm32f0discovery/include/board.h | 5 +++++ boards/stm32f3discovery/include/board.h | 5 +++++ boards/stm32f4discovery/include/board.h | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/boards/stm32f0discovery/include/board.h b/boards/stm32f0discovery/include/board.h index 539db663df..8f791c0edb 100644 --- a/boards/stm32f0discovery/include/board.h +++ b/boards/stm32f0discovery/include/board.h @@ -56,6 +56,11 @@ extern "C" { #define LED_RED_TOGGLE LD4_TOGGLE /** @} */ +/** + * @brief User button + */ +#define BTN_B1_PIN GPIO_PIN(PORT_A, 0) + /** * @brief Initialize board specific hardware, including clock, LEDs and std-IO */ diff --git a/boards/stm32f3discovery/include/board.h b/boards/stm32f3discovery/include/board.h index a6412d9b6f..73ddfba700 100644 --- a/boards/stm32f3discovery/include/board.h +++ b/boards/stm32f3discovery/include/board.h @@ -79,6 +79,11 @@ extern "C" { #define LED_RED_TOGGLE LD5_TOGGLE /** @} */ +/** + * @brief User button + */ +#define BTN_B1_PIN GPIO_PIN(PORT_A, 0) + /** * @brief Initialize board specific hardware, including clock, LEDs and std-IO */ diff --git a/boards/stm32f4discovery/include/board.h b/boards/stm32f4discovery/include/board.h index 74ecd19699..a195651b12 100644 --- a/boards/stm32f4discovery/include/board.h +++ b/boards/stm32f4discovery/include/board.h @@ -75,6 +75,11 @@ extern "C" { #define LED_RED_TOGGLE LD5_TOGGLE /** @} */ +/** + * @brief User button + */ +#define BTN_B1_PIN GPIO_PIN(PORT_A, 0) + /** * @brief Initialize board specific hardware, including clock, LEDs and std-IO */