Skip to content

Commit

Permalink
Update LVGL config
Browse files Browse the repository at this point in the history
  • Loading branch information
PGNetHun committed Jan 18, 2024
1 parent f11cb89 commit 5e1f94e
Showing 1 changed file with 96 additions and 72 deletions.
168 changes: 96 additions & 72 deletions lv_conf.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @file lv_conf.h
* Configuration file for v9.0.0-dev
* Configuration file for v9.0.0-rc
*/

/*
Expand All @@ -17,11 +17,6 @@
#ifndef LV_CONF_H
#define LV_CONF_H

/*=======================
* Development version!
* ======================*/
#define LV_USE_DEV_VERSION 1

/*====================
COLOR SETTINGS
*====================*/
Expand Down Expand Up @@ -72,6 +67,23 @@
*(Not so important, you can adjust it to modify default sizes and spaces)*/
#define LV_DPI_DEF 130 /*[px/inch]*/

/*=================
* OPERATING SYSTEM
*=================*/
/*Select an operating system to use. Possible options:
* - LV_OS_NONE
* - LV_OS_PTHREAD
* - LV_OS_FREERTOS
* - LV_OS_CMSIS_RTOS2
* - LV_OS_RTTHREAD
* - LV_OS_WINDOWS
* - LV_OS_CUSTOM */
#define LV_USE_OS LV_OS_NONE

#if LV_USE_OS == LV_OS_CUSTOM
#define LV_OS_CUSTOM_INCLUDE <stdint.h>
#endif

/*========================
* RENDERING CONFIGURATION
*========================*/
Expand All @@ -89,13 +101,16 @@
* > 1 means multiply threads will render the screen in parallel */
#define LV_DRAW_SW_DRAW_UNIT_CNT 1

/* Use Arm-2D to accelerate the sw render */
#define LV_USE_DRAW_ARM2D_SYNC 0

/* If a widget has `style_opa < 255` (not `bg_opa`, `text_opa` etc) or not NORMAL blend mode
* it is buffered into a "simple" layer before rendering. The widget can be buffered in smaller chunks.
* "Transformed layers" (if `transform_angle/zoom` are set) use larger buffers
* and can't be drawn in chunks. */

/*The target buffer size for simple layer chunks.*/
#define LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE (24 * 1024) /*[bytes]*/
#define LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE (24 * 1024) /*[bytes]*/

/* 0: use a simple renderer capable of drawing only simple rectangles with gradient, images, texts, and straight lines only
* 1: use a complex renderer capable of drawing rounded corners, shadow, skew lines, and arcs too */
Expand All @@ -121,15 +136,30 @@
#endif
#endif

/* Use Arm-2D on Cortex-M based devices. Please only enable it for Helium Powered devices for now */
#define LV_USE_DRAW_ARM2D 0

/* Use NXP's VG-Lite GPU on iMX RTxxx platforms. */
#define LV_USE_DRAW_VGLITE 0

#if LV_USE_DRAW_VGLITE
/* Enable blit quality degradation workaround recommended for screen's dimension > 352 pixels. */
#define LV_USE_VGLITE_BLIT_SPLIT 0

#if LV_USE_OS
/* Enable VGLite draw async. Queue multiple tasks and flash them once to the GPU. */
#define LV_USE_VGLITE_DRAW_ASYNC 1
#endif

/* Enable VGLite asserts. */
#define LV_USE_VGLITE_ASSERT 0
#endif

/* Use NXP's PXP on iMX RTxxx platforms. */
#define LV_USE_DRAW_PXP 0

#if LV_USE_DRAW_PXP
/* Enable PXP asserts. */
#define LV_USE_PXP_ASSERT 0
#endif

/* Use Renesas Dave2D on RA platforms. */
#define LV_USE_DRAW_DAVE2D 0

Expand All @@ -140,38 +170,12 @@
#define LV_USE_DRAW_VG_LITE 0

#if LV_USE_DRAW_VG_LITE
/* Enbale VG-Lite custom external 'gpu_init()' function */
/* Enable VG-Lite custom external 'gpu_init()' function */
#define LV_VG_LITE_USE_GPU_INIT 0

/* Enable VG-Lite assert. */
#define LV_VG_LITE_USE_ASSERT 0

/* Simulate VG-Lite hardware using ThorVG */
#define LV_USE_VG_LITE_THORVG 0

/* Enable trace log for VG-Lite simulator*/
#define LV_VG_LITE_THORVG_TRACE_API 0

/*Enable YUV support for VG-Lite simulator*/
#define LV_VG_LITE_THORVG_YUV_SUPPORT 0

#endif

/*=================
* OPERATING SYSTEM
*=================*/
/*Select an operating system to use. Possible options:
* - LV_OS_NONE
* - LV_OS_PTHREAD
* - LV_OS_FREERTOS
* - LV_OS_CMSIS_RTOS2
* - LV_OS_RTTHREAD
* - LV_OS_WINDOWS
* - LV_OS_CUSTOM */
#define LV_USE_OS LV_OS_NONE

#if LV_USE_OS == LV_OS_CUSTOM
#define LV_OS_CUSTOM_INCLUDE <stdint.h>
#endif

/*=======================
Expand Down Expand Up @@ -251,36 +255,10 @@
*For layers add the index number of the draw unit on black background.*/
#define LV_USE_PARALLEL_DRAW_DEBUG 0

