feat(doc): Update display-related documentation to new API (#5489)
This commit is contained in:
@@ -77,7 +77,7 @@ display under the rest of the button too.
|
||||
The difference between buffering modes regarding the drawing mechanism
|
||||
is the following:
|
||||
|
||||
1. **One buffer** - LVGL needs to wait for :cpp:func:`lv_disp_flush_ready` (called from ``flush_cb``) before starting to redraw the next part.
|
||||
1. **One buffer** - LVGL needs to wait for :cpp:func:`lv_display_flush_ready` (called from ``flush_cb``) before starting to redraw the next part.
|
||||
2. **Two buffers** - LVGL can immediately draw to the second buffer when the first is sent to ``flush_cb`` because the
|
||||
flushing should be done by DMA (or similar hardware) in the background.
|
||||
3. **Double buffering** - ``flush_cb`` should only swap the addresses of the frame buffers.
|
||||
|
||||
@@ -246,8 +246,8 @@ Handling multiple displays
|
||||
|
||||
Screens are created on the currently selected *default display*. The
|
||||
*default display* is the last registered display with
|
||||
:cpp:func:`lv_disp_drv_register`. You can also explicitly select a new default
|
||||
display using :cpp:expr:`lv_disp_set_default(disp)`.
|
||||
:cpp:func:`lv_display_create`. You can also explicitly select a new default
|
||||
display using :cpp:expr:`lv_display_set_default(disp)`.
|
||||
|
||||
:cpp:func:`lv_screen_active`, :cpp:func:`lv_screen_load` and :cpp:func:`lv_screen_load_anim` operate
|
||||
on the default display.
|
||||
|
||||
@@ -505,7 +505,7 @@ example shows how to set the "default" theme:
|
||||
false, /*Light or dark mode*/
|
||||
&lv_font_montserrat_10, &lv_font_montserrat_14, &lv_font_montserrat_18); /*Small, normal, large fonts*/
|
||||
|
||||
lv_disp_set_theme(display, th); /*Assign the theme to the display*/
|
||||
lv_display_set_theme(display, th); /*Assign the theme to the display*/
|
||||
|
||||
The included themes are enabled in ``lv_conf.h``. If the default theme
|
||||
is enabled by :c:macro:`LV_USE_THEME_DEFAULT` LVGL automatically initializes
|
||||
|
||||
Reference in New Issue
Block a user