boards: st: nucleo_wba55cg: define all LEDs and buttons
This board includes three gpio-connected LEDs and push-buttons. Include all missing defines in board's DTS and while at it, fix existing button definition (missing pull-up enable) and align node names with other boards (e.g. 'nucleo_wb55rg'). Provided changes were tested on real board with 'blinky' and 'button' samples. Additionally, duplicated LED nodes no longer required were removed from overlay file for this board, in 'suspend_to_ram' sample. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
This commit is contained in:
parent
19df415f91
commit
35c08ea636
2 changed files with 27 additions and 17 deletions
|
@ -29,24 +29,46 @@
|
|||
|
||||
leds: leds {
|
||||
compatible = "gpio-leds";
|
||||
blue_led_1: led_1 {
|
||||
blue_led_1: led_0 {
|
||||
gpios = <&gpiob 4 GPIO_ACTIVE_LOW>;
|
||||
label = "User LD1";
|
||||
};
|
||||
green_led_2: led_1 {
|
||||
gpios = <&gpioa 9 GPIO_ACTIVE_LOW>;
|
||||
label = "User LD2";
|
||||
};
|
||||
red_led_3: led_2 {
|
||||
gpios = <&gpiob 8 GPIO_ACTIVE_LOW>;
|
||||
label = "User LD3";
|
||||
};
|
||||
};
|
||||
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
user_button: button {
|
||||
label = "User";
|
||||
gpios = <&gpioc 13 GPIO_ACTIVE_LOW>;
|
||||
user_button_1: button_0 {
|
||||
label = "User B1";
|
||||
gpios = <&gpioc 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
zephyr,code = <INPUT_KEY_0>;
|
||||
};
|
||||
user_button_2: button_1 {
|
||||
label = "User B2";
|
||||
gpios = <&gpiob 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
zephyr,code = <INPUT_KEY_1>;
|
||||
};
|
||||
user_button_3: button_2 {
|
||||
label = "User B3";
|
||||
gpios = <&gpiob 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
zephyr,code = <INPUT_KEY_2>;
|
||||
};
|
||||
};
|
||||
|
||||
aliases {
|
||||
led0 = &blue_led_1;
|
||||
sw0 = &user_button;
|
||||
led1 = &green_led_2;
|
||||
led2 = &red_led_3;
|
||||
sw0 = &user_button_1;
|
||||
sw1 = &user_button_2;
|
||||
sw2 = &user_button_3;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -31,18 +31,6 @@
|
|||
/* adjust channel number according to pinmux in board.dts */
|
||||
io-channels = <&adc4 8>;
|
||||
};
|
||||
|
||||
leds: leds {
|
||||
compatible = "gpio-leds";
|
||||
red_led_3: led_3 {
|
||||
gpios = <&gpiob 8 GPIO_ACTIVE_LOW>;
|
||||
label = "User LD2";
|
||||
};
|
||||
};
|
||||
|
||||
aliases {
|
||||
led2 = &red_led_3;
|
||||
};
|
||||
};
|
||||
|
||||
&lptim1 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue