-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
boards: arm: wio terminal: separate buttons and joystick definition #67458
boards: arm: wio terminal: separate buttons and joystick definition #67458
Conversation
at least in #67208 (comment) there was discussion to reverse it and have the joystick with interrupts and the 3 buttons with polling mode:
|
True, and this was something I initiated. Will modify. |
7cbc2c3
to
aec0231
Compare
@maxhbr done |
Hey @joelguittet , I tried to test the changes by adding support to the lvgl sample similar to #67049 (comment): diff --git a/samples/subsys/display/lvgl/boards/wio_terminal.conf b/samples/subsys/display/lvgl/boards/wio_terminal.conf
new file mode 100644
index 0000000000..de103d88fe
--- /dev/null
+++ b/samples/subsys/display/lvgl/boards/wio_terminal.conf
@@ -0,0 +1 @@
+CONFIG_INPUT=y
diff --git a/samples/subsys/display/lvgl/boards/wio_terminal.overlay b/samples/subsys/display/lvgl/boards/wio_terminal.overlay
new file mode 100644
index 0000000000..beaa4be71a
--- /dev/null
+++ b/samples/subsys/display/lvgl/boards/wio_terminal.overlay
@@ -0,0 +1,19 @@
+/*
+ * SPDX-License-Identifier: Apache-2.0
+ */
+#include <zephyr/dt-bindings/input/input-event-codes.h>
+#include <zephyr/dt-bindings/lvgl/lvgl.h>
+ / {
+
+ lvgl_button_input {
+ compatible = "zephyr,lvgl-button-input";
+ input-codes = <INPUT_KEY_B>;
+ coordinates = <160 120>;
+ };
+
+ lvgl_keypad_input {
+ compatible = "zephyr,lvgl-keypad-input";
+ input-codes = <INPUT_KEY_LEFT INPUT_KEY_RIGHT INPUT_KEY_ENTER>;
+ lvgl-codes = <LV_KEY_LEFT LV_KEY_RIGHT LV_KEY_ENTER>;
+ };
+}; But, with these changes applied, the lvgl sample no longer correctly loads and produces the following output on start:
and pressing random buttons generates log similar to:
EDIT: EDIT: EDIT: |
aec0231
to
15eba1c
Compare
Hello @maxhbr I made an overlay a bit different, I added the => The lvgl_xxx_input do not work when there are multiple gpio-keys compatible node in the board definition. @faxe1008 maybe this is somethingyou know more than us ? |
@kartben this PR has no automatic reviewers assigned. Maybe you can help here ? Thanks! |
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]>
Add Wio Terminal configuration to the LVGL sample with button and keypad overlay. Signed-off-by: Joel Guittet <[email protected]>
15eba1c
to
3a071d1
Compare
@maxhbr I have updated this PR:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested it and it works perfectly fine. Great! 🎉
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.
Fixes #67049