LittlevGL Drivers

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

Detailed Description

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

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)
 LittlevGL Drivers SDL2 configuration headers. More...
 
#define SDL_HOR_RES   320
 LittlevGL SDL2 display horizontal resolution.
 
#define SDL_VER_RES   240
 LittlevGL SDL2 display vertical resolution.
 
#define LV_HOR_RES   SDL_HOR_RES
 LittlevGL display horizontal resolution.
 
#define LV_VER_RES   SDL_VER_RES
 LittlevGL 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. More...
 
#define SDL_DUAL_DISPLAY   0
 Open two windows to test multi display support.
 

Macro Definition Documentation

◆ 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.

◆ USE_SDL

#define USE_SDL   IS_USED(MODULE_LV_DRIVERS_SDL)

LittlevGL 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 LittlevGL SDL2 based drivers for display, mouse, mousewheel and keyboard

Definition at line 42 of file lv_drv_conf.h.