Skip to content
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

module: LVGL: Improve support for hardware display rotation #73556

Closed
wants to merge 4 commits into from

Commits on May 31, 2024

  1. drivers: display: dummy: Add rotation property

    Adds the rotation property to the dummy display binding to allow for
    setting an initial rotation within tests.
    
    Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
    faxe1008 committed May 31, 2024
    Configuration menu
    Copy the full SHA
    bf6edb2 View commit details
    Browse the repository at this point in the history
  2. modules: lvgl: Add lvgl_reload_display_capabilities

    Add a method which allows for syncing information within the
    display_data struct after the display has been rotated in the
    application using `display_set_orientation`. This also makes the
    implementation of various input devices unit testable without requiring
    a lot of overlay files.
    
    After the current implementation is verified
    against unit tests, the reload method will additionally set the
    `rotated` flag on the display driver. The LVGL code will then
    handle the translation of input devices points to points in the GUI
    according to the display rotation.
    
    Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
    faxe1008 committed May 31, 2024
    Configuration menu
    Copy the full SHA
    cca8234 View commit details
    Browse the repository at this point in the history
  3. tests: lib: gui: Add tests for lvgl input devices

    Adds a test for lvgl input devices in various configurations, like
    rotated display, pointer inversions etc.
    
    Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
    faxe1008 committed May 31, 2024
    Configuration menu
    Copy the full SHA
    190c542 View commit details
    Browse the repository at this point in the history
  4. modules: lvgl: Sync display rotation to LVGL

    LVGL supports the `rotated` flag on its display drivers. It is used
    during input device coordinate processing to translate the physical
    touch points to the points in (rendered) GUI space. Previously this was
    done by the Zephyr gluecode on system init. With this change it is now
    possible to perform runtime rotation of the display, the
    `lvgl_reload_display_capabilities` method should be called right after
    `display_set_orientation`.
    
    Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
    faxe1008 committed May 31, 2024
    Configuration menu
    Copy the full SHA
    5d1112b View commit details
    Browse the repository at this point in the history