Skip to content

Commit

Permalink
Merge pull request #42 from 100askTeam/update_submodule
Browse files Browse the repository at this point in the history
feat: update to v9.1.0
Note: Project(Code::blocks) configuration using c17(-std=c17).
  • Loading branch information
100ask authored Apr 5, 2024
2 parents d5afb31 + ddfb9f8 commit 649170c
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 37 deletions.
86 changes: 60 additions & 26 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
* Configuration file for v9.1.0
*/

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

/*If you need to include anything here, do it inside the `__ASSEMBLY__` guard */
#if 0 && defined(__ASSEMBLY__)
#include "my_include.h"
#endif

/*====================
COLOR SETTINGS
*====================*/
Expand Down Expand Up @@ -94,6 +99,14 @@
/*Align the start address of draw_buf addresses to this bytes*/
#define LV_DRAW_BUF_ALIGN 4

/* 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_LAYER_SIMPLE_BUF_SIZE (24 * 1024) /*[bytes]*/

#define LV_USE_DRAW_SW 1
#if LV_USE_DRAW_SW == 1
/* Set the number of draw unit.
Expand All @@ -104,13 +117,8 @@
/* 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]*/
/* Enable native helium assembly to be compiled */
#define LV_USE_NATIVE_HELIUM_ASM 0

/* 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 Down Expand Up @@ -176,6 +184,19 @@
/* Enable VG-Lite assert. */
#define LV_VG_LITE_USE_ASSERT 0

/* VG-Lite flush commit trigger threshold. GPU will try to batch these many draw tasks. */
#define LV_VG_LITE_FLUSH_MAX_COUNT 8

/* Enable border to simulate shadow
* NOTE: which usually improves performance,
* but does not guarantee the same rendering quality as the software. */
#define LV_VG_LITE_USE_BOX_SHADOW 0

/* VG-Lite gradient image maximum cache number.
* NOTE: The memory usage of a single gradient image is 4K bytes.
*/
#define LV_VG_LITE_GRAD_CACHE_SIZE 32

#endif

/*=======================
Expand Down Expand Up @@ -310,6 +331,9 @@
/*Enable 16 pixels alignment*/
#define LV_VG_LITE_THORVG_16PIXELS_ALIGN 1

/*Buffer address alignment*/
#define LV_VG_LITE_THORVG_BUF_ADDR_ALIGN 64

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

Expand Down Expand Up @@ -627,6 +651,12 @@
#define LV_FS_MEMFS_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
#endif

/*API for LittleFs. */
#define LV_USE_FS_LITTLEFS 0
#if LV_USE_FS_LITTLEFS
#define LV_FS_LITTLEFS_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
#endif

/*LODEPNG decoder library*/
#define LV_USE_LODEPNG 0

Expand Down Expand Up @@ -667,16 +697,11 @@
/*FreeType library*/
#define LV_USE_FREETYPE 0
#if LV_USE_FREETYPE
/*Memory used by FreeType to cache characters in kilobytes*/
#define LV_FREETYPE_CACHE_SIZE 768

/*Let FreeType to use LVGL memory and file porting*/
#define LV_FREETYPE_USE_LVGL_PORT 0

/* Maximum number of opened FT_Face/FT_Size objects managed by this cache instance. */
/* (0:use system defaults) */
#define LV_FREETYPE_CACHE_FT_FACES 8
#define LV_FREETYPE_CACHE_FT_SIZES 8
/*Cache count of the glyphs in FreeType. It means the number of glyphs that can be cached.
*The higher the value, the more memory will be used.*/
#define LV_FREETYPE_CACHE_FT_GLYPH_CNT 256
#endif

Expand All @@ -699,9 +724,6 @@
/* Enable ThorVG by assuming that its installed and linked to the project */
#define LV_USE_THORVG_EXTERNAL 0

/*Enable LZ4 compress/decompress lib*/
#define LV_USE_LZ4 0

/*Use lvgl built-in LZ4 lib*/
#define LV_USE_LZ4_INTERNAL 0

