Skip to content

Commit 2a7ffe5

Browse files
ccli8kartben
authored andcommitted
boards: numaker_m55m1: add BTN0/BTN1 buttons
Add BTN0/BTN1 buttons on numaker_m55m1 board for e.g. hid-mouse sample test Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
1 parent 7095608 commit 2a7ffe5

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

boards/nuvoton/numaker_m55m1/numaker_m55m1.dts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
aliases {
1818
led0 = &green_led;
1919
led1 = &yellow_led;
20+
sw0 = &btn0;
21+
sw1 = &btn1;
2022
};
2123

2224
chosen {
@@ -43,6 +45,20 @@
4345
label = "User LD1";
4446
};
4547
};
48+
49+
gpio_keys {
50+
compatible = "gpio-keys";
51+
btn0: btn0 {
52+
label = "BTN0";
53+
gpios = <&gpioi 11 GPIO_ACTIVE_LOW>;
54+
zephyr,code = <INPUT_KEY_0>;
55+
};
56+
btn1: btn1 {
57+
label = "BTN1";
58+
gpios = <&gpioh 1 GPIO_ACTIVE_LOW>;
59+
zephyr,code = <INPUT_KEY_1>;
60+
};
61+
};
4662
};
4763

4864
&gpiod {

0 commit comments

Comments
 (0)