samples: boards: st: power_mgmt: wkup_pins: add nucleo_g031k8
Add overlay for above board for testing. As the board does not have an actual button, PA0 has to be connected to GND for wake-up. Signed-off-by: Martin Jäger <martin@libre.solar>
This commit is contained in:
parent
bb0e580be4
commit
403299c40b
2 changed files with 28 additions and 0 deletions
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* Copyright (c) 2025 A Labs GmbH
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr/dt-bindings/input/input-event-codes.h>
|
||||
|
||||
/ {
|
||||
/* the board has no actual button, you need to connect PA0 to GND with a jumper wire */
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
user_button: button {
|
||||
label = "User";
|
||||
gpios = <&gpioa 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
|
||||
zephyr,code = <INPUT_KEY_0>;
|
||||
};
|
||||
};
|
||||
|
||||
aliases {
|
||||
wkup-src = &user_button;
|
||||
};
|
||||
};
|
||||
|
||||
&pwr {
|
||||
status = "okay";
|
||||
};
|
|
@ -6,6 +6,7 @@ tests:
|
|||
filter: dt_enabled_alias_with_parent_compat("wkup-src",
|
||||
"gpio-keys") and dt_compat_enabled("st,stm32-pwr")
|
||||
platform_allow:
|
||||
- nucleo_g031k8
|
||||
- nucleo_l4r5zi
|
||||
- nucleo_u575zi_q
|
||||
- nucleo_u5a5zj_q
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue