boards/nucleo64: adapt user button for nucleo-g431rb
This commit is contained in:
parent
4de05b4837
commit
0eb5c81501
@ -54,7 +54,8 @@ extern "C" {
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define BTN0_PIN GPIO_PIN(PORT_C, 13)
|
#define BTN0_PIN GPIO_PIN(PORT_C, 13)
|
||||||
#if defined(CPU_MODEL_STM32L433RC) || defined(CPU_MODEL_STM32G474RE)
|
#if defined(CPU_MODEL_STM32L433RC) || defined(CPU_MODEL_STM32G474RE) || \
|
||||||
|
defined(CPU_MODEL_STM32G431RB)
|
||||||
#define BTN0_MODE GPIO_IN_PD
|
#define BTN0_MODE GPIO_IN_PD
|
||||||
#else
|
#else
|
||||||
#define BTN0_MODE GPIO_IN_PU
|
#define BTN0_MODE GPIO_IN_PU
|
||||||
|
|||||||
@ -43,7 +43,8 @@ static const saul_gpio_params_t saul_gpio_params[] =
|
|||||||
.name = "Button(B1 User)",
|
.name = "Button(B1 User)",
|
||||||
.pin = BTN0_PIN,
|
.pin = BTN0_PIN,
|
||||||
.mode = BTN0_MODE,
|
.mode = BTN0_MODE,
|
||||||
#if !defined(CPU_MODEL_STM32L433RC) && !defined(CPU_MODEL_STM32G474RE)
|
#if !defined(CPU_MODEL_STM32L433RC) && !defined(CPU_MODEL_STM32G474RE) && \
|
||||||
|
!defined(CPU_MODEL_STM32G431RB)
|
||||||
.flags = SAUL_GPIO_INVERTED
|
.flags = SAUL_GPIO_INVERTED
|
||||||
#endif
|
#endif
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user