Skip to content

Commit

Permalink
boards: arm: wio terminal: separate buttons and joystick definition
Browse files Browse the repository at this point in the history
The purpose of this separation is to avoid conflict initializing
gpio-keys because button 0 and joystick up have a shared interrupt
source. Joystick is now configured using polling mode option.

Signed-off-by: Joel Guittet <[email protected]>
  • Loading branch information
joelguittet authored and MaureenHelm committed Jan 30, 2024
1 parent 3e5a593 commit 479c40c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion boards/arm/wio_terminal/wio_terminal.dts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
};

/* Buttons */
gpio_keys {
buttons: buttons {
compatible = "gpio-keys";
user_button_0: button_0 {
label = "User Button 0";
Expand All @@ -65,6 +65,13 @@
gpios = <&portc 28 GPIO_ACTIVE_LOW>;
zephyr,code = <INPUT_KEY_2>;
};
};

/* Joystick */
joystick: joystick {
compatible = "gpio-keys";
polling-mode;
debounce-interval-ms = <100>;
joy_sel: joystick_selection {
label = "joystick selection";
gpios = <&portd 10 GPIO_ACTIVE_LOW>;
Expand Down

0 comments on commit 479c40c

Please sign in to comment.