/**
* @file lv_conf.h
* Configuration file for v9.0.0
*/
/*
* Copy this file as `lv_conf.h`
* 1. simply next to the `lvgl` folder
* 2. or any other places and
* - define `LV_CONF_INCLUDE_SIMPLE`
* - add the path as include path
*/
/*
*将此文件复制为' lv_conf.h '
* 1.就在“lvgl”文件夹旁边
* 2.或者其他地方
* -定义“LV_CONF_INCLUDE_SIMPLE”
* -添加路径作为包含路径
*/
/* clang-format off */
#if 1 /*Set it to "1" to enable content*/
#ifndef LV_CONF_H
#define LV_CONF_H
/*====================
COLOR SETTINGS
*====================*/
/*Color depth: 8 (A8), 16 (RGB565), 24 (RGB888), 32 (XRGB8888)*/
#define LV_COLOR_DEPTH 16
/*=========================
STDLIB WRAPPER SETTINGS
标准库包装器设置
*=========================*/
/* Possible values
* - LV_STDLIB_BUILTIN: LVGL's built in implementation
* - LV_STDLIB_CLIB: Standard C functions, like malloc, strlen, etc
* - LV_STDLIB_MICROPYTHON: MicroPython implementation
* - LV_STDLIB_RTTHREAD: RT-Thread implementation
* - LV_STDLIB_CUSTOM: Implement the functions externally
*/
/*可能的值
* - LV_STDLIB_BUILTIN: LVGL的内置实现
* - LV_STDLIB_CLIB:标准C函数,如malloc, strlen等
* - LV_STDLIB_MICROPYTHON: MicroPython实现
* - LV_STDLIB_RTTHREAD: RT-Thread实现
* - LV_STDLIB_CUSTOM:外部实现
*/
#define LV_USE_STDLIB_MALLOC LV_STDLIB_BUILTIN
#define LV_USE_STDLIB_STRING LV_STDLIB_BUILTIN
#define LV_USE_STDLIB_SPRINTF LV_STDLIB_BUILTIN
#if LV_USE_STDLIB_MALLOC == LV_STDLIB_BUILTIN
/*Size of the memory available for `lv_malloc()` in bytes (>= 2kB)*/
//' lv_malloc() '的可用内存扩大小(以字节为单位)
#define LV_MEM_SIZE (64 * 1024U) /*[bytes]*/
/*Size of the memory expand for `lv_malloc()` in bytes*/
//' lv_malloc() '的内存扩展大小(以字节为单位)
#define LV_MEM_POOL_EXPAND_SIZE 0
/*Set an address for the memory pool instead of allocating it as a normal array. Can be in external SRAM too.*/
//为内存池设置地址,而不是将其作为普通数组分配。也可以在外部SRAM。
#define LV_MEM_ADR 0 /*0: unused*/
/*Instead of an address give a memory allocator that will be called to get a memory pool for LVGL. E.g. my_malloc*/
//而不是地址,给出一个内存分配器,它将被调用以获取LVGL的内存池。例如my_malloc
#if LV_MEM_ADR == 0
#undef LV_MEM_POOL_INCLUDE
#undef LV_MEM_POOL_ALLOC
#endif
#endif /*LV_USE_MALLOC == LV_STDLIB_BUILTIN*/
/*====================
HAL SETTINGS
*====================*/
/*Default display refresh, input device read and animation step period.*/
//默认显示刷新,输入设备读取和动画步长周期。
#define LV_DEF_REFR_PERIOD 33 /*[ms]*/
/*Default Dot Per Inch. Used to initialize default sizes such as widgets sized, style paddings.
*(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
*========================*/
/*Align the stride of all layers and images to this bytes*/
/*将所有图层和图像的步幅对齐到这个字节*/
#define LV_DRAW_BUF_STRIDE_ALIGN 1
/*Align the start address of draw_buf addresses to this bytes*/
/*将draw_buf地址的起始地址与这个字节对齐*/
#define LV_DRAW_BUF_ALIGN 4
#define LV_USE_DRAW_SW 1
#if LV_USE_DRAW_SW == 1
/* Set the number of draw unit.
* > 1 requires an operating system enabled in `LV_USE_OS`
* > 1 means multiply threads will render the screen in parallel */
/*设置绘制单元的数量。
* > 1需要在“LV_USE_OS”中启用操作系统
* > 1表示多个线程将并行渲染屏幕*/
#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. */
/*如果一个小部件有' style_opa < 255 '(不是' bg_opa ', ' text_opa '等)或不是正常混合模式
*在渲染之前,它被缓冲到一个“简单”层。小部件可以被缓冲成更小的块。
*“转换图层”(如果“transform_angle/zoom”设置)使用更大的缓冲区
*并且不能以块的形式绘制。* /
/*The target buffer size for simple layer chunks.*/
/*简单层块的目标缓冲区大小*/
#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 */
/* 0:使用一个简单的渲染器,只能绘制简单的矩形,渐变,图像,文本和直线
* 1:使用能够绘制圆角,阴影,斜线和弧线的复杂渲染器*/
#define LV_DRAW_SW_COMPLEX 1
#if LV_DRAW_SW_COMPLEX == 1
/*Allow buffering some shadow calculation.
*LV_DRAW_SW_SHADOW_CACHE_SIZE is the max. shadow size to buffer, where shadow size is `shadow_width + radius`
*Caching has LV_DRAW_SW_SHADOW_CACHE_SIZE^2 RAM cost*/
/*允许缓冲一些阴影计算。
*LV_DRAW_SW_SHADOW_CACHE_SIZE是最大值。阴影大小为缓冲区,其中阴影大小为' shadow_width + radius '
*缓存有LV_DRAW_SW_SHADOW_CACHE_SIZE^2内存成本*/
#define LV_DRAW_SW_SHADOW_CACHE_SIZE 0
/* Set number of maximally cached circle data.
* The circumference of 1/4 circle are saved for anti-aliasing
* radius * 4 bytes are used per circle (the most often used radiuses are saved)
* 0: to disable caching */
/*设置循环数据的最大缓存数。
*保存1/4圆的圆周,用于抗混叠
*半径*每个圆使用4个字节(保存最常用的半径)
* 0:禁用缓存*/
#define LV_DRAW_SW_CIRCLE_CACHE_SIZE 4
#endif
#define LV_USE_DRAW_SW_ASM LV_DRAW_SW_ASM_NONE
#if LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_CUSTOM
#define LV_DRAW_SW_ASM_CUSTOM_INCLUDE ""
#endif
#endif
/* 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. */
/*在屏幕尺寸> 352像素时,建议启用位元质量退化解决方案。*/
#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. */
/*启用VGLite异步绘制。将多个任务排队,并将它们一次闪给GPU。*/
#define LV_USE_VGLITE_DRAW_ASYNC 1
#endif
/* Enable VGLite asserts. */
/*启用VGLite断言。*/
#define LV_USE_VGLITE_ASSERT 0
#endif
/* Use NXP's PXP on iMX RTxxx platforms. */
/*在iMX RTxxx平台上使用NXP的PXP。*/
#define LV_USE_DRAW_PXP 0
#if LV_USE_DRAW_PXP
/* Enable PXP asserts. */
/*启用PXP断言。*/
#define LV_USE_PXP_ASSERT 0
#endif
/* Use Renesas Dave2D on RA platforms. */
/*在RA平台上使用Dave2D。*/
#define LV_USE_DRAW_DAVE2D 0
/* Draw using cached SDL textures*/
/*使用缓存的SDL纹理绘制*/
#define LV_USE_DRAW_SDL 0
/* Use VG-Lite GPU. */
#define LV_USE_DRAW_VG_LITE 0
#if LV_USE_DRAW_VG_LITE
/* Enable VG-Lite custom external 'gpu_init()' function */
/*启用VG-Lite自定义外部'gpu_init()'函数*/
#define LV_VG_LITE_USE_GPU_INIT 0
/* Enable VG-Lite assert. */
#define LV_VG_LITE_USE_ASSERT 0
#endif
/*=======================
* FEATURE CONFIGURATION
*=======================*/
/*-------------
* Logging
*-----------*/
/*Enable the log module*/
#define LV_USE_LOG 0
#if LV_USE_LOG
/*How important log should be added:
*LV_LOG_LEVEL_TRACE A lot of logs to give detailed information
*LV_LOG_LEVEL_INFO Log important events
*LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't cause a problem
*LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail
*LV_LOG_LEVEL_USER Only logs added by the user
*LV_LOG_LEVEL_NONE Do not log anything*/
#define LV_LOG_LEVEL LV_LOG_LEVEL_WARN
/*1: Print the log with 'printf';
*0: User need to register a callback with `lv_log_register_print_cb()`*/
#define LV_LOG_PRINTF 0
/*1: Enable print timestamp 时间戳;
*0: Disable print timestamp 时间戳*/
#define LV_LOG_USE_TIMESTAMP 1
/*1: Print file and line number of the log;
*0: Do not print file and line number of the log*/
#define LV_LOG_USE_FILE_LINE 1
/*Enable/disable LV_LOG_TRACE in modules that produces a huge number of logs*/
#define LV_LOG_TRACE_MEM 1
#define LV_LOG_TRACE_TIMER 1
#define LV_LOG_TRACE_INDEV 1
#define LV_LOG_TRACE_DISP_REFR 1
#define LV_LOG_TRACE_EVENT 1
#define LV_LOG_TRACE_OBJ_CREATE 1
#define LV_LOG_TRACE_LAYOUT 1
#define LV_LOG_TRACE_ANIM 1
#define
lvgl_conf.h
于 2024-02-03 17:58:39 首次发布