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

Merge pull request #17428 from aabadie/pr/boards/unify_user_button_define

boards: unify user button defines
This commit is contained in:
Alexandre Abadie 2021-12-20 11:43:07 +01:00 committed by GitHub
commit 3b601933ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 28 additions and 16 deletions

View File

@ -84,9 +84,12 @@ extern "C" {
/** @} */
/**
* @brief User button
* @name User button pin configuration
* @{
*/
#define BTN_B1_PIN GPIO_PIN(PORT_B, 2)
#define BTN0_PIN GPIO_PIN(PORT_B, 2) /**< User button pin */
#define BTN0_MODE GPIO_IN_PU /**< User button pin mode */
/** @} */
/**
* @brief Initialize board specific hardware, including clock, LEDs and std-IO

View File

@ -55,8 +55,8 @@ static const saul_gpio_params_t saul_gpio_params[] =
},
{
.name = "Button(B1 User)",
.pin = BTN_B1_PIN,
.mode = GPIO_IN_PU
.pin = BTN0_PIN,
.mode = BTN0_MODE
},
};

View File

@ -47,9 +47,12 @@ extern "C" {
/** @} */
/**
* @brief User button
* @name User button pin configuration
* @{
*/
#define BTN_B1_PIN GPIO_PIN(PORT_C, 13)
#define BTN0_PIN GPIO_PIN(PORT_C, 13) /**< User button pin */
#define BTN0_MODE GPIO_IN_PU /**< User button pin mode */
/** @} */
/**
* @name HTS221 temperature/humidity sensor configuration

View File

@ -47,8 +47,8 @@ static const saul_gpio_params_t saul_gpio_params[] =
},
{
.name = "Button(B1 User)",
.pin = BTN_B1_PIN,
.mode = GPIO_IN_PU,
.pin = BTN0_PIN,
.mode = BTN0_MODE,
.flags = SAUL_GPIO_INVERTED
}
};

View File

@ -42,9 +42,12 @@ extern "C" {
/** @} */
/**
* @brief User button
* @name User button pin configuration
* @{
*/
#define BTN_B1_PIN GPIO_PIN(PORT_B, 3)
#define BTN0_PIN GPIO_PIN(PORT_B, 3) /**< User button pin */
#define BTN0_MODE GPIO_IN_PU /**< User button pin mode */
/** @} */
/**
* @brief Initialize board specific hardware, including clock, LEDs and stdio

View File

@ -40,8 +40,8 @@ static const saul_gpio_params_t saul_gpio_params[] =
},
{
.name = "Button(B1 User)",
.pin = BTN_B1_PIN,
.mode = GPIO_IN_PU,
.pin = BTN0_PIN,
.mode = BTN0_MODE,
.flags = SAUL_GPIO_INVERTED
}
};

View File

@ -56,9 +56,12 @@ extern "C" {
/** @} */
/**
* @brief User button
* @name User button pin configuration
* @{
*/
#define BTN_B1_PIN GPIO_PIN(PORT_C, 13)
#define BTN0_PIN GPIO_PIN(PORT_C, 13) /**< User button pin */
#define BTN0_MODE GPIO_IN /**< User button pin mode */
/** @} */
/**
* @name si7034 temperature sensor configuration

View File

@ -51,8 +51,8 @@ static const saul_gpio_params_t saul_gpio_params[] =
},
{
.name = "Button(B1 User)",
.pin = BTN_B1_PIN,
.mode = GPIO_IN,
.pin = BTN0_PIN,
.mode = BTN0_MODE,
},
};