Expand Down Expand Up @@ -826,11 +848,12 @@
/*Use SDL to open window on PC and handle mouse and keyboard*/
#define LV_USE_SDL 0
#if LV_USE_SDL
#define LV_SDL_INCLUDE_PATH <SDL2/SDL.h>
#define LV_SDL_RENDER_MODE LV_DISPLAY_RENDER_MODE_DIRECT /*LV_DISPLAY_RENDER_MODE_DIRECT is recommended for best performance*/
#define LV_SDL_BUF_COUNT 1 /*1 or 2*/
#define LV_SDL_FULLSCREEN 0 /*1: Make the window full screen by default*/
#define LV_SDL_DIRECT_EXIT 1 /*1: Exit the application when all SDL windows are closed*/
#define LV_SDL_INCLUDE_PATH <SDL2/SDL.h>
#define LV_SDL_RENDER_MODE LV_DISPLAY_RENDER_MODE_DIRECT /*LV_DISPLAY_RENDER_MODE_DIRECT is recommended for best performance*/
#define LV_SDL_BUF_COUNT 1 /*1 or 2*/
#define LV_SDL_FULLSCREEN 0 /*1: Make the window full screen by default*/
#define LV_SDL_DIRECT_EXIT 1 /*1: Exit the application when all SDL windows are closed*/
#define LV_SDL_MOUSEWHEEL_MODE LV_SDL_MOUSEWHEEL_MODE_ENCODER /*LV_SDL_MOUSEWHEEL_MODE_ENCODER/CROWN*/
#endif

/*Use X11 to open window on Linux desktop and handle mouse and keyboard*/
Expand Down Expand Up @@ -883,6 +906,20 @@
/*Driver for evdev input devices*/
#define LV_USE_EVDEV 0

/*Driver for libinput input devices*/
#define LV_USE_LIBINPUT 0

#if LV_USE_LIBINPUT
#define LV_LIBINPUT_BSD 0

/*Full keyboard support*/
#define LV_LIBINPUT_XKB 0
#if LV_LIBINPUT_XKB
/*"setxkbmap -query" can help find the right values for your keyboard*/
#define LV_LIBINPUT_XKB_KEY_MAP { .rules = NULL, .model = "pc101", .layout = "us", .variant = NULL, .options = NULL }
#endif
#endif

/*Drivers for LCD devices connected via SPI/parallel port*/
#define LV_USE_ST7735 0
#define LV_USE_ST7789 0
Expand All @@ -907,9 +944,6 @@

/*Show some widget. It might be required to increase `LV_MEM_SIZE` */
#define LV_USE_DEMO_WIDGETS 1
#if LV_USE_DEMO_WIDGETS
#define LV_DEMO_WIDGETS_SLIDESHOW 0
#endif

