1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/pkg/lvgl/Makefile.include
Jean Pierre Dudey 7092c455f9 pkg/lvgl: set LVGL thread priority higher than main
Using a lower priority than of the main thread would make
the LVGL thread to preempt the main thread, for example,
if you do a `xtimer_msleep(200);` on the main thread
giving any chance for the LVGL thread to preempt it
while working with LVGL on the main thread would
make the CPU crash.

To reproduce the bug just create various widgets, and fill
them with data from a sensor that "waits" for data to be ready.

Signed-off-by: Jean Pierre Dudey <me@jeandudey.tech>
2020-11-11 09:46:21 +01:00

37 lines
1.1 KiB
Makefile

INCLUDES += -I$(RIOTBASE)/pkg/lvgl/include
INCLUDES += -I$(PKGDIRBASE)
# Don't use relative includes in lvgl
CFLAGS += -DLV_CONF_INCLUDE_SIMPLE
ifneq (,$(filter lvgl_contrib,$(USEMODULE)))
DIRS += $(RIOTBASE)/pkg/lvgl/contrib
endif
# Configuration options
# Graphical settings
LVGL_COLOR_DEPTH ?= 16
LVGL_COLOR_16_SWAP ?= 1
# Memory settings
LVGL_MEM_SIZE ?= 5U*1024U
# Engine settings
LVGL_INACTIVITY_PERIOD_MS ?= 5*MS_PER_SEC # 5s
LVGL_TASK_HANDLER_DELAY_US ?= 5*US_PER_MS # 5ms
LVGL_TASK_THREAD_PRIO ?= THREAD_PRIORITY_MAIN+1
# Set the CFLAGS variable accordingly
CFLAGS += -DLV_COLOR_DEPTH=$(LVGL_COLOR_DEPTH)
CFLAGS += -DLV_COLOR_16_SWAP=$(LVGL_COLOR_16_SWAP)
CFLAGS += -DLV_MEM_SIZE=$(LVGL_MEM_SIZE)
CFLAGS += -DLVGL_INACTIVITY_PERIOD_MS=$(LVGL_INACTIVITY_PERIOD_MS)
CFLAGS += -DLVGL_TASK_HANDLER_DELAY_US=$(LVGL_TASK_HANDLER_DELAY_US)
CFLAGS += -DLVGL_TASK_THREAD_PRIO=$(LVGL_TASK_THREAD_PRIO)
# lvgl module is not a concrete module, so declare it as a pseudomodule
PSEUDOMODULES += lvgl
# touch capabilities are available via a pseudomodule
PSEUDOMODULES += lvgl_contrib_touch