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 88
99#include <neorv32.dtsi>
1010#include <mem.h>
11+ #include <zephyr/dt-bindings/input/input-event-codes.h>
1112
1213/ {
1314 model = "NEORV32 MinimalBoot";
2122 pwm-led0 = &pwm_led0;
2223 pwm-led1 = &pwm_led1;
2324 pwm-led2 = &pwm_led2;
25+ sw0 = &btn0;
26+ sw1 = &btn1;
27+ sw3 = &btn2;
28+ sw4 = &btn3;
2429 };
2530
2631 chosen {
5560 };
5661 };
5762
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+
5891 pwmleds {
5992 compatible = "pwm-leds";
6093
Original file line number Diff line number Diff line change 88
99#include <neorv32.dtsi>
1010#include <mem.h>
11+ #include <zephyr/dt-bindings/input/input-event-codes.h>
1112
1213/ {
1314 model = "NEORV32 UP5KDemo";
2122 pwm-led0 = &pwm_led0;
2223 pwm-led1 = &pwm_led1;
2324 pwm-led2 = &pwm_led2;
25+ sw0 = &btn0;
26+ sw1 = &btn1;
27+ sw3 = &btn2;
28+ sw4 = &btn3;
2429 };
2530
2631 chosen {
5560 };
5661 };
5762
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+
5891 pwmleds {
5992 compatible = "pwm-leds";
6093
You can’t perform that action at this time.
0 commit comments