/*Demonstrate the usage of encoder and keyboard*/
#define LV_USE_DEMO_KEYPAD_AND_ENCODER 0
Expand Down
2 changes: 1 addition & 1 deletion lvgl
Submodule lvgl updated 734 files
37 changes: 30 additions & 7 deletions lvgl.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<Option type="0" />
<Option compiler="gcc" />
<Compiler>
<Add option="-std=c99" />
<Add option="-std=c17" />
<Add option="-g" />
<Add option="-DWINVER=0x0601" />
<Add option="-DWIN32" />
Expand Down Expand Up @@ -419,6 +419,8 @@
<Option compilerVar="CC" />
</Unit>
<Unit filename="lvgl/demos/widgets/lv_demo_widgets.h" />
<Unit filename="lvgl/lv_conf_template.h" />
<Unit filename="lvgl/lvgl.h" />
<Unit filename="lvgl/src/core/lv_global.h" />
<Unit filename="lvgl/src/core/lv_group.c">
<Option compilerVar="CC" />
Expand Down Expand Up @@ -516,14 +518,11 @@
<Option compilerVar="CC" />
</Unit>
<Unit filename="lvgl/src/draw/lv_draw_vector.h" />
<Unit filename="lvgl/src/draw/lv_image_buf.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="lvgl/src/draw/lv_image_buf.h" />
<Unit filename="lvgl/src/draw/lv_image_decoder.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="lvgl/src/draw/lv_image_decoder.h" />
<Unit filename="lvgl/src/draw/lv_image_dsc.h" />
<Unit filename="lvgl/src/draw/nxp/pxp/lv_draw_buf_pxp.c">
<Option compilerVar="CC" />
</Unit>
Expand Down Expand Up @@ -638,7 +637,7 @@
<Unit filename="lvgl/src/draw/sw/arm2d/lv_draw_sw_arm2d.h" />
<Unit filename="lvgl/src/draw/sw/arm2d/lv_draw_sw_helium.h" />
<Unit filename="lvgl/src/draw/sw/blend/arm2d/lv_blend_arm2d.h" />
<Unit filename="lvgl/src/draw/sw/blend/arm2d/lv_blend_helium.h" />
<Unit filename="lvgl/src/draw/sw/blend/helium/lv_blend_helium.h" />
<Unit filename="lvgl/src/draw/sw/blend/lv_draw_sw_blend.c">
<Option compilerVar="CC" />
</Unit>
Expand Down Expand Up @@ -746,6 +745,10 @@
<Option compilerVar="CC" />
</Unit>
<Unit filename="lvgl/src/draw/vg_lite/lv_vg_lite_decoder.h" />
<Unit filename="lvgl/src/draw/vg_lite/lv_vg_lite_grad.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="lvgl/src/draw/vg_lite/lv_vg_lite_grad.h" />
<Unit filename="lvgl/src/draw/vg_lite/lv_vg_lite_math.c">
<Option compilerVar="CC" />
</Unit>
Expand All @@ -754,6 +757,10 @@
<Option compilerVar="CC" />
</Unit>
<Unit filename="lvgl/src/draw/vg_lite/lv_vg_lite_path.h" />
<Unit filename="lvgl/src/draw/vg_lite/lv_vg_lite_pending.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="lvgl/src/draw/vg_lite/lv_vg_lite_pending.h" />
<Unit filename="lvgl/src/draw/vg_lite/lv_vg_lite_utils.c">
<Option compilerVar="CC" />
</Unit>
Expand Down Expand Up @@ -792,6 +799,14 @@
<Option compilerVar="CC" />
</Unit>
<Unit filename="lvgl/src/drivers/evdev/lv_evdev.h" />
<Unit filename="lvgl/src/drivers/libinput/lv_libinput.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="lvgl/src/drivers/libinput/lv_libinput.h" />
<Unit filename="lvgl/src/drivers/libinput/lv_xkb.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="lvgl/src/drivers/libinput/lv_xkb.h" />
<Unit filename="lvgl/src/drivers/lv_drivers.h" />
<Unit filename="lvgl/src/drivers/nuttx/lv_nuttx_cache.c">
<Option compilerVar="CC" />
Expand All @@ -805,6 +820,10 @@
<Option compilerVar="CC" />
</Unit>
<Unit filename="lvgl/src/drivers/nuttx/lv_nuttx_fbdev.h" />
<Unit filename="lvgl/src/drivers/nuttx/lv_nuttx_image_cache.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="lvgl/src/drivers/nuttx/lv_nuttx_image_cache.h" />
<Unit filename="lvgl/src/drivers/nuttx/lv_nuttx_lcd.c">
<Option compilerVar="CC" />
</Unit>
Expand Down Expand Up @@ -1013,6 +1032,9 @@
<Unit filename="lvgl/src/libs/fsdrv/lv_fs_fatfs.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="lvgl/src/libs/fsdrv/lv_fs_littlefs.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="lvgl/src/libs/fsdrv/lv_fs_memfs.c">
<Option compilerVar="CC" />
</Unit>
Expand Down Expand Up @@ -1156,7 +1178,8 @@
</Unit>
<Unit filename="lvgl/src/libs/tjpgd/tjpgd.h" />
<Unit filename="lvgl/src/libs/tjpgd/tjpgdcnf.h" />
<Unit filename="lvgl/src/lv_api_map.h" />
<Unit filename="lvgl/src/lv_api_map_v8.h" />
<Unit filename="lvgl/src/lv_api_map_v9_0.h" />
<Unit filename="lvgl/src/lv_conf_internal.h" />
<Unit filename="lvgl/src/lv_conf_kconfig.h" />
<Unit filename="lvgl/src/lv_init.c">
Expand Down
24 changes: 22 additions & 2 deletions lvgl.layout
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,32 @@
<ActiveTarget name="Debug" />
<File name="lv_conf.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2592" topLine="25" />
<Cursor1 position="30191" topLine="926" />
</Cursor>
</File>
<File name="lvgl\lv_conf_template.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="562" topLine="9" />
</Cursor>
</File>
<File name="lvgl\lvgl.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="375" topLine="0" />
</Cursor>
</File>
<File name="main.c" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="3" zoom_2="0">
<Cursor>
<Cursor1 position="1102" topLine="14" />
<Cursor1 position="1300" topLine="30" />
</Cursor>
</File>
<File name="lvgl\demos\lv_demos.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1423" topLine="45" />
</Cursor>
</File>
<File name="lvgl\demos\benchmark\lv_demo_benchmark.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="453" topLine="0" />
</Cursor>
</File>
</CodeBlocks_layout_file>
4 changes: 3 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLi
LV_LOG_USER("LVGL initialization completed!");

/*Run the demo*/
lv_demo_widgets();
//lv_demo_widgets();
char * demo_str[] = {"widgets"};
lv_demos_create(demo_str, strlen((char * )demo_str));

while(1) {
/* Periodically call the lv_task handler.
Expand Down

0 comments on commit 649170c

Please sign in to comment.