/*------------------
* STATUS MONITORING
*------------------*/

/*1: Show CPU usage and FPS count
* Requires `LV_USE_SYSMON = 1`*/
#define LV_USE_PERF_MONITOR 0
#if LV_USE_PERF_MONITOR
#define LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_RIGHT

/*0: Displays performance data on the screen, 1: Prints performance data using log.*/
#define LV_USE_PERF_MONITOR_LOG_MODE 0
#endif

/*1: Show the used memory and the memory fragmentation
* Requires `LV_USE_BUILTIN_MALLOC = 1`
* Requires `LV_USE_SYSMON = 1`*/
#define LV_USE_MEM_MONITOR 0
#if LV_USE_MEM_MONITOR
#define LV_USE_MEM_MONITOR_POS LV_ALIGN_BOTTOM_LEFT
#endif

/*-------------
* Others
*-----------*/

/*Maximum buffer size to allocate for rotation.
*Only used if software rotation is enabled in the display driver.*/
#define LV_DISPLAY_ROT_MAX_BUF (10*1024)

/*Garbage Collector settings
*Used if LVGL is bound to higher level language and the memory is managed by that language*/
extern void mp_lv_init_gc();
Expand Down Expand Up @@ -322,6 +300,26 @@ extern void mp_lv_init_gc();
/*Use obj property set/get API*/
#define LV_USE_OBJ_PROPERTY 0

/* VG-Lite Simulator */
/*Requires: LV_USE_THORVG_INTERNAL or LV_USE_THORVG_EXTERNAL */
#define LV_USE_VG_LITE_THORVG 0

#if LV_USE_VG_LITE_THORVG

/*Enable LVGL's blend mode support*/
#define LV_VG_LITE_THORVG_LVGL_BLEND_SUPPORT 0

/*Enable YUV color format support*/
#define LV_VG_LITE_THORVG_YUV_SUPPORT 0

/*Enable 16 pixels alignment*/
#define LV_VG_LITE_THORVG_16PIXELS_ALIGN 1

/*Enable multi-thread render*/
#define LV_VG_LITE_THORVG_THREAD_RENDER 0

#endif

/*=====================
* COMPILER SETTINGS
*====================*/
Expand Down Expand Up @@ -394,7 +392,7 @@ extern void mp_lv_init_gc();

/*Demonstrate special features*/
#define LV_FONT_MONTSERRAT_28_COMPRESSED 0 /*bpp = 3*/
#define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 1 /*Hebrew, Arabic, Persian letters and all their forms*/
#define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 0 /*Hebrew, Arabic, Persian letters and all their forms*/
#define LV_FONT_SIMSUN_16_CJK 0 /*1000 most common CJK radicals*/

/*Pixel perfect monospace fonts*/
Expand Down Expand Up @@ -744,7 +742,29 @@ extern void mp_lv_init_gc();
#define LV_USE_SNAPSHOT 1

/*1: Enable system monitor component*/
#define LV_USE_SYSMON (LV_USE_MEM_MONITOR | LV_USE_PERF_MONITOR)
#define LV_USE_SYSMON 0

#if LV_USE_SYSMON

/*1: Show CPU usage and FPS count
* Requires `LV_USE_SYSMON = 1`*/
#define LV_USE_PERF_MONITOR 0
#if LV_USE_PERF_MONITOR
#define LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_RIGHT

/*0: Displays performance data on the screen, 1: Prints performance data using log.*/
#define LV_USE_PERF_MONITOR_LOG_MODE 0
#endif

/*1: Show the used memory and the memory fragmentation
* Requires `LV_USE_BUILTIN_MALLOC = 1`
* Requires `LV_USE_SYSMON = 1`*/
#define LV_USE_MEM_MONITOR 0
#if LV_USE_MEM_MONITOR
#define LV_USE_MEM_MONITOR_POS LV_ALIGN_BOTTOM_LEFT
#endif

#endif /*LV_USE_SYSMON*/

/*1: Enable the runtime performance profiler*/
#define LV_USE_PROFILER 0
Expand Down Expand Up @@ -783,13 +803,6 @@ extern void mp_lv_init_gc();

/*1: Support using images as font in label or span widgets */
#define LV_USE_IMGFONT 1
#if LV_USE_IMGFONT
/*Imgfont image file path maximum length*/
#define LV_IMGFONT_PATH_MAX_LEN 64

/*1: Use img cache to buffer header information*/
#define LV_IMGFONT_USE_IMAGE_CACHE_HEADER 0
#endif

/*1: Enable an observer pattern implementation*/
#define LV_USE_OBSERVER 1
Expand Down Expand Up @@ -894,6 +907,17 @@ extern void mp_lv_init_gc();
/*Driver for evdev input devices*/
#define LV_USE_EVDEV 0

/*Drivers for LCD devices connected via SPI/parallel port*/
#define LV_USE_ST7735 0
#define LV_USE_ST7789 0
#define LV_USE_ST7796 0
#define LV_USE_ILI9341 0

#define LV_USE_GENERIC_MIPI (LV_USE_ST7735 | LV_USE_ST7789 | LV_USE_ST7796 | LV_USE_ILI9341)

/* LVGL Windows backend */
#define LV_USE_WINDOWS 0

/*==================
* EXAMPLES
*==================*/
Expand Down

0 comments on commit 5e1f94e

Please sign in to comment.