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. Buttons are now configured using polling mode option.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
  • Loading branch information
joelguittet committed Jan 15, 2024
1 parent 10e66dc commit aec0231
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion boards/arm/wio_terminal/wio_terminal.dts
Expand Up @@ -48,8 +48,10 @@
};

/* Buttons */
gpio_keys {
buttons {
compatible = "gpio-keys";
polling-mode;
debounce-interval-ms = <100>;
user_button_0: button_0 {
label = "User Button 0";
gpios = <&portc 26 GPIO_ACTIVE_LOW>;
Expand All @@ -65,6 +67,11 @@
gpios = <&portc 28 GPIO_ACTIVE_LOW>;
zephyr,code = <INPUT_KEY_2>;
};
};

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

0 comments on commit aec0231

Please sign in to comment.