跳过正文
  1. 技术杂项/

LVGL doc

·228 字·2 分钟
目录

FAQ
#

  • Is my display supported?

    LVGL needs just one simple driver function to copy an array of pixels into a given area of the display. If you can do this with your display then you can use it with LVGL.

LVGL Basics
#

Overview of LVGL’s Data Flow
#

this is a graph showing LVGL’s workflow.

The Tick Interface tells LVGL what time is it. Timer Handler drives LVGL’s timers which, in turn, perform all of LVGL’s time-related tasks.

Update was driven by tick.

Add LVGL to Your Project
#

Configuration
#

Connecting LVGL to Your Hardware
#

you will need to complete a few more steps to get your project up and running with LVGL.

  1. Initialize LVGL once early during system execution by calling lv_init(). This needs to be done before making any other LVGL calls.
  2. Initialize your drivers.
  3. Connect the Tick Interface.
  4. Connect the Display Interface.
  5. Connect the Input-Device Interface.
  6. Drive LVGL time-related tasks by calling lv_timer_handler() every few milliseconds to manage LVGL timers. See Timer Handler for different ways to do this.
  7. Optionally set a theme with lv_display_set_theme().
  8. Thereafter #include “lvgl/lvgl.h” in source files wherever you need to use LVGL functions.

LVGL needs awareness of what time it is (i.e. elapsed time in milliseconds) for all of its tasks for which time is a factor: refreshing displays, reading user input, firing events, animations, etc.