Skip to content

Commit 401a2ff

Browse files
feilongflcarlescufi
authored andcommitted
boards: gd32e103_eval: add leds and buttons.
add 4x leds and 3x button for eval board. Signed-off-by: YuLong Yao <[email protected]>
1 parent 8300b7c commit 401a2ff

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

boards/arm/gd32e103v_eval/gd32e103v_eval.dts

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,68 @@
1818
zephyr,console = &usart0;
1919
zephyr,shell-uart = &usart0;
2020
};
21+
22+
leds {
23+
compatible = "gpio-leds";
24+
led2: led2 {
25+
gpios = <&gpioc 0 GPIO_ACTIVE_HIGH>;
26+
label = "LED2";
27+
};
28+
led3: led3 {
29+
gpios = <&gpioc 2 GPIO_ACTIVE_HIGH>;
30+
label = "LED3";
31+
};
32+
led4: led4 {
33+
gpios = <&gpioe 0 GPIO_ACTIVE_HIGH>;
34+
label = "LED4";
35+
};
36+
led5: led5 {
37+
gpios = <&gpioe 1 GPIO_ACTIVE_HIGH>;
38+
label = "LED5";
39+
};
40+
};
41+
42+
gpio_keys {
43+
compatible = "gpio-keys";
44+
wakeup_key: wakeup_key {
45+
label = "WAKEUP_KEY";
46+
gpios = <&gpioa 0 GPIO_ACTIVE_LOW>;
47+
};
48+
tamper_key: tamper_key {
49+
label = "TAMPER_KEY";
50+
gpios = <&gpioc 13 GPIO_ACTIVE_LOW>;
51+
};
52+
user_key: user_key {
53+
label = "USER_KEY1";
54+
gpios = <&gpiob 14 GPIO_ACTIVE_LOW>;
55+
};
56+
};
57+
58+
aliases {
59+
led0 = &led2;
60+
led1 = &led3;
61+
sw0 = &user_key;
62+
};
63+
};
64+
65+
&gpioa {
66+
status = "okay";
67+
};
68+
69+
&gpiob {
70+
status = "okay";
71+
};
72+
73+
&gpioc {
74+
status = "okay";
75+
};
76+
77+
&gpiod {
78+
status = "okay";
79+
};
80+
81+
&gpioe {
82+
status = "okay";
2183
};
2284

2385
&usart0 {

0 commit comments

Comments
 (0)