Skip to content

Commit

Permalink
samples: subsys: display: lvgl: Update README
Browse files Browse the repository at this point in the history
Update the readme to better describe contents of the sample, which is now
used to showcase the various input device types that LVGL offers.

(cherry picked from commit 9177709)

Original-Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
GitOrigin-RevId: 9177709
Change-Id: I15401102aa46556731648726c0737ff037189ffd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5104209
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
Tested-by: Fabio Baltieri <fabiobaltieri@google.com>
Commit-Queue: Fabio Baltieri <fabiobaltieri@google.com>
  • Loading branch information
faxe1008 authored and Chromeos LUCI committed Dec 8, 2023
1 parent 34a9795 commit 9766648
Showing 1 changed file with 25 additions and 6 deletions.
31 changes: 25 additions & 6 deletions samples/subsys/display/lvgl/README.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,36 @@
.. zephyr:code-sample:: lvgl
:name: LVGL basic sample
:relevant-api: display_interface
:relevant-api: display_interface input_interface

Display "Hello World" and a dynamic counter using LVGL.
Display a "Hello World" and react to user input using LVGL.

Overview
********

This sample application displays "Hello World" in the center of the screen
and a counter at the bottom which increments every second. If an input driver
is supported, such as the touch panel controller on mimxrt10{50,60,64}_evk
boards, "Hello World" is enclosed in a button that changes to the toggled state
when touched.
and a counter at the bottom which increments every second.
Based on the available input devices on the board used to run the sample,
additional widgets may be displayed and additional interactions enabled:

* Pointer
If your board has a touch panel controller
(:dtcompatible:`zephyr,lvgl-pointer-input`), a button widget is displayed
in the center of the screen. Otherwise a label widget is displayed.
* Button
The button pseudo device (:dtcompatible:`zephyr,lvgl-button-input`) maps
a press/release action to a specific coordinate on screen. In the case
of this sample, the coordinates are mapped to the center of the screen.
* Encoder
The encoder pseudo device (:dtcompatible:`zephyr,lvgl-encoder-input`)
can be used to navigate between widgets and edit their values. If the
board contains an encoder, an arc widget is displayed, which can be
edited.
* Keypad
The keypad pseudo device (:dtcompatible:`zephyr,lvgl-keypad-input`) can
be used for focus shifting and also entering characters inside editable
widgets such as text areas. If the board used with this sample has a
keypad device, a button matrix is displayed at the bottom of the screen
to showcase the focus shifting capabilities.

Requirements
************
Expand Down

0 comments on commit 9766648

Please sign in to comment.