Skip to content

Commit 8df1591

Browse files
EmilioCBenkartben
authored andcommitted
boards: nxp: frdm_mcxw71: Added Button Support
Added Button Support for frdm_mcxw71 Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
1 parent 03b075d commit 8df1591

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

boards/nxp/frdm_mcxw71/frdm_mcxw71.dts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77

88
#include <nxp/nxp_mcxw71.dtsi>
99
#include "frdm_mcxw71-pinctrl.dtsi"
10+
#include <zephyr/dt-bindings/input/input-event-codes.h>
1011

1112
/ {
1213
model = "NXP FRDM-MCXW71 board";
1314

1415
aliases {
1516
led0 = &blue_led;
17+
sw0 = &user_button_0;
1618
blue-pwm-led = &blue_pwm_led;
1719
green-pwm-led = &green_pwm_led;
1820
red-pwm-led = &red_pwm_led;
@@ -49,6 +51,16 @@
4951
pwms = <&tpm0 0 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
5052
};
5153
};
54+
55+
gpio_keys {
56+
compatible = "gpio-keys";
57+
user_button_0: button_0 {
58+
label = "User SW2";
59+
gpios = <&gpioc 6 GPIO_ACTIVE_LOW>;
60+
zephyr,code = <INPUT_KEY_0>;
61+
status = "okay";
62+
};
63+
};
5264
};
5365

5466
&vref {

0 commit comments

Comments
 (0)