Loading...
Searching...
No Matches
LVGL Drivers

Display controller and touchpad driver to can be directly used with LVGL. More...

Detailed Description

Display controller and touchpad driver to can be directly used with LVGL.

Note
This package needs the 32bit version of SDL2
See also
https://github.com/lvgl/lv_drivers

Configuration options

To change the size of the screen SDL_HOR_RES and SDL_VER_RES can be changed via CFLAGS or in lv_drv_conf.h.

For small screen a zoom factor can be applied through SDL_ZOOM, e.g: SDL_ZOOM=2 will apply a x2 zoom to the display.

SDL Requirements

To run lvgl inside a simulator (native), SDL2 is required. Install instructions can be found at https://docs.lvgl.io/latest/en/html/get-started/pc-simulator.html#install-sdl-2, note that the 32bit version is needed.

On debian/ubuntu this could be as simple as installing the libsdl2-dev:i386 package.

Using SDL2 requires more stack so in case you are using it add

CFLAGS += '-DTHREAD_STACKSIZE_MAIN=48*1024'

to your makefile. 48kB is enough for the test, other uses may need more or may need this to be applied to other threads using THREAD_STACKSIZE_DEFAULT

#define USE_SDL   IS_USED(MODULE_LV_DRIVERS_SDL)
 LVGL Drivers SDL2 configuration headers.
 
#define SDL_HOR_RES   320
 LVGL SDL2 display horizontal resolution.
 
#define SDL_VER_RES   240
 LVGL SDL2 display vertical resolution.
 
#define LV_HOR_RES   SDL_HOR_RES
 LVGL display horizontal resolution.
 
#define LV_VER_RES   SDL_VER_RES
 LVGL display vertical resolution.
 
#define SDL_ZOOM   1
 Enable Scale window by this factor (useful when simulating small screens)
 
#define SDL_DOUBLE_BUFFERED   0
 Used to test true double buffering with only address changing.
 
#define SDL_DUAL_DISPLAY   0
 Open two windows to test multi display support.
 

Macro Definition Documentation

◆ LV_HOR_RES

#define LV_HOR_RES   SDL_HOR_RES

LVGL display horizontal resolution.

Definition at line 58 of file lv_drv_conf.h.

◆ LV_VER_RES

#define LV_VER_RES   SDL_VER_RES

LVGL display vertical resolution.

Definition at line 62 of file lv_drv_conf.h.

◆ SDL_DOUBLE_BUFFERED

#define SDL_DOUBLE_BUFFERED   0

Used to test true double buffering with only address changing.

Use 2 draw buffers, both with SDL_HOR_RES x SDL_VER_RES size

Definition at line 73 of file lv_drv_conf.h.

◆ SDL_DUAL_DISPLAY

#define SDL_DUAL_DISPLAY   0

Open two windows to test multi display support.

Definition at line 77 of file lv_drv_conf.h.

◆ SDL_HOR_RES

#define SDL_HOR_RES   320

LVGL SDL2 display horizontal resolution.

Definition at line 47 of file lv_drv_conf.h.

◆ SDL_VER_RES

#define SDL_VER_RES   240

LVGL SDL2 display vertical resolution.

Definition at line 53 of file lv_drv_conf.h.

◆ SDL_ZOOM

#define SDL_ZOOM   1

Enable Scale window by this factor (useful when simulating small screens)

Definition at line 67 of file lv_drv_conf.h.

◆ USE_SDL

#define USE_SDL   IS_USED(MODULE_LV_DRIVERS_SDL)

LVGL Drivers SDL2 configuration headers.

Note
Based on upstream lv_drv_conf_template.h.
Author
Francisco Molina franc.nosp@m.ois-.nosp@m.xavie.nosp@m.r.mo.nosp@m.lina@.nosp@m.inri.nosp@m.a.fr

Internal flag to enable LVGL SDL2 based drivers for display, mouse, mousewheel and keyboard

Definition at line 42 of file lv_drv_conf.h.