File tree Expand file tree Collapse file tree 2 files changed +66
-0
lines changed Expand file tree Collapse file tree 2 files changed +66
-0
lines changed Original file line number Diff line number Diff line change 8
8
9
9
#include <neorv32.dtsi>
10
10
#include <mem.h>
11
+ #include <zephyr/dt-bindings/input/input-event-codes.h>
11
12
12
13
/ {
13
14
model = "NEORV32 MinimalBoot";
21
22
pwm-led0 = &pwm_led0;
22
23
pwm-led1 = &pwm_led1;
23
24
pwm-led2 = &pwm_led2;
25
+ sw0 = &btn0;
26
+ sw1 = &btn1;
27
+ sw3 = &btn2;
28
+ sw4 = &btn3;
24
29
};
25
30
26
31
chosen {
55
60
};
56
61
};
57
62
63
+ gpio_keys {
64
+ compatible = "gpio-keys";
65
+
66
+ btn0: btn0 {
67
+ label = "BTN0";
68
+ gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
69
+ zephyr,code = <INPUT_KEY_0>;
70
+ };
71
+
72
+ btn1: btn1 {
73
+ label = "BTN1";
74
+ gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
75
+ zephyr,code = <INPUT_KEY_1>;
76
+ };
77
+
78
+ btn2: btn2 {
79
+ label = "BTN2";
80
+ gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
81
+ zephyr,code = <INPUT_KEY_2>;
82
+ };
83
+
84
+ btn3: btn3 {
85
+ label = "BTN3";
86
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
87
+ zephyr,code = <INPUT_KEY_3>;
88
+ };
89
+ };
90
+
58
91
pwmleds {
59
92
compatible = "pwm-leds";
60
93
Original file line number Diff line number Diff line change 8
8
9
9
#include <neorv32.dtsi>
10
10
#include <mem.h>
11
+ #include <zephyr/dt-bindings/input/input-event-codes.h>
11
12
12
13
/ {
13
14
model = "NEORV32 UP5KDemo";
21
22
pwm-led0 = &pwm_led0;
22
23
pwm-led1 = &pwm_led1;
23
24
pwm-led2 = &pwm_led2;
25
+ sw0 = &btn0;
26
+ sw1 = &btn1;
27
+ sw3 = &btn2;
28
+ sw4 = &btn3;
24
29
};
25
30
26
31
chosen {
55
60
};
56
61
};
57
62
63
+ gpio_keys {
64
+ compatible = "gpio-keys";
65
+
66
+ btn0: btn0 {
67
+ label = "BTN0";
68
+ gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
69
+ zephyr,code = <INPUT_KEY_0>;
70
+ };
71
+
72
+ btn1: btn1 {
73
+ label = "BTN1";
74
+ gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
75
+ zephyr,code = <INPUT_KEY_1>;
76
+ };
77
+
78
+ btn2: btn2 {
79
+ label = "BTN2";
80
+ gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
81
+ zephyr,code = <INPUT_KEY_2>;
82
+ };
83
+
84
+ btn3: btn3 {
85
+ label = "BTN3";
86
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
87
+ zephyr,code = <INPUT_KEY_3>;
88
+ };
89
+ };
90
+
58
91
pwmleds {
59
92
compatible = "pwm-leds";
60
93
You can’t perform that action at this time.
0 commit comments