diff --git a/env_support/cmsis-pack/LVGL.lvgl.1.0.5-alpha1.pack b/env_support/cmsis-pack/LVGL.lvgl.1.0.5.pack similarity index 94% rename from env_support/cmsis-pack/LVGL.lvgl.1.0.5-alpha1.pack rename to env_support/cmsis-pack/LVGL.lvgl.1.0.5.pack index d8c42ef41d..cfe729f983 100644 Binary files a/env_support/cmsis-pack/LVGL.lvgl.1.0.5-alpha1.pack and b/env_support/cmsis-pack/LVGL.lvgl.1.0.5.pack differ diff --git a/env_support/cmsis-pack/LVGL.lvgl.pdsc b/env_support/cmsis-pack/LVGL.lvgl.pdsc index 4fe8729dbc..39a24ced23 100644 --- a/env_support/cmsis-pack/LVGL.lvgl.pdsc +++ b/env_support/cmsis-pack/LVGL.lvgl.pdsc @@ -36,9 +36,12 @@ https://github.com/lvgl/lvgl.git - + - LVGL 8.3.0-dev - Monthly update for June + - Add Pinyin as input method + - Update benchmark to support RGB565-A8 + - Update support for layers - LVGL 8.3.0-dev @@ -209,6 +212,7 @@ + @@ -225,11 +229,13 @@ + + @@ -311,7 +317,7 @@ - + @@ -322,6 +328,7 @@ /*! \brief use lv_config_cmsis.h which will be pre-included */ #define LV_CONF_SKIP +#define LV_LVGL_H_INCLUDE_SIMPLE 1 @@ -603,6 +610,21 @@ + + Add Pinyin input method + + + + + + + +/*! \brief enable ffmpeg support */ +#define LV_USE_IME_PINYIN 1 + + + + Add the official benchmark. @@ -615,6 +637,8 @@ + + diff --git a/env_support/cmsis-pack/LVGL.pidx b/env_support/cmsis-pack/LVGL.pidx index 05e9755179..b0405b762b 100644 --- a/env_support/cmsis-pack/LVGL.pidx +++ b/env_support/cmsis-pack/LVGL.pidx @@ -2,8 +2,8 @@ LVGL https://raw.githubusercontent.com/lvgl/lvgl/master/env_support/cmsis-pack/ - 2022-06-13T00:17:59 + 2022-06-29T00:23:55 - + \ No newline at end of file diff --git a/env_support/cmsis-pack/README.md b/env_support/cmsis-pack/README.md index 2d476463a3..5a73e4e6b8 100644 --- a/env_support/cmsis-pack/README.md +++ b/env_support/cmsis-pack/README.md @@ -45,6 +45,7 @@ remove the misleading guide above this code segment. - LV_USE_GPU_NXP_VG_LITE - LV_USE_GPU_SWM341_DMA2D - LV_USE_GPU_ARM2D + - LV_USE_IME_PINYIN 5. Update macro `LV_ATTRIBUTE_MEM_ALIGN` and `LV_ATTRIBUTE_MEM_ALIGN_SIZE` to force a WORD alignment. ```c #define LV_ATTRIBUTE_MEM_ALIGN_SIZE 4 diff --git a/env_support/cmsis-pack/lv_conf_cmsis.h b/env_support/cmsis-pack/lv_conf_cmsis.h index 0a7d46503f..ea2e94faef 100644 --- a/env_support/cmsis-pack/lv_conf_cmsis.h +++ b/env_support/cmsis-pack/lv_conf_cmsis.h @@ -132,8 +132,6 @@ * and blend it as an image with the given opacity. * Note that `bg_opa`, `text_opa` etc don't require buffering into layer) * The widget can be buffered in smaller chunks to avoid using large buffers. - * `draw_area` (`lv_area_t` meaning the area to draw and `px_size` (size of a pixel in bytes) - * can be used the set the buffer size adaptively. * * - LV_LAYER_SIMPLE_BUF_SIZE: [bytes] the optimal target buffer size. LVGL will try to allocate it * - LV_LAYER_SIMPLE_FALLBACK_BUF_SIZE: [bytes] used if `LV_LAYER_SIMPLE_BUF_SIZE` couldn't be allocated. @@ -143,7 +141,7 @@ * and can't be drawn in chunks. So these settings affects only widgets with opacity. */ #define LV_LAYER_SIMPLE_BUF_SIZE (24 * 1024) -#define LV_LAYER_SIMPLE_FALLBACK_BUF_SIZE LV_MAX(lv_area_get_width(&draw_area) * px_size, 2048) +#define LV_LAYER_SIMPLE_FALLBACK_BUF_SIZE (3 * 1024) /*Default image cache size. Image caching keeps the images opened. *If only the built-in image formats are used there is no real advantage of caching. (I.e. if no new image decoder is added) @@ -616,6 +614,17 @@ /*1: Enable a published subscriber based messaging system */ #define LV_USE_MSG 0 +/*1: Enable Pinyin input method*/ +/*Requires: lv_keyboard*/ +#if LV_USE_IME_PINYIN + /*1: Use default thesaurus*/ + /*If you do not use the default thesaurus, be sure to use `lv_ime_pinyin` after setting the thesauruss*/ + #define LV_IME_PINYIN_USE_DEFAULT_DICT 1 + /*Set the maximum number of candidate panels that can be displayed*/ + /*This needs to be adjusted according to the size of the screen*/ + #define LV_IME_PINYIN_CAND_TEXT_NUM 6 +#endif + /*================== * EXAMPLES *==================*/ diff --git a/examples/porting/lv_port_disp_template.c b/examples/porting/lv_port_disp_template.c index 7921666859..db943faed6 100644 --- a/examples/porting/lv_port_disp_template.c +++ b/examples/porting/lv_port_disp_template.c @@ -10,7 +10,6 @@ * INCLUDES *********************/ #include "lv_port_disp_template.h" -#include "../../lvgl.h" #include /********************* @@ -121,7 +120,7 @@ void lv_port_disp_init(void) disp_drv.draw_buf = &draw_buf_dsc_1; /*Required for Example 3)*/ - //disp_drv.full_refresh = 1 + //disp_drv.full_refresh = 1; /* Fill a memory array with a color if you have GPU. * Note that, in lv_conf.h you can enable GPUs that has built-in support in LVGL. diff --git a/examples/porting/lv_port_disp_template.h b/examples/porting/lv_port_disp_template.h index a154db67d3..b3328d5e4d 100644 --- a/examples/porting/lv_port_disp_template.h +++ b/examples/porting/lv_port_disp_template.h @@ -16,7 +16,11 @@ extern "C" { /********************* * INCLUDES *********************/ +#if defined(LV_LVGL_H_INCLUDE_SIMPLE) +#include "lvgl.h" +#else #include "lvgl/lvgl.h" +#endif /********************* * DEFINES diff --git a/src/draw/arm2d/lv_gpu_arm2d.c b/src/draw/arm2d/lv_gpu_arm2d.c index 96599436e5..7777fe21b4 100644 --- a/src/draw/arm2d/lv_gpu_arm2d.c +++ b/src/draw/arm2d/lv_gpu_arm2d.c @@ -1335,6 +1335,28 @@ static void convert_cb(const lv_area_t * dest_area, const void * src_buf, lv_coo src_tmp8 += src_new_line_step_byte; } } + else if(cf == LV_IMG_CF_RGB565A8) { + src_tmp8 += (src_stride * dest_area->y1 * sizeof(lv_color_t)) + dest_area->x1 * sizeof(lv_color_t); + + lv_coord_t src_stride_byte = src_stride * sizeof(lv_color_t); + + lv_coord_t dest_h = lv_area_get_height(dest_area); + lv_coord_t dest_w = lv_area_get_width(dest_area); + for(y = 0; y < dest_h; y++) { + lv_memcpy(cbuf, src_tmp8, dest_w * sizeof(lv_color_t)); + cbuf += dest_w; + src_tmp8 += src_stride_byte; + } + + src_tmp8 = (const uint8_t *)src_buf; + src_tmp8 += sizeof(lv_color_t) * src_w * src_h; + src_tmp8 += src_stride * dest_area->y1 + dest_area->x1; + for(y = 0; y < dest_h; y++) { + lv_memcpy(abuf, src_tmp8, dest_w); + abuf += dest_w; + src_tmp8 += src_stride; + } + } } #if 0