Skip to content

Commit c98c388

Browse files
zejiang0jasonnashif
authored andcommitted
dts: mcxn947: Fix input key error
Fix the compile error when input driver is enabled. Error message: In file included from zephyr/zephyr/include/zephyr/sys/util_macro.h:34, from zephyr/zephyr/include/zephyr/irq_multilevel.h:15, from zephyr/zephyr/include/zephyr/devicetree.h:20, from zephyr/zephyr/include/zephyr/device.h:12, from zephyr/zephyr/drivers/input/input_gpio_keys.c:9: zephyr/zephyr/include/zephyr/toolchain/gcc.h:87:36: error: static assertion failed: "zephyr-code must be specified to use the input-gpio-keys driver" Signed-off-by: Jason Yu <[email protected]>
1 parent 4c4ff20 commit c98c388

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

boards/nxp/frdm_mcxn947/frdm_mcxn947.dtsi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include "frdm_mcxn947-pinctrl.dtsi"
88
#include <zephyr/dt-bindings/i2c/i2c.h>
9+
#include <zephyr/dt-bindings/input/input-event-codes.h>
910

1011
/ {
1112
aliases{
@@ -41,11 +42,13 @@
4142
user_button_2: button_0 {
4243
label = "User SW2";
4344
gpios = <&gpio0 23 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
45+
zephyr,code = <INPUT_KEY_0>;
4446
status = "disabled";
4547
};
4648
user_button_3: button_1 {
4749
label = "User SW3";
4850
gpios = <&gpio0 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
51+
zephyr,code = <INPUT_KEY_1>;
4952
status = "disabled";
5053
};
5154
};

0 commit comments

Comments
 (0)