Skip to content

Commit 896e084

Browse files
benpiccogalak
authored andcommitted
boards: arm: atsamd21: enable button in dts
The SAM D21 Xplained Pro has a button connected to PA15, so enable it in the dts. Signed-off-by: Benjamin Valentin <[email protected]>
1 parent 0cff42f commit 896e084

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

boards/arm/atsamd21_xpro/atsamd21_xpro.dts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
/* These aliases are provided for compatibility with samples */
2222
aliases {
2323
led0 = &led0;
24+
sw0 = &user_button;
2425
};
2526

2627
leds {
@@ -30,6 +31,14 @@
3031
label = "Yellow LED";
3132
};
3233
};
34+
35+
buttons {
36+
compatible = "gpio-keys";
37+
user_button: button_0 {
38+
gpios = <&porta 15 (GPIO_PUD_PULL_UP | GPIO_INT_ACTIVE_LOW)>;
39+
label = "SW0";
40+
};
41+
};
3342
};
3443

3544
&sercom0 {

0 commit comments

Comments
 (0)