Compare commits
73 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4495f42863 | ||
|
|
b4bdc9e482 | ||
|
|
20ac90dbc2 | ||
|
|
32966352ad | ||
|
|
31126be578 | ||
|
|
e91f5de63f | ||
|
|
39687e808f | ||
|
|
8588762572 | ||
|
|
949c2fdda0 | ||
|
|
099f0cd805 | ||
|
|
4e357b8f27 | ||
|
|
be08c2b4cf | ||
|
|
9d0942a117 | ||
|
|
f2c103260f | ||
|
|
e277114631 | ||
|
|
68a7beb5d8 | ||
|
|
6f75b41ade | ||
|
|
b1284c3107 | ||
|
|
6c66a491b8 | ||
|
|
b7a20df38f | ||
|
|
dba431a3d0 | ||
|
|
9ba2992582 | ||
|
|
74d0a816a4 | ||
|
|
8194d83226 | ||
|
|
1840decb41 | ||
|
|
ef76206c75 | ||
|
|
4fdc4c20b7 | ||
|
|
85776aeec3 | ||
|
|
d20bd1ca39 | ||
|
|
c16bfdc227 | ||
|
|
3b6f98a938 | ||
|
|
6c86969ee0 | ||
|
|
fdfff5c0b8 | ||
|
|
2791d5739f | ||
|
|
68d380eb90 | ||
|
|
20b6199ba9 | ||
|
|
7efcea6d08 | ||
|
|
7f894cf755 | ||
|
|
fa40b05191 | ||
|
|
17c580fad6 | ||
|
|
454e45429c | ||
|
|
9fbac7570b | ||
|
|
1e381f11bf | ||
|
|
d22cda3cdb | ||
|
|
869cc63003 | ||
|
|
73fa50afa0 | ||
|
|
7a8fcbfd34 | ||
|
|
7568df77d1 | ||
|
|
9a673e447d | ||
|
|
3b2d75be02 | ||
|
|
87ff746e21 | ||
|
|
14e21d27fb | ||
|
|
ff4f3f9769 | ||
|
|
a7a9d278c4 | ||
|
|
06e229cc76 | ||
|
|
9e388055ec | ||
|
|
eb87767cc6 | ||
|
|
01cd1fed9d | ||
|
|
28094404ad | ||
|
|
e2b19eb4ac | ||
|
|
bff1f22970 | ||
|
|
9787d47d0b | ||
|
|
6548ea0f29 | ||
|
|
1375ea85a1 | ||
|
|
a296456591 | ||
|
|
336f24127a | ||
|
|
1c5df6c665 | ||
|
|
7d314aab62 | ||
|
|
fd21ed0eb8 | ||
|
|
5fc488a088 | ||
|
|
f174589240 | ||
|
|
bcebafe4fb | ||
|
|
8063fac793 |
13
.github/workflows/ccpp.yml
vendored
@@ -36,6 +36,11 @@ jobs:
|
||||
- uses: ammaraskar/gcc-problem-matcher@master
|
||||
- name: Install prerequisites
|
||||
run: scripts/install-prerequisites.sh
|
||||
- name: Fix kernel mmap rnd bits
|
||||
# Asan in llvm 14 provided in ubuntu 22.04 is incompatible with
|
||||
# high-entropy ASLR in much newer kernels that GitHub runners are
|
||||
# using leading to random crashes: https://reviews.llvm.org/D148280
|
||||
run: sudo sysctl vm.mmap_rnd_bits=28
|
||||
- name: Run tests
|
||||
run: python tests/main.py --report test
|
||||
- name: Upload coverage to Codecov
|
||||
@@ -93,4 +98,12 @@ jobs:
|
||||
echo 'export PATH="/usr/lib/ccache:$PATH"' | tee -a ~/.bashrc
|
||||
|
||||
run: |
|
||||
if [[ "${{ matrix.distro }}" == "ubuntu22.04" ]]; then
|
||||
# ASan in llvm 14 provided in ubuntu-22.04 is incompatible with
|
||||
# high-entropy ASLR configured in much newer kernels that GitHub
|
||||
# runners are using leading to random crashes:
|
||||
# https://github.com/actions/runner-images/issues/9491
|
||||
# can remove this once the issue is fixed.
|
||||
sysctl -w vm.mmap_rnd_bits=28
|
||||
fi
|
||||
env PATH="/usr/lib/ccache:$PATH" ASAN_OPTIONS=detect_leaks=0 python3 tests/main.py test
|
||||
|
||||
15
.github/workflows/check_style.yml
vendored
@@ -9,15 +9,22 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
- name: Checkout astyle
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: szepeviktor/astyle
|
||||
path: astyle
|
||||
ref: v3.4.12
|
||||
- name: Install astyle
|
||||
run: |
|
||||
sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse"
|
||||
sudo apt-get update -y -qq
|
||||
sudo apt-get install astyle
|
||||
cd astyle/build/gcc/
|
||||
make
|
||||
sudo make install
|
||||
astyle --version
|
||||
- name: Format code
|
||||
run: python code-format.py
|
||||
working-directory: scripts
|
||||
|
||||
20
Kconfig
@@ -1,4 +1,4 @@
|
||||
# Kconfig file for LVGL v8.0
|
||||
# Kconfig file for LVGL v8.4
|
||||
|
||||
menu "LVGL configuration"
|
||||
|
||||
@@ -964,6 +964,17 @@ menu "LVGL configuration"
|
||||
default 0
|
||||
depends on LV_USE_FS_FATFS
|
||||
|
||||
config LV_USE_FS_LITTLEFS
|
||||
bool "File system on top of LittleFS"
|
||||
config LV_FS_LITTLEFS_LETTER
|
||||
int "Set an upper cased letter on which the drive will accessible (e.g. 'A' i.e. 65)"
|
||||
default 0
|
||||
depends on LV_USE_FS_LITTLEFS
|
||||
config LV_FS_LITTLEFS_CACHE_SIZE
|
||||
int ">0 to cache this number of bytes in lv_fs_read()"
|
||||
default 0
|
||||
depends on LV_USE_FS_LITTLEFS
|
||||
|
||||
config LV_USE_PNG
|
||||
bool "PNG decoder library"
|
||||
|
||||
@@ -1000,6 +1011,13 @@ menu "LVGL configuration"
|
||||
endmenu
|
||||
endif
|
||||
|
||||
config LV_USE_TINY_TTF
|
||||
bool "Tiny TTF library"
|
||||
config LV_TINY_TTF_FILE_SUPPORT
|
||||
bool "Load TTF data from files"
|
||||
depends on LV_USE_TINY_TTF
|
||||
default n
|
||||
|
||||
config LV_USE_RLOTTIE
|
||||
bool "Lottie library"
|
||||
|
||||
|
||||
@@ -226,7 +226,6 @@ static void shadow_small_ofs_cb(void)
|
||||
rect_create(&style_common);
|
||||
}
|
||||
|
||||
|
||||
static void shadow_large_cb(void)
|
||||
{
|
||||
lv_style_reset(&style_common);
|
||||
@@ -250,7 +249,6 @@ static void shadow_large_ofs_cb(void)
|
||||
rect_create(&style_common);
|
||||
}
|
||||
|
||||
|
||||
static void img_rgb_cb(void)
|
||||
{
|
||||
lv_style_reset(&style_common);
|
||||
@@ -293,7 +291,6 @@ static void img_alpha_cb(void)
|
||||
img_create(&style_common, &img_benchmark_cogwheel_alpha16, false, false, false);
|
||||
}
|
||||
|
||||
|
||||
static void img_rgb_recolor_cb(void)
|
||||
{
|
||||
lv_style_reset(&style_common);
|
||||
@@ -382,7 +379,6 @@ static void img_rgb_zoom_aa_cb(void)
|
||||
lv_style_set_img_opa(&style_common, opa_mode ? LV_OPA_50 : LV_OPA_COVER);
|
||||
img_create(&style_common, &img_benchmark_cogwheel_rgb, false, true, true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
static void img_argb_zoom_cb(void)
|
||||
@@ -396,7 +392,6 @@ static void img_argb_zoom_cb(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
static void img_argb_zoom_aa_cb(void)
|
||||
{
|
||||
lv_style_reset(&style_common);
|
||||
@@ -462,7 +457,6 @@ static void txt_large_compr_cb(void)
|
||||
|
||||
}
|
||||
|
||||
|
||||
static void line_cb(void)
|
||||
{
|
||||
lv_style_reset(&style_common);
|
||||
@@ -490,7 +484,6 @@ static void arc_thick_cb(void)
|
||||
|
||||
}
|
||||
|
||||
|
||||
static void sub_rectangle_cb(void)
|
||||
{
|
||||
lv_style_reset(&style_common);
|
||||
@@ -563,8 +556,6 @@ static void sub_text_cb(void)
|
||||
txt_create(&style_common);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**********************
|
||||
* STATIC VARIABLES
|
||||
**********************/
|
||||
@@ -702,7 +693,6 @@ static void benchmark_init(void)
|
||||
lv_obj_update_layout(scr);
|
||||
}
|
||||
|
||||
|
||||
void lv_demo_benchmark(void)
|
||||
{
|
||||
benchmark_init();
|
||||
@@ -750,7 +740,6 @@ void lv_demo_benchmark_run_scene(int_fast16_t scene_no)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void lv_demo_benchmark_set_finished_cb(finished_cb_t * finished_cb)
|
||||
{
|
||||
benchmark_finished_cb = finished_cb;
|
||||
@@ -799,7 +788,6 @@ static void generate_report(void)
|
||||
weight_opa_sum += w;
|
||||
}
|
||||
|
||||
|
||||
fps_sum = fps_normal_sum + fps_opa_sum;
|
||||
weight_sum = weight_normal_sum + weight_opa_sum;
|
||||
|
||||
@@ -816,7 +804,6 @@ static void generate_report(void)
|
||||
lv_obj_clean(lv_scr_act());
|
||||
scene_bg = NULL;
|
||||
|
||||
|
||||
lv_obj_set_flex_flow(lv_scr_act(), LV_FLEX_FLOW_COLUMN);
|
||||
|
||||
title = lv_label_create(lv_scr_act());
|
||||
@@ -852,7 +839,6 @@ static void generate_report(void)
|
||||
// lv_obj_add_style(table, LV_TABLE_PART_CELL3, &style_cell_very_slow);
|
||||
// lv_obj_add_style(table, LV_TABLE_PART_CELL4, &style_cell_title);
|
||||
|
||||
|
||||
uint16_t row = 0;
|
||||
lv_table_add_cell_ctrl(table, row, 0, LV_TABLE_CELL_CTRL_MERGE_RIGHT);
|
||||
lv_table_set_cell_value(table, row, 0, "Slow but common cases");
|
||||
@@ -939,7 +925,6 @@ static void generate_report(void)
|
||||
lv_snprintf(buf, sizeof(buf), "%"LV_PRIu32, scenes[i].fps_opa);
|
||||
lv_table_set_cell_value(table, row, 1, buf);
|
||||
|
||||
|
||||
if(scenes[i].fps_opa < 10) {
|
||||
// lv_table_set_cell_type(table, row, 0, 3);
|
||||
// lv_table_set_cell_type(table, row, 1, 3);
|
||||
@@ -1051,7 +1036,6 @@ static void next_scene_timer_cb(lv_timer_t * timer)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void rect_create(lv_style_t * style)
|
||||
{
|
||||
uint32_t i;
|
||||
@@ -1069,7 +1053,6 @@ static void rect_create(lv_style_t * style)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void img_create(lv_style_t * style, const void * src, bool rotate, bool zoom, bool aa)
|
||||
{
|
||||
uint32_t i;
|
||||
@@ -1088,7 +1071,6 @@ static void img_create(lv_style_t * style, const void * src, bool rotate, bool z
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void txt_create(lv_style_t * style)
|
||||
{
|
||||
uint32_t i;
|
||||
@@ -1104,7 +1086,6 @@ static void txt_create(lv_style_t * style)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void line_create(lv_style_t * style)
|
||||
{
|
||||
static lv_point_t points[OBJ_NUM][LINE_POINT_NUM];
|
||||
@@ -1119,7 +1100,6 @@ static void line_create(lv_style_t * style)
|
||||
points[i][j].y = rnd_next(LINE_POINT_DIFF_MIN, LINE_POINT_DIFF_MAX);
|
||||
}
|
||||
|
||||
|
||||
lv_obj_t * obj = lv_line_create(scene_bg);
|
||||
lv_obj_remove_style_all(obj);
|
||||
lv_obj_add_style(obj, style, 0);
|
||||
@@ -1132,7 +1112,6 @@ static void line_create(lv_style_t * style)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void arc_anim_end_angle_cb(void * var, int32_t v)
|
||||
{
|
||||
lv_arc_set_end_angle(var, v);
|
||||
@@ -1166,7 +1145,6 @@ static void arc_create(lv_style_t * style)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void fall_anim_y_cb(void * var, int32_t v)
|
||||
{
|
||||
lv_obj_set_y(var, v);
|
||||
|
||||
@@ -24,7 +24,6 @@ extern "C" {
|
||||
**********************/
|
||||
typedef void finished_cb_t(void);
|
||||
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
|
||||
@@ -47,7 +47,6 @@ extern "C" {
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
BIN
demos/music/assets/272_png/btn_list_pause.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
demos/music/assets/272_png/btn_list_play.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
demos/music/assets/272_png/btn_loop.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
demos/music/assets/272_png/btn_next.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
demos/music/assets/272_png/btn_pause.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
demos/music/assets/272_png/btn_play.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
demos/music/assets/272_png/btn_prev.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
demos/music/assets/272_png/btn_rnd.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
demos/music/assets/272_png/corner_1.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
demos/music/assets/272_png/corner_2.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
demos/music/assets/272_png/cover_1.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
demos/music/assets/272_png/cover_2.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
demos/music/assets/272_png/cover_3.png
Normal file
|
After Width: | Height: | Size: 43 KiB |
BIN
demos/music/assets/272_png/icn_chart.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
demos/music/assets/272_png/icn_chat.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
demos/music/assets/272_png/icn_download.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
demos/music/assets/272_png/icn_heart.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
demos/music/assets/272_png/icn_slider.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
demos/music/assets/272_png/list_border.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
demos/music/assets/272_png/wave_bottom.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
demos/music/assets/272_png/wave_top.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
demos/music/assets/480_png/btn_list_pause.png
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
BIN
demos/music/assets/480_png/btn_list_play.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
demos/music/assets/480_png/btn_loop.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
demos/music/assets/480_png/btn_next.png
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
demos/music/assets/480_png/btn_pause.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
demos/music/assets/480_png/btn_play.png
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
BIN
demos/music/assets/480_png/btn_prev.png
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
demos/music/assets/480_png/btn_rnd.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
demos/music/assets/480_png/corner_1.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
demos/music/assets/480_png/corner_2.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
demos/music/assets/480_png/cover_1.png
Normal file
|
After Width: | Height: | Size: 151 KiB |
BIN
demos/music/assets/480_png/cover_2.png
Normal file
|
After Width: | Height: | Size: 166 KiB |
BIN
demos/music/assets/480_png/cover_3.png
Normal file
|
After Width: | Height: | Size: 142 KiB |
BIN
demos/music/assets/480_png/icn_chart.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
demos/music/assets/480_png/icn_chat.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
demos/music/assets/480_png/icn_download.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
demos/music/assets/480_png/icn_heart.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
demos/music/assets/480_png/icn_slider.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
demos/music/assets/480_png/list_border.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
demos/music/assets/480_png/wave_bottom.png
Normal file
|
After Width: | Height: | Size: 9.3 KiB |
BIN
demos/music/assets/480_png/wave_top.png
Normal file
|
After Width: | Height: | Size: 9.4 KiB |
@@ -130,7 +130,6 @@ lv_obj_t * _lv_demo_music_list_create(lv_obj_t * parent)
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
void _lv_demo_music_list_close(void)
|
||||
{
|
||||
lv_style_reset(&style_scrollbar);
|
||||
@@ -218,7 +217,6 @@ static lv_obj_t * add_list_btn(lv_obj_t * parent, uint32_t track_id)
|
||||
return btn;
|
||||
}
|
||||
|
||||
|
||||
static void btn_click_event_cb(lv_event_t * e)
|
||||
{
|
||||
lv_obj_t * btn = lv_event_get_target(e);
|
||||
@@ -228,4 +226,3 @@ static void btn_click_event_cb(lv_event_t * e)
|
||||
_lv_demo_music_play(idx);
|
||||
}
|
||||
#endif /*LV_USE_DEMO_MUSIC*/
|
||||
|
||||
|
||||
@@ -769,7 +769,7 @@ static void spectrum_draw_event_cb(lv_event_t * e)
|
||||
lv_obj_t * obj = lv_event_get_target(e);
|
||||
lv_draw_ctx_t * draw_ctx = lv_event_get_draw_ctx(e);
|
||||
|
||||
lv_opa_t opa = lv_obj_get_style_opa(obj, LV_PART_MAIN);
|
||||
lv_opa_t opa = lv_obj_get_style_opa_recursive(obj, LV_PART_MAIN);
|
||||
if(opa < LV_OPA_MIN) return;
|
||||
|
||||
lv_point_t poly[4];
|
||||
@@ -981,7 +981,6 @@ static void next_click_event_cb(lv_event_t * e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void timer_cb(lv_timer_t * t)
|
||||
{
|
||||
LV_UNUSED(t);
|
||||
@@ -996,7 +995,6 @@ static void spectrum_end_cb(lv_anim_t * a)
|
||||
_lv_demo_music_album_next(true);
|
||||
}
|
||||
|
||||
|
||||
static void stop_start_anim_timer_cb(lv_timer_t * t)
|
||||
{
|
||||
LV_UNUSED(t);
|
||||
@@ -1010,4 +1008,3 @@ static void album_fade_anim_cb(void * var, int32_t v)
|
||||
lv_obj_set_style_img_opa(var, v, 0);
|
||||
}
|
||||
#endif /*LV_USE_DEMO_MUSIC*/
|
||||
|
||||
|
||||
@@ -40,7 +40,6 @@ void _lv_demo_music_album_next(bool next);
|
||||
**********************/
|
||||
#endif /*LV_USE_DEMO_MUSIC*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
@@ -35,6 +35,8 @@ static lv_obj_t * ta;
|
||||
static const char * mbox_btns[] = {"Ok", "Cancel", ""};
|
||||
static uint32_t mem_free_start = 0;
|
||||
static lv_timer_t * obj_test_timer;
|
||||
static int16_t state;
|
||||
static lv_timer_t * msgbox_tmr;
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
@@ -48,11 +50,18 @@ void lv_demo_stress(void)
|
||||
{
|
||||
LV_LOG_USER("Starting stress test. (< 100 bytes permanent memory leak is normal due to fragmentation)");
|
||||
obj_test_timer = lv_timer_create(obj_test_timer_cb, LV_DEMO_STRESS_TIME_STEP, NULL);
|
||||
state = -1;
|
||||
}
|
||||
|
||||
void lv_demo_stress_close(void)
|
||||
{
|
||||
lv_timer_del(obj_test_timer);
|
||||
obj_test_timer = NULL;
|
||||
if(msgbox_tmr) {
|
||||
lv_timer_del(msgbox_tmr);
|
||||
msgbox_tmr = NULL;
|
||||
}
|
||||
|
||||
lv_obj_clean(lv_scr_act());
|
||||
lv_obj_clean(lv_layer_top());
|
||||
}
|
||||
@@ -64,13 +73,10 @@ void lv_demo_stress_close(void)
|
||||
static void obj_test_timer_cb(lv_timer_t * tmr)
|
||||
{
|
||||
(void) tmr; /*Unused*/
|
||||
static int16_t state = -1;
|
||||
|
||||
lv_anim_t a;
|
||||
lv_obj_t * obj;
|
||||
|
||||
// printf("step start: %d\n", state);
|
||||
|
||||
switch(state) {
|
||||
case -1: {
|
||||
lv_res_t res = lv_mem_test();
|
||||
@@ -92,7 +98,6 @@ static void obj_test_timer_cb(lv_timer_t * tmr)
|
||||
lv_obj_set_size(main_page, LV_HOR_RES / 2, LV_VER_RES);
|
||||
lv_obj_set_flex_flow(main_page, LV_FLEX_FLOW_COLUMN);
|
||||
|
||||
|
||||
obj = lv_btn_create(main_page);
|
||||
lv_obj_set_size(obj, 100, 70);
|
||||
obj = lv_label_create(obj);
|
||||
@@ -255,8 +260,7 @@ static void obj_test_timer_cb(lv_timer_t * tmr)
|
||||
|
||||
case 14:
|
||||
obj = lv_msgbox_create(NULL, "Title", "Some text on the message box with average length", mbox_btns, true);
|
||||
|
||||
lv_timer_t * msgbox_tmr = lv_timer_create(msgbox_del, LV_DEMO_STRESS_TIME_STEP * 5 + 30, obj);
|
||||
msgbox_tmr = lv_timer_create(msgbox_del, LV_DEMO_STRESS_TIME_STEP * 5 + 30, obj);
|
||||
lv_timer_set_repeat_count(msgbox_tmr, 1);
|
||||
lv_obj_align(obj, LV_ALIGN_RIGHT_MID, -10, 0);
|
||||
break;
|
||||
@@ -448,6 +452,7 @@ static void auto_del(lv_obj_t * obj, uint32_t delay)
|
||||
|
||||
static void msgbox_del(lv_timer_t * tmr)
|
||||
{
|
||||
msgbox_tmr = NULL;
|
||||
lv_msgbox_close(tmr->user_data);
|
||||
}
|
||||
|
||||
|
||||
@@ -223,7 +223,6 @@ static void profile_create(lv_obj_t * parent)
|
||||
lv_obj_t * panel1 = lv_obj_create(parent);
|
||||
lv_obj_set_height(panel1, LV_SIZE_CONTENT);
|
||||
|
||||
|
||||
LV_IMG_DECLARE(img_demo_widgets_avatar);
|
||||
lv_obj_t * avatar = lv_img_create(panel1);
|
||||
lv_img_set_src(avatar, &img_demo_widgets_avatar);
|
||||
@@ -359,7 +358,6 @@ static void profile_create(lv_obj_t * parent)
|
||||
LV_GRID_TEMPLATE_LAST
|
||||
};
|
||||
|
||||
|
||||
lv_obj_set_grid_dsc_array(parent, grid_main_col_dsc, grid_main_row_dsc);
|
||||
|
||||
lv_obj_set_grid_cell(panel1, LV_GRID_ALIGN_STRETCH, 0, 2, LV_GRID_ALIGN_CENTER, 0, 1);
|
||||
@@ -387,7 +385,6 @@ static void profile_create(lv_obj_t * parent)
|
||||
lv_obj_set_grid_cell(gender, LV_GRID_ALIGN_STRETCH, 0, 1, LV_GRID_ALIGN_CENTER, 6, 1);
|
||||
lv_obj_set_grid_cell(gender_label, LV_GRID_ALIGN_START, 0, 1, LV_GRID_ALIGN_START, 5, 1);
|
||||
|
||||
|
||||
lv_obj_set_grid_cell(panel3, LV_GRID_ALIGN_STRETCH, 1, 1, LV_GRID_ALIGN_STRETCH, 1, 1);
|
||||
lv_obj_set_grid_dsc_array(panel3, grid_2_col_dsc, grid_2_row_dsc);
|
||||
lv_obj_set_grid_cell(panel3_title, LV_GRID_ALIGN_START, 0, 2, LV_GRID_ALIGN_CENTER, 0, 1);
|
||||
@@ -402,7 +399,6 @@ static void profile_create(lv_obj_t * parent)
|
||||
static lv_coord_t grid_main_col_dsc[] = {LV_GRID_FR(1), LV_GRID_FR(1), LV_GRID_TEMPLATE_LAST};
|
||||
static lv_coord_t grid_main_row_dsc[] = {LV_GRID_CONTENT, LV_GRID_CONTENT, LV_GRID_TEMPLATE_LAST};
|
||||
|
||||
|
||||
/*Create the top panel*/
|
||||
static lv_coord_t grid_1_col_dsc[] = {LV_GRID_CONTENT, 1, LV_GRID_CONTENT, LV_GRID_FR(1), LV_GRID_TEMPLATE_LAST};
|
||||
static lv_coord_t grid_1_row_dsc[] = {
|
||||
@@ -430,7 +426,6 @@ static void profile_create(lv_obj_t * parent)
|
||||
LV_GRID_TEMPLATE_LAST
|
||||
};
|
||||
|
||||
|
||||
lv_obj_set_grid_dsc_array(parent, grid_main_col_dsc, grid_main_row_dsc);
|
||||
lv_obj_set_grid_cell(panel1, LV_GRID_ALIGN_STRETCH, 0, 2, LV_GRID_ALIGN_CENTER, 0, 1);
|
||||
|
||||
@@ -475,7 +470,6 @@ static void profile_create(lv_obj_t * parent)
|
||||
static lv_coord_t grid_main_row_dsc[] = {LV_GRID_CONTENT, LV_GRID_CONTENT, LV_GRID_CONTENT, LV_GRID_TEMPLATE_LAST};
|
||||
lv_obj_set_grid_dsc_array(parent, grid_main_col_dsc, grid_main_row_dsc);
|
||||
|
||||
|
||||
/*Create the top panel*/
|
||||
static lv_coord_t grid_1_col_dsc[] = {LV_GRID_CONTENT, LV_GRID_FR(1), LV_GRID_TEMPLATE_LAST};
|
||||
static lv_coord_t grid_1_row_dsc[] = {LV_GRID_CONTENT, /*Avatar*/
|
||||
@@ -490,7 +484,6 @@ static void profile_create(lv_obj_t * parent)
|
||||
|
||||
lv_obj_set_grid_dsc_array(panel1, grid_1_col_dsc, grid_1_row_dsc);
|
||||
|
||||
|
||||
static lv_coord_t grid_2_col_dsc[] = {LV_GRID_FR(1), LV_GRID_FR(1), LV_GRID_TEMPLATE_LAST};
|
||||
static lv_coord_t grid_2_row_dsc[] = {
|
||||
LV_GRID_CONTENT, /*Title*/
|
||||
@@ -545,7 +538,6 @@ static void profile_create(lv_obj_t * parent)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void analytics_create(lv_obj_t * parent)
|
||||
{
|
||||
lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_ROW_WRAP);
|
||||
@@ -859,7 +851,6 @@ void shop_create(lv_obj_t * parent)
|
||||
lv_obj_set_size(chart3, lv_pct(100), lv_pct(100));
|
||||
lv_obj_set_style_pad_column(chart3, LV_DPX(30), 0);
|
||||
|
||||
|
||||
lv_obj_set_grid_dsc_array(panel1, grid1_col_dsc, grid1_row_dsc);
|
||||
lv_obj_set_grid_cell(title, LV_GRID_ALIGN_START, 0, 1, LV_GRID_ALIGN_START, 0, 1);
|
||||
lv_obj_set_grid_cell(date, LV_GRID_ALIGN_START, 0, 1, LV_GRID_ALIGN_START, 1, 1);
|
||||
@@ -975,7 +966,6 @@ void shop_create(lv_obj_t * parent)
|
||||
cb = lv_checkbox_create(notifications);
|
||||
lv_checkbox_set_text(cb, "Out of stock");
|
||||
|
||||
|
||||
}
|
||||
|
||||
static void color_changer_create(lv_obj_t * parent)
|
||||
@@ -1181,7 +1171,6 @@ static lv_obj_t * create_meter_box(lv_obj_t * parent, const char * title, const
|
||||
lv_obj_set_grid_cell(label3, LV_GRID_ALIGN_STRETCH, 1, 1, LV_GRID_ALIGN_START, 4, 1);
|
||||
}
|
||||
|
||||
|
||||
return meter;
|
||||
|
||||
}
|
||||
@@ -1399,7 +1388,6 @@ static void chart_event_cb(lv_event_t * e)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
const lv_chart_series_t * ser = dsc->sub_part_ptr;
|
||||
|
||||
if(lv_chart_get_pressed_point(obj) == dsc->id) {
|
||||
@@ -1465,7 +1453,6 @@ static void chart_event_cb(lv_event_t * e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void shop_chart_event_cb(lv_event_t * e)
|
||||
{
|
||||
lv_event_code_t code = lv_event_get_code(e);
|
||||
@@ -1517,7 +1504,6 @@ static void shop_chart_event_cb(lv_event_t * e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void meter1_indic1_anim_cb(void * var, int32_t v)
|
||||
{
|
||||
lv_meter_set_indicator_end_value(meter1, var, v);
|
||||
@@ -1554,7 +1540,6 @@ static void meter2_timer_cb(lv_timer_t * timer)
|
||||
static bool down2 = false;
|
||||
static bool down3 = false;
|
||||
|
||||
|
||||
if(down1) {
|
||||
session_desktop -= 137;
|
||||
if(session_desktop < 1400) down1 = false;
|
||||
|
||||
@@ -1,5 +1,86 @@
|
||||
# Changelog
|
||||
|
||||
## [v8.3.11](https://github.com/lvgl/lvgl/compare/v8.3.11...v8.3.10) 6 December 2023
|
||||
|
||||
### New Features
|
||||
|
||||
- feat(table): add user_data to table cells [`4767`](https://github.com/lvgl/lvgl/pull/4767)
|
||||
- feat(tiny_ttf): backport Tiny TTF to lvgl 8 [`4727`](https://github.com/lvgl/lvgl/pull/4727)
|
||||
- feat(littlefs): add lv_fs_littlefs system as a driver [`4677`](https://github.com/lvgl/lvgl/pull/4677)
|
||||
|
||||
### Fixes
|
||||
|
||||
- fix(obj): readjust scroll after layout when child removed [`4921`](https://github.com/lvgl/lvgl/pull/4921)
|
||||
- fix(rt-thread): fix create lvgl thread problem [`4862`](https://github.com/lvgl/lvgl/pull/4862)
|
||||
- fix(obj): fix arduino compile warnings [`4807`](https://github.com/lvgl/lvgl/pull/4807)
|
||||
- fix(table):fix issue with abnormal string output of 'lv_table_set_cell_value_fmt' [`4804`](https://github.com/lvgl/lvgl/pull/4804)
|
||||
- fix(table) user data API functions renamed [`4769`](https://github.com/lvgl/lvgl/pull/4769)
|
||||
- fix(ime_pinyin): keep cursor in the textarea when a candidate is pressed [`4731`](https://github.com/lvgl/lvgl/pull/4731)
|
||||
- fix(draw_needles): changed needle line draw start point from scale ce… [`4682`](https://github.com/lvgl/lvgl/pull/4682)
|
||||
- fix(arc): handle click outside background angle range (#4586) [`4667`](https://github.com/lvgl/lvgl/pull/4667)
|
||||
- fix(meter): fix minor issues [`4657`](https://github.com/lvgl/lvgl/pull/4657)
|
||||
- fix(draw): fix compiler error in lv_draw_sw_transform.c #2 [`4612`](https://github.com/lvgl/lvgl/pull/4612)
|
||||
- fix(dropdown): avoid partial match in lv_dropdown_get_option_index [`4598`](https://github.com/lvgl/lvgl/pull/4598)
|
||||
- fix(dropdown): reset char_i = 0, avoid access overflow [`4589`](https://github.com/lvgl/lvgl/pull/4589)
|
||||
- fix(btnmatrix): set LV_BTNMATRIX_BTN_NONE when clicking of disabled button (#4571) [`4578`](https://github.com/lvgl/lvgl/pull/4578)
|
||||
- fix(qrcode): use LV_ASSERT instead of assert [`1840dec`](https://github.com/lvgl/lvgl/commit/1840decb4136ba01552fcb7cedb0ff759824e2fd)
|
||||
- fix: fix warning in lv_draw_sw_letter.c [`d22cda3`](https://github.com/lvgl/lvgl/commit/d22cda3cdb15cee95763491db95753980846d9f9)
|
||||
- fix(arc): fix setting value by click [`20b6199`](https://github.com/lvgl/lvgl/commit/20b6199ba90319942c3cd91f2c727da6cd40cd2d)
|
||||
- fix(disp): fix infinite recursive SCREEN_LOADED events [`ef76206`](https://github.com/lvgl/lvgl/commit/ef76206c75ea9de26407534a9ce1079dc8e750e3)
|
||||
- fix(keyboard): add '&' character [`d20bd1c`](https://github.com/lvgl/lvgl/commit/d20bd1ca397ff954167dd496cf1a78da8814f602)
|
||||
- fix(draw): fix scaling rectangle parts with opa [`7a8fcbf`](https://github.com/lvgl/lvgl/commit/7a8fcbfd3458739cbe64b29767a969ece9542039)
|
||||
|
||||
### Docs
|
||||
|
||||
- docs(obj): fix wording [`4625`](https://github.com/lvgl/lvgl/pull/4625)
|
||||
- docs(label): update text for recoloring [`4606`](https://github.com/lvgl/lvgl/pull/4606)
|
||||
- docs: fix typo [`9fbac75`](https://github.com/lvgl/lvgl/commit/9fbac7570bdec18ddbb157b59f5e26a2ebdf5daf)
|
||||
|
||||
### Others
|
||||
|
||||
- chore(cmsis-pack): prepare for v8.3.11 [`4936`](https://github.com/lvgl/lvgl/pull/4936)
|
||||
- chore(cmake): add support for user-specified lv_conf.h path [`4689`](https://github.com/lvgl/lvgl/pull/4689)
|
||||
- STM32U5 DMA2D support (8.3) [`4643`](https://github.com/lvgl/lvgl/pull/4643)
|
||||
- backport: fix(lv_disp): fix lv_scr_load_anim being called twice quickly [`4629`](https://github.com/lvgl/lvgl/pull/4629)
|
||||
- chore(lv_draw_sw_letter.c): Fix print format [`4615`](https://github.com/lvgl/lvgl/pull/4615)
|
||||
- chore: fix compile error [`7568df7`](https://github.com/lvgl/lvgl/commit/7568df77d16ecbf2242b2bc290dc8fc0eb29cf5a)
|
||||
|
||||
## [v8.3.10](https://github.com/lvgl/lvgl/compare/v8.3.10...v8.3.9) 20 September 2023
|
||||
|
||||
### New Features
|
||||
|
||||
- feat(disp): add double buffered direct-mode efficient sync algorithm (v8.3) [`4497`](https://github.com/lvgl/lvgl/pull/4497)
|
||||
- feat(style): backport opa_layered [`6548ea0`](https://github.com/lvgl/lvgl/commit/6548ea0f291be8a97afb3c4d7dcabbe465ae5a04)
|
||||
|
||||
|
||||
### Fixes
|
||||
|
||||
- fix: build on Windows (MinGW environment) [`4538`](https://github.com/lvgl/lvgl/pull/4538)
|
||||
- fix(docs): dropdown: fix function name in description of static options [`4535`](https://github.com/lvgl/lvgl/pull/4535)
|
||||
- fix: do not copy invalid areas if not double buffered mode [`4526`](https://github.com/lvgl/lvgl/pull/4526)
|
||||
- fix(sdl): add missing parameter in lv_draw_sdl_composite_texture_obtain [`4490`](https://github.com/lvgl/lvgl/pull/4490)
|
||||
- fix(dropdown): position to the selected item in lv_dropdown_set_selected [`f174589`](https://github.com/lvgl/lvgl/commit/f174589240b099a349e54ba09aa9b39c2b347341)
|
||||
- fix(vglite): be sure end_angle > start_angle in arc drawing [`01cd1fe`](https://github.com/lvgl/lvgl/commit/01cd1fed9db974aa616a6289a29171b7a971cd89)
|
||||
- fix(btnmatrix): fix tapping just outside a button in a buttonmatrix [`8063fac`](https://github.com/lvgl/lvgl/commit/8063fac793b0a09add1e57c1115b734659274e6f)
|
||||
|
||||
|
||||
### Docs
|
||||
|
||||
- docs(calendar): update according to v8.2 changes [`a296456`](https://github.com/lvgl/lvgl/commit/a296456591f6ff0e3b3ae6cdcdd9ec5b1711c357)
|
||||
- docs(simulator): remove SDL support from the Visual Studio project [`bcebafe`](https://github.com/lvgl/lvgl/commit/bcebafe4fb72e336b7dedca89c07e334427eef8d)
|
||||
|
||||
### CI and tests
|
||||
|
||||
- ci: update screenshot compare from v9 to automatically create missing reference images [`fd21ed0`](https://github.com/lvgl/lvgl/commit/fd21ed0eb82bacb1e482180ab0aaed6a667f000d)
|
||||
- ci(dropdown): fix test [`5fc488a`](https://github.com/lvgl/lvgl/commit/5fc488a088639dbfb5eb44f65b05e13b6ba881bf)
|
||||
|
||||
### Others
|
||||
|
||||
- chore(cmsis-pack): create cmsis-pack for v8.3.10 [`4572`](https://github.com/lvgl/lvgl/pull/4572)
|
||||
- Update screen object opacity function documentation [`4505`](https://github.com/lvgl/lvgl/pull/4505)
|
||||
- demo(sress): fix issues when the stress test is opened/clsoed multiple times [`1c5df6c`](https://github.com/lvgl/lvgl/commit/1c5df6c665b0d5f6f346d45b13109ff1f6ea78a6)
|
||||
- chore: code formatting [`eb87767`](https://github.com/lvgl/lvgl/commit/eb87767cc65fec93f9cc4f87a1f8fb5b32f7e41d)
|
||||
|
||||
|
||||
## [v8.3.9](https://github.com/lvgl/lvgl/compare/v8.3.9...v8.3.8) 6 August 2023
|
||||
|
||||
|
||||
43
docs/_static/js/custom.js
vendored
@@ -12,7 +12,46 @@ document.addEventListener('DOMContentLoaded', (event) => {
|
||||
cppListing.classList.toggle("unexpanded");
|
||||
cppListing.classList.toggle("expanded");
|
||||
});
|
||||
|
||||
|
||||
dt.insertBefore(button, dt.firstChild);
|
||||
});
|
||||
})
|
||||
|
||||
fetch('https://lvgl.io/home-banner.txt') // Replace with your URL
|
||||
.then(response => {
|
||||
// Check if the request was successful
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP error! Status: ${response.status}`);
|
||||
}
|
||||
// Read the response as text
|
||||
return response.text();
|
||||
})
|
||||
.then(data => {
|
||||
|
||||
const section = document.querySelector('.wy-nav-content-wrap');
|
||||
|
||||
//Add a div
|
||||
const newDiv = document.createElement('div');
|
||||
newDiv.style="background-image: linear-gradient(45deg, black, #5e5e5e); color: white; border-bottom: 4px solid #e10010; padding-inline:3em"
|
||||
section.insertBefore(newDiv, section.firstChild);
|
||||
|
||||
|
||||
//Add a p to the div
|
||||
const newP = document.createElement('p');
|
||||
newP.style="padding-block:12px; margin-block:0px;align-content: center;align-items: center;"
|
||||
newP.innerHTML = data
|
||||
newDiv.insertBefore(newP, newDiv.firstChild);
|
||||
|
||||
const children = newDiv.querySelectorAll('*');
|
||||
|
||||
// Iterate over each child
|
||||
children.forEach(child => {
|
||||
// Check if the child has an id
|
||||
if (child.id) {
|
||||
// Prepend 'docs-' to the id
|
||||
child.id = 'docs-' + child.id;
|
||||
}
|
||||
})
|
||||
}) .catch(error => {
|
||||
console.error('Fetch error: ' + error.message);
|
||||
});
|
||||
})
|
||||
|
||||
@@ -15,7 +15,7 @@ The simulator is ported to various IDEs (Integrated Development Environments). C
|
||||
|
||||
- [Eclipse with SDL driver](https://github.com/lvgl/lv_sim_eclipse_sdl): Recommended on Linux and Mac
|
||||
- [CodeBlocks](https://github.com/lvgl/lv_sim_codeblocks_win): Recommended on Windows
|
||||
- [VisualStudio with SDL driver](https://github.com/lvgl/lv_sim_visual_studio_sdl): For Windows
|
||||
- [VisualStudio](https://github.com/lvgl/lv_sim_visual_studio_sdl): For Windows
|
||||
- [VSCode with SDL driver](https://github.com/lvgl/lv_sim_vscode_sdl): Recommended on Linux and Mac
|
||||
- [PlatformIO with SDL driver](https://github.com/lvgl/lv_platformio): Recommended on Linux and Mac
|
||||
- [MDK with FastModel](https://github.com/lvgl/lv_port_an547_cm55_sim): For Windows
|
||||
|
||||
@@ -2,14 +2,38 @@
|
||||
# File System Interfaces
|
||||
|
||||
LVGL has a [File system](https://docs.lvgl.io/master/overview/file-system.html) module to provide an abstraction layer for various file system drivers.
|
||||
You still need to provide the drivers and libraries, this extension provides only the bridge between FATFS, LittleFS, STDIO, POSIX, WIN32 and LVGL.
|
||||
|
||||
LVG has built in support for:
|
||||
- [FATFS](http://elm-chan.org/fsw/ff/00index_e.html)
|
||||
- STDIO (Linux and Windows using C standard function .e.g fopen, fread)
|
||||
- POSIX (Linux and Windows using POSIX function .e.g open, read)
|
||||
- WIN32 (Windows using Win32 API function .e.g CreateFileA, ReadFile)
|
||||
## Built in wrappers
|
||||
|
||||
You still need to provide the drivers and libraries, this extension provides only the bridge between FATFS, STDIO, POSIX, WIN32 and LVGL.
|
||||
### FATFS
|
||||
|
||||
Bridge for [FatFS](http://elm-chan.org/fsw/ff/00index_e.html). FatFS itself is not part of LVGL, but can be added and initialized externally.
|
||||
|
||||
|
||||
### LittleFS
|
||||
|
||||
Though `lv_fs_littlefs` uses [LittleFS]((https://github.com/littlefs-project/littlefs)) API, the LittleFS library needs other external libraries that handle the mounting of partitions and low-level accesses, according to the given architecture. The functions for the latter are given to the lfs_t structure as pointers by an external low-level library.
|
||||
|
||||
There's a convenience function called `lv_fs_littlefs_set_driver(LV_FS_LITTLEFS_LETTER, my_lfs)`, specific to `lv_fs_littlefs`, to attach a `lfs_t` object's pointer to a registered driver-letter. See its comments for more info.
|
||||
|
||||
|
||||
[esp_littlefs](https://components.espressif.com/components/joltwallet/littlefs) is a wrapper for LittleFS to be used in Espressif ESP-devices. It handles the mounting and has the low-level `littlefs_api` functions to read/write/erase blocks that LittleFS library needs. On mounting by `esp_littlefs` the `lfs_t` structures are created. You need to get a handle to these to use ESP with `lv_fs_littlefs`, as all functions use that `lfs_t` in LittleFS to identify the mounted partition.
|
||||
|
||||
|
||||
In case you don't find a special function in the `lv_fs_littlefs` wrapper, you can look for it in the `esp_littlefs` API and use it directly, as `lv_fs_littlefs` and the `esp_littlefs` APIs can be used side-by-side.
|
||||
|
||||
### STDIO
|
||||
|
||||
Bride to C standard functions on Linux and Windows. For example `fopen`, `fread`, etc.
|
||||
|
||||
### POSIX
|
||||
|
||||
Bride to POSIX functions on Linux and Windows. For example `open`, `read`, etc.
|
||||
|
||||
### WIN32
|
||||
|
||||
Bride to Win32 API function. For example `CreateFileA`, `ReadFile`, etc.
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
png
|
||||
gif
|
||||
freetype
|
||||
tiny_ttf
|
||||
qrcode
|
||||
rlottie
|
||||
ffmpeg
|
||||
|
||||
@@ -12,7 +12,6 @@ Allow the use of JPG images in LVGL. Besides that it also allows the use of a cu
|
||||
- File read from file and c-array are implemented.
|
||||
- SJPEG frame fragment cache enables fast fetching of lines if available in cache.
|
||||
- By default the sjpg image cache will be image width * 2 * 16 bytes (can be modified)
|
||||
- Currently only 16 bit image format is supported (TODO)
|
||||
- Only the required partion of the JPG and SJPG images are decoded, therefore they can't be zoomed or rotated.
|
||||
|
||||
## Usage
|
||||
|
||||
35
docs/libs/tiny_ttf.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# Tiny TTF font engine
|
||||
|
||||
## Usage
|
||||
|
||||
Use https://github.com/nothings/stb to render TrueType fonts in LVGL.
|
||||
|
||||
When enabled in `lv_conf.h` with `LV_USE_TINY_TTF`
|
||||
`lv_tiny_ttf_create_data(data, data_size, font_size)` can be used to
|
||||
create a TTF font instance at the specified font size. You can then
|
||||
use that font anywhere `lv_font_t` is accepted.
|
||||
|
||||
By default, the TTF or OTF file must be embedded as an array, either in
|
||||
a header, or loaded into RAM in order to function.
|
||||
|
||||
However, if `LV_TINY_TTF_FILE_SUPPORT` is enabled,
|
||||
`lv_tiny_ttf_create_file(path, font_size)` will also be available,
|
||||
allowing tiny_ttf to stream from a file. The file must remain open the
|
||||
entire time the font is being used, and streaming on demand may be
|
||||
considerably slower.
|
||||
|
||||
After a font is created, you can change the font size in pixels by using
|
||||
`lv_tiny_ttf_set_size(font, font_size)`.
|
||||
|
||||
By default, a font will use up to 4KB of cache to speed up rendering
|
||||
glyphs. This maximum can be changed by using
|
||||
`lv_tiny_ttf_create_data_ex(data, data_size, font_size, cache_size)`
|
||||
or `lv_tiny_ttf_create_file_ex(path, font_size, cache_size)` (when
|
||||
available). The cache size is indicated in bytes.
|
||||
|
||||
## API
|
||||
|
||||
```eval_rst
|
||||
.. doxygenfile:: lv_tiny_ttf.h
|
||||
:project: lvgl
|
||||
```
|
||||
@@ -37,7 +37,7 @@ void update_snapshot(lv_obj_t * obj, lv_obj_t * img_snapshot)
|
||||
```
|
||||
|
||||
### Use Existing Buffer
|
||||
If the snapshot needs update now and then, or simply caller provides memory, use API `lv_res_t lv_snapshot_take_to_buf(lv_obj_t * obj, lv_img_cf_t cf, lv_img_dsc_t * dsc, void * buf, uint32_t buff_size);` for this case. It's caller's responsibility to alloc/free the memory.
|
||||
If the snapshot needs update now and then, or simply caller provides memory, use API `lv_res_t lv_snapshot_take_to_buf(lv_obj_t * obj, lv_img_cf_t cf, lv_img_dsc_t * dsc, void * buf, uint32_t buf_size);` for this case. It's caller's responsibility to alloc/free the memory.
|
||||
|
||||
|
||||
If snapshot is generated successfully, the image descriptor is updated and image data will be stored to provided `buf`.
|
||||
|
||||
@@ -67,7 +67,7 @@ The Alpha channel of 32-bit colors will be 0 where there are no objects and 255
|
||||
|
||||
In summary, to enable transparent screens and displays for OSD menu-like UIs:
|
||||
- Enable `LV_COLOR_SCREEN_TRANSP` in `lv_conf.h`
|
||||
- Set the screen's opacity to `LV_OPA_TRANSP` e.g. with `lv_obj_set_style_local_bg_opa(lv_scr_act(), LV_OBJMASK_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_TRANSP)`
|
||||
- Set the screen's opacity to `LV_OPA_TRANSP` e.g. with `lv_obj_set_style_bg_opa(lv_scr_act(), LV_OPA_TRANSP, LV_PART_MAIN)`
|
||||
- Set the display opacity to `LV_OPA_TRANSP` with `lv_disp_set_bg_opa(NULL, LV_OPA_TRANSP);`
|
||||
|
||||
## Features of displays
|
||||
|
||||
@@ -99,11 +99,12 @@ This means it's enough to set the base direction of a screen and every object wi
|
||||
|
||||
The default base direction for screens can be set by `LV_BIDI_BASE_DIR_DEF` in *lv_conf.h* and other objects inherit the base direction from their parent.
|
||||
|
||||
To set an object's base direction use `lv_obj_set_base_dir(obj, base_dir)`. The possible base directions are:
|
||||
- `LV_BIDI_DIR_LTR`: Left to Right base direction
|
||||
- `LV_BIDI_DIR_RTL`: Right to Left base direction
|
||||
- `LV_BIDI_DIR_AUTO`: Auto detect base direction
|
||||
- `LV_BIDI_DIR_INHERIT`: Inherit base direction from the parent (or a default value for non-screen objects)
|
||||
To set an object's base direction use `lv_obj_set_style_base_dir(obj, base_dir,selector)`. The possible base directions are:
|
||||
- `LV_BASE_DIR_LTR`: Left to Right base direction
|
||||
- `LV_BASE_DIR_RTL`: Right to Left base direction
|
||||
- `LV_BASE_DIR_AUTO`: Auto detect base direction
|
||||
- `LV_BASE_DIR_NEUTRAL`
|
||||
- `LV_BASE_DIR_WEAK`
|
||||
|
||||
This list summarizes the effect of RTL base direction on objects:
|
||||
- Create objects by default on the right
|
||||
@@ -112,6 +113,7 @@ This list summarizes the effect of RTL base direction on objects:
|
||||
- `lv_btnmatrix`: Shows buttons from right to left
|
||||
- `lv_list`: Shows icons on the right
|
||||
- `lv_dropdown`: Aligns options to the right
|
||||
- `lv_bar`: Shows progress from right to left
|
||||
- The texts in `lv_table`, `lv_btnmatrix`, `lv_keyboard`, `lv_tabview`, `lv_dropdown`, `lv_roller` are "BiDi processed" to be displayed correctly
|
||||
|
||||
### Arabic and Persian support
|
||||
|
||||
@@ -173,7 +173,7 @@ All inputs are disabled during the screen animation.
|
||||
Screens are created on the currently selected *default display*.
|
||||
The *default display* is the last registered display with `lv_disp_drv_register`. You can also explicitly select a new default display using `lv_disp_set_default(disp)`.
|
||||
|
||||
`lv_scr_act()`, `lv_scr_load()` and `lv_scr_load_anim()` operate on the default screen.
|
||||
`lv_scr_act()`, `lv_scr_load()` and `lv_scr_load_anim()` operate on the default display.
|
||||
|
||||
Visit [Multi-display support](/overview/display) to learn more.
|
||||
|
||||
|
||||
@@ -355,7 +355,7 @@ Set the opacity of the border. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means full
|
||||
</ul>
|
||||
|
||||
### border_width
|
||||
Set hte width of the border. Only pixel values can be used.
|
||||
Set the width of the border. Only pixel values can be used.
|
||||
<ul>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Default</strong> 0</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Inherited</strong> No</li>
|
||||
@@ -708,6 +708,15 @@ Scale down all opacity values of the object by this factor. Value 0, `LV_OPA_0`
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Ext. draw</strong> No</li>
|
||||
</ul>
|
||||
|
||||
### opa_layered
|
||||
First draw the object on the layer, then scale down layer opacity factor. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means fully transparent, 255, `LV_OPA_100` or `LV_OPA_COVER` means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency.
|
||||
<ul>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Default</strong> `LV_OPA_COVER`</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Inherited</strong> Yes</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Layout</strong> No</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Ext. draw</strong> No</li>
|
||||
</ul>
|
||||
|
||||
### color_filter_dsc
|
||||
Mix a color to all colors of the object.
|
||||
<ul>
|
||||
@@ -772,7 +781,7 @@ Describes how to blend the colors to the background. The possible values are `LV
|
||||
</ul>
|
||||
|
||||
### layout
|
||||
Set the layout if the object. The children will be repositioned and resized according to the policies set for the layout. For the possible values see the documentation of the layouts.
|
||||
Set the layout of the object. The children will be repositioned and resized according to the policies set for the layout. For the possible values see the documentation of the layouts.
|
||||
<ul>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Default</strong> 0</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Inherited</strong> No</li>
|
||||
|
||||
@@ -43,7 +43,7 @@ Options are passed to the drop-down list as a string with `lv_dropdown_set_optio
|
||||
|
||||
The `lv_dropdown_add_option(dropdown, "New option", pos)` function inserts a new option to `pos` index.
|
||||
|
||||
To save memory the options can set from a static(constant) string too with `lv_dropdown_set_static_options(dropdown, options)`.
|
||||
To save memory the options can set from a static(constant) string too with `lv_dropdown_set_options_static(dropdown, options)`.
|
||||
In this case the options string should be alive while the drop-down list exists and `lv_dropdown_add_option` can't be used
|
||||
|
||||
You can select an option manually with `lv_dropdown_set_selected(dropdown, id)`, where `id` is the index of an option.
|
||||
|
||||
@@ -44,7 +44,9 @@ This is not the case with `lv_label_set_text_static`. The buffer you pass to `lv
|
||||
|
||||
### Text recolor
|
||||
In the text, you can use commands to recolor parts of the text. For example: `"Write a #ff0000 red# word"`.
|
||||
This feature can be enabled individually for each label by `lv_label_set_recolor()` function.
|
||||
This feature can be enabled individually for each label by `lv_label_set_recolor()` function,
|
||||
recoloring is only supported when the text wrapped with `##ff0000 ... #`sintax is in one line,
|
||||
it is not supported in wrapped text, see example `Line wrap, recoloring and scrolling`.
|
||||
|
||||
### Text selection
|
||||
If enabled by `LV_LABEL_TEXT_SELECTION` part of the text can be selected. It's similar to when you use your mouse on a PC to select a text.
|
||||
|
||||
@@ -18,6 +18,8 @@ Options are passed to the Roller as a string with `lv_roller_set_options(roller,
|
||||
|
||||
You can select an option manually with `lv_roller_set_selected(roller, id, LV_ANIM_ON/OFF)`, where *id* is the index of an option.
|
||||
|
||||
If the roller has a lot of options then especially in infinite mode the rendered options of the display might look scrambled. In this case `LV_USE_LARGE_COORD` should be enabled in `lv_conf.h`
|
||||
|
||||
### Get selected option
|
||||
To get the *index* of the currently selected option use `lv_roller_get_selected(roller)`.
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# Calendar (lv_calendar)
|
||||
|
||||
**From v8.1 the header is added directly into the Calendar widget and the API of the headers has been changed.**
|
||||
|
||||
## Overview
|
||||
|
||||
The Calendar object is a classic calendar which can:
|
||||
@@ -13,13 +15,16 @@ The Calendar is added to the default group (if it is set). Calendar is an editab
|
||||
To make the Calendar flexible, by default it doesn't show the current year or month. Instead, there are optional "headers" that can be attached to the calendar.
|
||||
|
||||
## Parts and Styles
|
||||
The calendar object uses the [Button matrix](/widgets/core/btnmatrix) object under the hood to arrange the days into a matrix.
|
||||
- `LV_PART_MAIN` The background of the calendar. Uses all the background related style properties.
|
||||
- `LV_PART_ITEMS` Refers to the dates and day names. Button matrix control flags are set to differentiate the buttons and a custom drawer event is added modify the properties of the buttons as follows:
|
||||
- day names have no border, no background and drawn with a gray color
|
||||
- days of the previous and next month have `LV_BTNMATRIX_CTRL_DISABLED` flag
|
||||
- today has a thicker border with the theme's primary color
|
||||
- highlighted days have some opacity with the theme's primary color.
|
||||
The Calendar is composed of 3 widegets
|
||||
- Container: A rectangle which is a container for the *Header* and the *Days*. Uses only `LV_PART_MAIN` where all the background related style properties are working.
|
||||
- Days: It's a [Button matrix](/widgets/core/btnmatrix) object under the hood to arrange the days into a matrix. `lv_calendar_get_btnmatrix(calendar)` can be used to get it.
|
||||
- `LV_PART_MAIN` The background of the calendar. Uses all the background related style properties.
|
||||
- `LV_PART_ITEMS` Refers to the dates and day names. Button matrix control flags are set to differentiate the buttons and a custom drawer event is added modify the properties of the buttons as follows:
|
||||
- day names have no border, no background and drawn with a gray color
|
||||
- days of the previous and next month have `LV_BTNMATRIX_CTRL_DISABLED` flag
|
||||
- today has a thicker border with the theme's primary color
|
||||
- highlighted days have some opacity with the theme's primary color.
|
||||
- Header: Not created by default, the details are up to the given header.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -40,6 +45,13 @@ Only the array's pointer will be saved so the array should be a static or global
|
||||
The name of the days can be adjusted with `lv_calendar_set_day_names(calendar, day_names)` where `day_names` looks like `const char * day_names[7] = {"Su", "Mo", ...};`
|
||||
Only the pointer of the day names is saved so the elements should be static, global or constant variables.
|
||||
|
||||
### Custom year list
|
||||
|
||||
Sets a custom year list with `lv_calendar_header_dropdown_set_year_list(calendar, years_list)`
|
||||
where ``years_list`` is a pointer to the custom years list. It can be a constant string
|
||||
like ``static const char * years = "2023\n2022\n2021\n2020\n2019";``,
|
||||
or can be generated dynamically into a buffer as well.
|
||||
|
||||
## Events
|
||||
- `LV_EVENT_VALUE_CHANGED` Sent if a date is clicked. `lv_calendar_get_pressed_date(calendar, &date)` set `date` to the date currently being pressed. Returns `LV_RES_OK` if there is a valid pressed date, else `LV_RES_INV`.
|
||||
|
||||
@@ -53,8 +65,6 @@ Learn more about [Keys](/overview/indev).
|
||||
|
||||
## Headers
|
||||
|
||||
**From v8.1 the header is added directly into the Calendar widget and the API of the headers has been changed.**
|
||||
|
||||
### Arrow buttons
|
||||
|
||||
`lv_calendar_header_arrow_create(calendar)` creates a header that contains a left and right arrow on the sides and a text with the current year and month between them.
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# Meter (lv_meter)
|
||||
|
||||
## Overview
|
||||
The Meter widget can visualize data in very flexible ways. In can show arcs, needles, ticks lines and labels.
|
||||
The Meter widget can visualize data in very flexible ways. It can show arcs, needles, ticks lines and labels.
|
||||
|
||||
## Parts and Styles
|
||||
- `LV_PART_MAIN` The background of the Meter. Uses the typical background properties.
|
||||
- `LV_PART_TICK` The tick lines a labels using the *line* and *text* style properties.
|
||||
- `LV_PART_TICKS` The tick lines a labels using the *line* and *text* style properties.
|
||||
- `LV_PART_INDICATOR` The needle line or image using the *line* and *img* style properties, as well as the background properties to draw a square (or circle) on the pivot of the needles. Padding makes the square larger.
|
||||
- `LV_PART_ITEMS` The arcs using the *arc* properties.
|
||||
|
||||
@@ -18,7 +18,7 @@ The Scale has minor and major ticks and labels on the major ticks. Later indicat
|
||||
|
||||
Any number of scales can be added to Meter.
|
||||
|
||||
The minor tick lines can be configured with: `lv_meter_set_scale_ticks(meter, scale, tick_count, line_width, tick_length, ctick_olor)`.
|
||||
The minor tick lines can be configured with: `lv_meter_set_scale_ticks(meter, scale, tick_count, line_width, tick_length, tick_color)`.
|
||||
|
||||
To add major tick lines use `lv_meter_set_scale_major_ticks(meter, scale, nth_major, tick_width, tick_length, tick_color, label_gap)`. `nth_major` to specify how many minor ticks to skip to draw a major tick.
|
||||
|
||||
@@ -46,7 +46,7 @@ All the indicator add functions return `lv_meter_indicator_t *`.
|
||||
`lv_meter_set_indicator_value(meter, inidicator, value)` sets the value of the indicator.
|
||||
|
||||
#### Arc
|
||||
`indic = lv_meter_add_arc(meter, scale, arc_width, arc_color, r_mod)` adds and arc indicator. . By default, the radius of the arc is the same as the scale's radius but `r_mod` changes the radius.
|
||||
`indic = lv_meter_add_arc(meter, scale, arc_width, arc_color, r_mod)` adds an arc indicator. By default, the radius of the arc is the same as the scale's radius but `r_mod` changes the radius.
|
||||
|
||||
`lv_meter_set_indicator_start_value(meter, indic, value)` and `lv_meter_set_indicator_end_value(meter, inidicator, value)` sets the value of the indicator.
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ like label object, the spangroup can be set to one the following modes:
|
||||
use function `lv_spangroup_set_align(spangroup, LV_TEXT_ALIGN_CENTER)` to set text align.
|
||||
|
||||
### Modes
|
||||
The spangroup can be set to one the following modes:
|
||||
The spangroup can be set to one of the following modes:
|
||||
- `LV_SPAN_MODE_FIXED` fixes the object size.
|
||||
- `LV_SPAN_MODE_EXPAND` Expand the object size to the text size but stay on a single line.
|
||||
- `LV_SPAN_MODE_BREAK` Keep width, break the too long lines and auto expand height.
|
||||
@@ -45,14 +45,14 @@ The spangroup can be set to one the following modes:
|
||||
Use `lv_spangroup_set_mode(spangroup, LV_SPAN_MODE_BREAK)` to set object mode.
|
||||
|
||||
### Overflow
|
||||
The spangroup can be set to one the following modes:
|
||||
The spangroup can be set to one of the following modes:
|
||||
- `LV_SPAN_OVERFLOW_CLIP` truncates the text at the limit of the area.
|
||||
- `LV_SPAN_OVERFLOW_ELLIPSIS` will display an ellipsis(`...`) when text overflows the area.
|
||||
|
||||
Use `lv_spangroup_set_overflow(spangroup, LV_SPAN_OVERFLOW_CLIP)` to set object overflow mode.
|
||||
|
||||
### first line indent
|
||||
Use `lv_spangroup_set_indent(spangroup, 20)` to set the indent of the first line. all modes support pixel units, in addition to LV_SPAN_MODE_FIXED and LV_SPAN_MODE_BREAK mode supports percentage units too.
|
||||
Use `lv_spangroup_set_indent(spangroup, 20)` to set the indent of the first line. All modes support pixel units, in addition to LV_SPAN_MODE_FIXED and LV_SPAN_MODE_BREAK mode supports percentage units too.
|
||||
|
||||
### lines
|
||||
Use `lv_spangroup_set_lines(spangroup, 10)` to set the maximum number of lines to be displayed in LV_SPAN_MODE_BREAK mode, negative values indicate no limit.
|
||||
|
||||
@@ -38,7 +38,7 @@ Learn more about [Events](/overview/event).
|
||||
## Keys
|
||||
- `LV_KEY_LEFT/RIGHT` With *Keypad* move the cursor left/right. With *Encoder* decrement/increment the selected digit.
|
||||
- `LV_KEY_UP/DOWN` With *Keypad* and *Encoder* increment/decrement the value.
|
||||
- `LV_KEY_ENTER` With *Encoder* got the net digit. Jump to the first after the last.
|
||||
- `LV_KEY_ENTER` With *Encoder* got the next digit. Jump to the first after the last.
|
||||
|
||||
## Example
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ The parts are identical to the parts of [lv_arc](/widgets/core/arc).
|
||||
To create a spinner use `lv_spinner_create(parent, spin_time, arc_length)`. `spin time` sets the spin time in milliseconds, `arc_length` sets the length of the spinning arc in degrees.
|
||||
|
||||
## Events
|
||||
No special events are sent to the Spinner.
|
||||
No special events are sent by the Spinner.
|
||||
|
||||
See the events of the [Arc](/widgets/core/arc) too.
|
||||
|
||||
|
||||
@@ -63,6 +63,18 @@ install(
|
||||
FILES_MATCHING
|
||||
PATTERN "*.h")
|
||||
|
||||
install(
|
||||
FILES "${LV_CONF_PATH}"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/${INC_INSTALL_DIR}/../"
|
||||
RENAME "lv_conf.h"
|
||||
OPTIONAL)
|
||||
|
||||
configure_file("${LVGL_ROOT_DIR}/lvgl.pc.in" lvgl.pc @ONLY)
|
||||
|
||||
install(
|
||||
FILES "${CMAKE_BINARY_DIR}/lvgl.pc"
|
||||
DESTINATION "${LIB_INSTALL_DIR}/pkgconfig/")
|
||||
|
||||
set_target_properties(
|
||||
lvgl
|
||||
PROPERTIES OUTPUT_NAME lvgl
|
||||
|
||||
@@ -36,8 +36,23 @@
|
||||
<repository type="git">https://github.com/lvgl/lvgl.git</repository>
|
||||
|
||||
<releases>
|
||||
<release date="2023-08-04" version="8.3.9" url="https://raw.githubusercontent.com/lvgl/lvgl/master/env_support/cmsis-pack/LVGL.lvgl.8.3.9.pack">
|
||||
- LVGL 8.3.9
|
||||
<release date="2024-03-19" version="8.4.0" url="https://github.com/lvgl/lvgl/raw/v8.4.0/env_support/cmsis-pack/LVGL.lvgl.8.4.0.pack">
|
||||
- LVGL 8.4.0
|
||||
- Some minor fixes
|
||||
</release>
|
||||
<release date="2023-12-05" version="8.3.11" url="https://github.com/lvgl/lvgl/raw/v8.3.11/env_support/cmsis-pack/LVGL.lvgl.8.3.11.pack">
|
||||
- LVGL 8.3.11
|
||||
- Add LittleFS Library to LVGL8
|
||||
- Backport Tiny TTF to LVGL8
|
||||
- Some minor fixes
|
||||
</release>
|
||||
<release date="2023-09-19" version="8.3.10" url="https://github.com/lvgl/lvgl/raw/9e388055ec0bcad5179461e66d6dac6823129eee/env_support/cmsis-pack/LVGL.lvgl.8.3.10.pack">
|
||||
- LVGL 8.3.10
|
||||
- Some minor fixes
|
||||
</release>
|
||||
|
||||
<release date="2023-08-04" version="8.3.9" url="https://github.com/lvgl/lvgl/raw/bdf5bfb88ce107f16cf9128cf75e61394b3219d0/env_support/cmsis-pack/LVGL.lvgl.8.3.9.pack">
|
||||
- LVGL 8.3.10
|
||||
- Add snapshot, fragment, imgfont, gridnav, msg and monkey
|
||||
- Other minor fixes
|
||||
</release>
|
||||
@@ -299,7 +314,7 @@
|
||||
-->
|
||||
|
||||
<components>
|
||||
<bundle Cbundle="LVGL" Cclass="LVGL" Cversion="8.3.9">
|
||||
<bundle Cbundle="LVGL" Cclass="LVGL" Cversion="8.4.0">
|
||||
<description>LVGL (Light and Versatile Graphics Library) is a free and open-source graphics library providing everything you need to create an embedded GUI with easy-to-use graphical elements, beautiful visual effects and a low memory footprint.</description>
|
||||
<doc></doc>
|
||||
<component Cgroup="lvgl" Csub="Essential" >
|
||||
@@ -432,7 +447,7 @@
|
||||
<file category="sourceC" name="src/widgets/lv_textarea.c" />
|
||||
|
||||
<!-- general -->
|
||||
<file category="preIncludeGlobal" name="lv_conf_cmsis.h" attr="config" version="1.0.3" />
|
||||
<file category="preIncludeGlobal" name="lv_conf_cmsis.h" attr="config" version="1.0.5" />
|
||||
<file category="sourceC" name="lv_cmsis_pack.c" attr="config" version="1.0.0" />
|
||||
<file category="header" name="lvgl.h" />
|
||||
<file category="doc" name="README.md"/>
|
||||
@@ -717,9 +732,26 @@
|
||||
<file category="sourceC" name="src/extra/libs/fsdrv/lv_fs_fatfs.c" />
|
||||
<file category="sourceC" name="src/extra/libs/fsdrv/lv_fs_posix.c" />
|
||||
<file category="sourceC" name="src/extra/libs/fsdrv/lv_fs_stdio.c" />
|
||||
<file category="sourceC" name="src/extra/libs/fsdrv/lv_fs_littlefs.c" />
|
||||
</files>
|
||||
|
||||
</component>
|
||||
|
||||
<component Cgroup="lvgl" Csub="Libs Tiny TTF" condition="LVGL-Essential">
|
||||
<description>Add Tiny TTF Library</description>
|
||||
<files>
|
||||
<!-- src/extra/libs/tiny_ttf -->
|
||||
<file category="sourceC" name="src/extra/libs/tiny_ttf/lv_tiny_ttf.c" />
|
||||
</files>
|
||||
|
||||
<RTE_Components_h>
|
||||
|
||||
/*! \brief enable Tiny TTF Library */
|
||||
#define LV_USE_TINY_TTF 1
|
||||
</RTE_Components_h>
|
||||
|
||||
</component>
|
||||
|
||||
|
||||
<component Cgroup="lvgl" Csub="Libs RLOTTIE" condition="LVGL-Essential">
|
||||
<description>Add RLOTTIE support, an extra librbary is required.</description>
|
||||
@@ -731,7 +763,7 @@
|
||||
<RTE_Components_h>
|
||||
|
||||
/*! \brief enable RLOTTIE support */
|
||||
#define LV_USE_RLOTTIE 1
|
||||
#define LV_USE_RLOTTIE 1
|
||||
</RTE_Components_h>
|
||||
|
||||
</component>
|
||||
@@ -746,7 +778,7 @@
|
||||
<RTE_Components_h>
|
||||
|
||||
/*! \brief enable ffmpeg support */
|
||||
#define LV_USE_FFMPEG 1
|
||||
#define LV_USE_FFMPEG 1
|
||||
</RTE_Components_h>
|
||||
|
||||
</component>
|
||||
@@ -761,7 +793,7 @@
|
||||
<RTE_Components_h>
|
||||
|
||||
/*! \brief enable ffmpeg support */
|
||||
#define LV_USE_IME_PINYIN 1
|
||||
#define LV_USE_IME_PINYIN 1
|
||||
</RTE_Components_h>
|
||||
|
||||
</component>
|
||||
@@ -807,7 +839,7 @@
|
||||
<RTE_Components_h>
|
||||
|
||||
/*! \brief enable the Grid Navigation support*/
|
||||
#define LV_USE_GRIDNAV 1
|
||||
#define LV_USE_GRIDNAV 1
|
||||
</RTE_Components_h>
|
||||
|
||||
</component>
|
||||
@@ -822,7 +854,7 @@
|
||||
<RTE_Components_h>
|
||||
|
||||
/*! \brief enable the image font support*/
|
||||
#define LV_USE_IMGFONT 1
|
||||
#define LV_USE_IMGFONT 1
|
||||
</RTE_Components_h>
|
||||
|
||||
</component>
|
||||
@@ -837,7 +869,7 @@
|
||||
<RTE_Components_h>
|
||||
|
||||
/*! \brief enable the monkey service support*/
|
||||
#define LV_USE_MONKEY 1
|
||||
#define LV_USE_MONKEY 1
|
||||
</RTE_Components_h>
|
||||
|
||||
</component>
|
||||
@@ -852,7 +884,7 @@
|
||||
<RTE_Components_h>
|
||||
|
||||
/*! \brief enable the message service support*/
|
||||
#define LV_USE_MSG 1
|
||||
#define LV_USE_MSG 1
|
||||
</RTE_Components_h>
|
||||
|
||||
</component>
|
||||
@@ -881,7 +913,7 @@
|
||||
<RTE_Components_h>
|
||||
|
||||
/*! \brief enable demo:bencharmk */
|
||||
#define LV_USE_DEMO_BENCHMARK 1
|
||||
#define LV_USE_DEMO_BENCHMARK 1
|
||||
</RTE_Components_h>
|
||||
|
||||
</component>
|
||||
@@ -901,7 +933,7 @@
|
||||
<RTE_Components_h>
|
||||
|
||||
/*! \brief enable demo:widgets support */
|
||||
#define LV_USE_DEMO_WIDGETS 1
|
||||
#define LV_USE_DEMO_WIDGETS 1
|
||||
</RTE_Components_h>
|
||||
|
||||
</component>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<index schemaVersion="1.0.0" xs:noNamespaceSchemaLocation="PackIndex.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<vendor>LVGL</vendor>
|
||||
<url>https://raw.githubusercontent.com/lvgl/lvgl/master/env_support/cmsis-pack/</url>
|
||||
<timestamp>2023-08-04</timestamp>
|
||||
<timestamp>2024-3-19</timestamp>
|
||||
<pindex>
|
||||
<pdsc url="https://raw.githubusercontent.com/lvgl/lvgl/release/v8.3/env_support/cmsis-pack/" vendor="LVGL" name="lvgl" version="8.3.9"/>
|
||||
<pdsc url="https://raw.githubusercontent.com/lvgl/lvgl/release/v8.3/env_support/cmsis-pack/" vendor="LVGL" name="lvgl" version="8.4.0"/>
|
||||
</pindex>
|
||||
</index>
|
||||
@@ -35,7 +35,9 @@ remove the misleading guide above this code segment.
|
||||
#define LV_CONF_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "RTE_Components.h"
|
||||
#if defined(_RTE_)
|
||||
#include "RTE_Components.h"
|
||||
#endif
|
||||
...
|
||||
```
|
||||
|
||||
@@ -46,12 +48,33 @@ remove the misleading guide above this code segment.
|
||||
- LV_USE_GPU_SWM341_DMA2D
|
||||
- LV_USE_GPU_ARM2D
|
||||
- LV_USE_IME_PINYIN
|
||||
- LV_USE_PNG
|
||||
- LV_USE_BMP
|
||||
- LV_USE_SJPG
|
||||
- LV_USE_GIF
|
||||
- LV_USE_QRCODE
|
||||
- LV_USE_FREETYPE
|
||||
- LV_USE_TINY_TTF
|
||||
- LV_USE_RLOTTIE
|
||||
- LV_USE_FFMPEG
|
||||
- LV_USE_SNAPSHOT
|
||||
- LV_USE_MONKEY
|
||||
- LV_USE_GRIDNAV
|
||||
- LV_USE_FRAGMENT
|
||||
- LV_USE_IMGFONT
|
||||
- LV_USE_MSG
|
||||
- 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
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN __attribute__((aligned(4)))
|
||||
```
|
||||
Update macro `LV_MEM_SIZE` to `(64*1024U)`.
|
||||
|
||||
Update macro `LV_FONT_MONTSERRAT_12` to `1`.
|
||||
|
||||
Update macro `LV_FONT_MONTSERRAT_12` to `1`.
|
||||
|
||||
6. Update Theme related macros:
|
||||
|
||||
```c
|
||||
@@ -89,25 +112,41 @@ Update macro `LV_MEM_SIZE` to `(64*1024U)`.
|
||||
#define LV_TICK_CUSTOM 1
|
||||
#if LV_TICK_CUSTOM
|
||||
extern uint32_t SystemCoreClock;
|
||||
#define LV_TICK_CUSTOM_INCLUDE "perf_counter.h"
|
||||
|
||||
#if __PER_COUNTER_VER__ < 10902ul
|
||||
#define LV_TICK_CUSTOM_SYS_TIME_EXPR ((uint32_t)get_system_ticks() / (SystemCoreClock / 1000ul))
|
||||
#else
|
||||
#define LV_TICK_CUSTOM_SYS_TIME_EXPR get_system_ms()
|
||||
#endif
|
||||
#define LV_TICK_CUSTOM_INCLUDE "perf_counter.h"
|
||||
#define LV_TICK_CUSTOM_SYS_TIME_EXPR get_system_ms()
|
||||
#endif /*LV_TICK_CUSTOM*/
|
||||
#else
|
||||
#define LV_TICK_CUSTOM 0
|
||||
#if LV_TICK_CUSTOM
|
||||
#define LV_TICK_CUSTOM_INCLUDE "Arduino.h" /*Header for the system time function*/
|
||||
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current system time in ms*/
|
||||
/*If using lvgl as ESP32 component*/
|
||||
// #define LV_TICK_CUSTOM_INCLUDE "esp_timer.h"
|
||||
// #define LV_TICK_CUSTOM_SYS_TIME_EXPR ((esp_timer_get_time() / 1000LL))
|
||||
#endif /*LV_TICK_CUSTOM*/
|
||||
#endif /*__PERF_COUNTER__*/
|
||||
```
|
||||
9. Thoroughly remove the `DEMO USAGE` section.
|
||||
10. Thoroughly remove the '3rd party libraries' section.
|
||||
10. rename '**lv_conf_template.h**' to '**lv_conf_cmsis.h**'.
|
||||
|
||||
|
||||
9. Remove all content in `DEMO USAGE` section but keep the following:
|
||||
|
||||
```c
|
||||
/*Show some widget. It might be required to increase `LV_MEM_SIZE` */
|
||||
#if LV_USE_DEMO_WIDGETS
|
||||
#define LV_DEMO_WIDGETS_SLIDESHOW 0
|
||||
#endif
|
||||
|
||||
/*Benchmark your system*/
|
||||
#if LV_USE_DEMO_BENCHMARK
|
||||
/*Use RGB565A8 images with 16 bit color depth instead of ARGB8565*/
|
||||
#define LV_DEMO_BENCHMARK_RGB565A8 1
|
||||
#endif
|
||||
```
|
||||
|
||||
|
||||
|
||||
10. Thoroughly remove the `3rd party libraries` section.
|
||||
11. rename '**lv_conf_template.h**' to '**lv_conf_cmsis.h**'.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @file lv_conf.h
|
||||
* Configuration file for v8.3.9
|
||||
* Configuration file for v8.4.0
|
||||
*/
|
||||
|
||||
/* clang-format off */
|
||||
@@ -10,7 +10,10 @@
|
||||
#define LV_CONF_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "RTE_Components.h"
|
||||
|
||||
#if defined(_RTE_)
|
||||
#include "RTE_Components.h"
|
||||
#endif
|
||||
|
||||
/*====================
|
||||
COLOR SETTINGS
|
||||
@@ -76,6 +79,7 @@
|
||||
/*Input device read period in milliseconds*/
|
||||
#define LV_INDEV_DEF_READ_PERIOD 30 /*[ms]*/
|
||||
|
||||
|
||||
/*Use a custom tick source that tells the elapsed time in milliseconds.
|
||||
*It removes the need to manually update the tick with `lv_tick_inc()`)*/
|
||||
#ifdef __PERF_COUNTER__
|
||||
@@ -90,12 +94,13 @@
|
||||
#if LV_TICK_CUSTOM
|
||||
#define LV_TICK_CUSTOM_INCLUDE "Arduino.h" /*Header for the system time function*/
|
||||
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current system time in ms*/
|
||||
/*If using lvgl as ESP32 component*/
|
||||
// #define LV_TICK_CUSTOM_INCLUDE "esp_timer.h"
|
||||
// #define LV_TICK_CUSTOM_SYS_TIME_EXPR ((esp_timer_get_time() / 1000LL))
|
||||
/*If using lvgl as ESP32 component*/
|
||||
// #define LV_TICK_CUSTOM_INCLUDE "esp_timer.h"
|
||||
// #define LV_TICK_CUSTOM_SYS_TIME_EXPR ((esp_timer_get_time() / 1000LL))
|
||||
#endif /*LV_TICK_CUSTOM*/
|
||||
#endif /*__PERF_COUNTER__*/
|
||||
|
||||
|
||||
/*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]*/
|
||||
@@ -178,6 +183,7 @@
|
||||
* GPU
|
||||
*-----------*/
|
||||
|
||||
|
||||
/*Use STM32's DMA2D (aka Chrom Art) GPU*/
|
||||
#if LV_USE_GPU_STM32_DMA2D
|
||||
/*Must be defined to include path of CMSIS header of target processor
|
||||
@@ -185,6 +191,13 @@
|
||||
#define LV_GPU_DMA2D_CMSIS_INCLUDE
|
||||
#endif
|
||||
|
||||
/*Enable RA6M3 G2D GPU*/
|
||||
#if LV_USE_GPU_RA6M3_G2D
|
||||
/*include path of target processor
|
||||
e.g. "hal_data.h"*/
|
||||
#define LV_GPU_RA6M3_G2D_INCLUDE "hal_data.h"
|
||||
#endif
|
||||
|
||||
/*Use SWM341's DMA2D GPU*/
|
||||
#if LV_USE_GPU_SWM341_DMA2D
|
||||
#define LV_GPU_SWM341_DMA2D_INCLUDE "SWM341.h"
|
||||
@@ -200,22 +213,6 @@
|
||||
#define LV_USE_GPU_NXP_PXP_AUTO_INIT 0
|
||||
#endif
|
||||
|
||||
#if LV_USE_GPU_RA6M3_G2D
|
||||
/*include path of target processor
|
||||
e.g. "hal_data.h"*/
|
||||
#define LV_GPU_RA6M3_G2D_INCLUDE "hal_data.h"
|
||||
#endif
|
||||
|
||||
/*Use SDL renderer API*/
|
||||
#define LV_USE_GPU_SDL 0
|
||||
#if LV_USE_GPU_SDL
|
||||
#define LV_GPU_SDL_INCLUDE_PATH <SDL2/SDL.h>
|
||||
/*Texture cache size, 8MB by default*/
|
||||
#define LV_GPU_SDL_LRU_SIZE (1024 * 1024 * 8)
|
||||
/*Custom blend mode for mask drawing, disable if you need to link with older SDL2 lib*/
|
||||
#define LV_GPU_SDL_CUSTOM_BLEND_MODE (SDL_VERSION_ATLEAST(2, 0, 6))
|
||||
#endif
|
||||
|
||||
/*-------------
|
||||
* Logging
|
||||
*-----------*/
|
||||
@@ -231,11 +228,11 @@
|
||||
*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_USER
|
||||
#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 1
|
||||
#define LV_LOG_PRINTF 0
|
||||
|
||||
/*Enable/disable LV_LOG_TRACE in modules that produces a huge number of logs*/
|
||||
#define LV_LOG_TRACE_MEM 1
|
||||
@@ -588,7 +585,6 @@
|
||||
#define LV_USE_THEME_BASIC 0
|
||||
#define LV_USE_THEME_MONO 0
|
||||
#endif
|
||||
|
||||
/*-----------
|
||||
* Layouts
|
||||
*----------*/
|
||||
@@ -599,28 +595,86 @@
|
||||
/*A layout similar to Grid in CSS.*/
|
||||
#define LV_USE_GRID 1
|
||||
|
||||
/*---------------------
|
||||
* 3rd party libraries
|
||||
*--------------------*/
|
||||
|
||||
/*File system interfaces for common APIs */
|
||||
|
||||
/*API for fopen, fread, etc*/
|
||||
#define LV_USE_FS_STDIO 0
|
||||
#if LV_USE_FS_STDIO
|
||||
#define LV_FS_STDIO_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
|
||||
#define LV_FS_STDIO_PATH "" /*Set the working directory. File/directory paths will be appended to it.*/
|
||||
#define LV_FS_STDIO_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
|
||||
#endif
|
||||
|
||||
/*API for open, read, etc*/
|
||||
#define LV_USE_FS_POSIX 0
|
||||
#if LV_USE_FS_POSIX
|
||||
#define LV_FS_POSIX_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
|
||||
#define LV_FS_POSIX_PATH "" /*Set the working directory. File/directory paths will be appended to it.*/
|
||||
#define LV_FS_POSIX_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
|
||||
#endif
|
||||
|
||||
/*API for CreateFile, ReadFile, etc*/
|
||||
#define LV_USE_FS_WIN32 0
|
||||
#if LV_USE_FS_WIN32
|
||||
#define LV_FS_WIN32_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
|
||||
#define LV_FS_WIN32_PATH "" /*Set the working directory. File/directory paths will be appended to it.*/
|
||||
#define LV_FS_WIN32_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
|
||||
#endif
|
||||
|
||||
/*API for FATFS (needs to be added separately). Uses f_open, f_read, etc*/
|
||||
#define LV_USE_FS_FATFS 0
|
||||
#if LV_USE_FS_FATFS
|
||||
#define LV_FS_FATFS_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
|
||||
#define LV_FS_FATFS_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
|
||||
#endif
|
||||
|
||||
/*API for LittleFS (library needs to be added separately). Uses lfs_file_open, lfs_file_read, etc*/
|
||||
#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')*/
|
||||
#define LV_FS_LITTLEFS_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*FreeType library*/
|
||||
#if LV_USE_FREETYPE
|
||||
/*Memory used by FreeType to cache characters [bytes] (-1: no caching)*/
|
||||
#define LV_FREETYPE_CACHE_SIZE (16 * 1024)
|
||||
#if LV_FREETYPE_CACHE_SIZE >= 0
|
||||
/* 1: bitmap cache use the sbit cache, 0:bitmap cache use the image cache. */
|
||||
/* sbit cache:it is much more memory efficient for small bitmaps(font size < 256) */
|
||||
/* if font size >= 256, must be configured as image cache */
|
||||
#define LV_FREETYPE_SBIT_CACHE 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 0
|
||||
#define LV_FREETYPE_CACHE_FT_SIZES 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*Tiny TTF library*/
|
||||
#if LV_USE_TINY_TTF
|
||||
/*Load TTF data from files*/
|
||||
#define LV_TINY_TTF_FILE_SUPPORT 0
|
||||
#endif
|
||||
|
||||
|
||||
/*FFmpeg library for image decoding and playing videos
|
||||
*Supports all major image formats so do not enable other image decoder with it*/
|
||||
#if LV_USE_FFMPEG
|
||||
/*Dump input information to stderr*/
|
||||
#define LV_FFMPEG_DUMP_FORMAT 0
|
||||
#endif
|
||||
|
||||
/*-----------
|
||||
* Others
|
||||
*----------*/
|
||||
|
||||
/*1: Enable API to take snapshot for object*/
|
||||
#define LV_USE_SNAPSHOT 0
|
||||
|
||||
/*1: Enable Monkey test*/
|
||||
#define LV_USE_MONKEY 0
|
||||
|
||||
/*1: Enable grid navigation*/
|
||||
#define LV_USE_GRIDNAV 0
|
||||
|
||||
/*1: Enable lv_obj fragment*/
|
||||
#define LV_USE_FRAGMENT 0
|
||||
|
||||
/*1: Support using images as font in label or span widgets */
|
||||
#define LV_USE_IMGFONT 0
|
||||
|
||||
/*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
|
||||
@@ -645,6 +699,20 @@
|
||||
/*Enable the examples to be built with the library*/
|
||||
#define LV_BUILD_EXAMPLES 1
|
||||
|
||||
/*===================
|
||||
* DEMO USAGE
|
||||
====================*/
|
||||
|
||||
/*Show some widget. It might be required to increase `LV_MEM_SIZE` */
|
||||
#if LV_USE_DEMO_WIDGETS
|
||||
#define LV_DEMO_WIDGETS_SLIDESHOW 0
|
||||
#endif
|
||||
|
||||
/*Benchmark your system*/
|
||||
#if LV_USE_DEMO_BENCHMARK
|
||||
/*Use RGB565A8 images with 16 bit color depth instead of ARGB8565*/
|
||||
#define LV_DEMO_BENCHMARK_RGB565A8 1
|
||||
#endif
|
||||
|
||||
/*--END OF LV_CONF_H--*/
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ static int lvgl_thread_init(void)
|
||||
rt_err_t err;
|
||||
|
||||
err = rt_thread_init(&lvgl_thread, "LVGL", lvgl_thread_entry, RT_NULL,
|
||||
&lvgl_thread_stack[0], sizeof(lvgl_thread_stack), PKG_LVGL_THREAD_PRIO, 0);
|
||||
&lvgl_thread_stack[0], sizeof(lvgl_thread_stack), PKG_LVGL_THREAD_PRIO, 10);
|
||||
if(err != RT_EOK)
|
||||
{
|
||||
LOG_E("Failed to create LVGL thread");
|
||||
|
||||
@@ -43,7 +43,6 @@ void lv_example_anim_1(void)
|
||||
lv_label_set_text(label, "Hello animations!");
|
||||
lv_obj_set_pos(label, 100, 10);
|
||||
|
||||
|
||||
lv_obj_t * sw = lv_switch_create(lv_scr_act());
|
||||
lv_obj_center(sw);
|
||||
lv_obj_add_state(sw, LV_STATE_CHECKED);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "../lv_examples.h"
|
||||
#if LV_BUILD_EXAMPLES && LV_USE_SWITCH
|
||||
|
||||
|
||||
static void anim_x_cb(void * var, int32_t v)
|
||||
{
|
||||
lv_obj_set_x(var, v);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "../../lv_examples.h"
|
||||
#if LV_USE_GRID && LV_BUILD_EXAMPLES
|
||||
|
||||
|
||||
/**
|
||||
* Demonstrate cell placement and span
|
||||
*/
|
||||
|
||||
@@ -9,7 +9,6 @@ void lv_example_grid_4(void)
|
||||
static lv_coord_t col_dsc[] = {60, 60, 60, LV_GRID_TEMPLATE_LAST};
|
||||
static lv_coord_t row_dsc[] = {45, 45, 45, LV_GRID_TEMPLATE_LAST};
|
||||
|
||||
|
||||
/*Add space between the columns and move the rows to the bottom (end)*/
|
||||
|
||||
/*Create a container with grid*/
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#if LV_BUILD_EXAMPLES
|
||||
#if LV_USE_FFMPEG
|
||||
|
||||
|
||||
/**
|
||||
* Open an image from a file
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "../../../lvgl.h"
|
||||
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "../../../lvgl.h"
|
||||
#if LV_USE_PNG && LV_BUILD_EXAMPLES
|
||||
|
||||
|
||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
@@ -1 +1 @@
|
||||
CSRCS += $(shell find -L $(LVGL_DIR)/$(LVGL_DIR_NAME)/examples -name \*.c)
|
||||
CSRCS += $(shell find -L $(LVGL_DIR)/$(LVGL_DIR_NAME)/examples -name "*.c")
|
||||
|
||||
@@ -23,7 +23,7 @@ static const lv_fragment_class_t sample_cls = {
|
||||
.constructor_cb = sample_fragment_ctor,
|
||||
.create_obj_cb = sample_fragment_create_obj,
|
||||
.instance_size = sizeof(struct sample_fragment_t)
|
||||
};
|
||||
};
|
||||
|
||||
void lv_example_fragment_1(void)
|
||||
{
|
||||
@@ -37,7 +37,6 @@ void lv_example_fragment_1(void)
|
||||
lv_fragment_manager_replace(manager, fragment, &root);
|
||||
}
|
||||
|
||||
|
||||
static void sample_fragment_ctor(lv_fragment_t * self, void * args)
|
||||
{
|
||||
((struct sample_fragment_t *) self)->name = args;
|
||||
|
||||
@@ -66,7 +66,6 @@ void lv_example_fragment_2(void)
|
||||
lv_obj_add_event_cb(pop_btn, sample_pop_click, LV_EVENT_CLICKED, manager);
|
||||
}
|
||||
|
||||
|
||||
static void sample_fragment_ctor(lv_fragment_t * self, void * args)
|
||||
{
|
||||
LV_UNUSED(args);
|
||||
|
||||
@@ -16,7 +16,6 @@ void lv_example_gridnav_2(void)
|
||||
lv_obj_set_style_bg_color(list1, lv_palette_lighten(LV_PALETTE_BLUE, 5), LV_STATE_FOCUSED);
|
||||
lv_group_add_obj(lv_group_get_default(), list1);
|
||||
|
||||
|
||||
char buf[32];
|
||||
uint32_t i;
|
||||
for(i = 0; i < 15; i++) {
|
||||
|
||||
@@ -46,7 +46,6 @@ void lv_example_gridnav_3(void)
|
||||
label = lv_label_create(btn);
|
||||
lv_label_set_text(label, "Button 2");
|
||||
|
||||
|
||||
/*Create an other container with long text to show how LV_GRIDNAV_CTRL_SCROLL_FIRST works*/
|
||||
lv_obj_t * cont_sub1 = lv_obj_create(cont_main);
|
||||
lv_obj_set_size(cont_sub1, lv_pct(100), 100);
|
||||
@@ -93,9 +92,6 @@ void lv_example_gridnav_3(void)
|
||||
label = lv_label_create(btn);
|
||||
lv_label_set_text(label, "Button 4");
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "../../lv_examples.h"
|
||||
#if LV_USE_GRIDNAV && LV_USE_FLEX && LV_BUILD_EXAMPLES
|
||||
|
||||
|
||||
static void event_handler(lv_event_t * e)
|
||||
{
|
||||
lv_obj_t * obj = lv_event_get_target(e);
|
||||
|
||||
@@ -69,13 +69,11 @@ void lv_example_msg_3(void)
|
||||
lv_obj_add_event_cb(slider, slider_event_cb, LV_EVENT_ALL, NULL);
|
||||
lv_msg_subsribe_obj(MSG_UPDATE, slider, NULL);
|
||||
|
||||
|
||||
/* As there are new UI elements that don't know the system's state
|
||||
* send an UPDATE REQUEST message which will trigger an UPDATE message with the current value*/
|
||||
lv_msg_send(MSG_UPDATE_REQUEST, NULL);
|
||||
}
|
||||
|
||||
|
||||
static void value_handler(void * s, lv_msg_t * m)
|
||||
{
|
||||
LV_UNUSED(s);
|
||||
@@ -106,7 +104,6 @@ static void value_handler(void * s, lv_msg_t * m)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void btn_event_cb(lv_event_t * e)
|
||||
{
|
||||
lv_obj_t * btn = lv_event_get_target(e);
|
||||
|
||||
@@ -199,7 +199,6 @@ static void disp_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_colo
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
#else /*Enable this file at the top*/
|
||||
|
||||
/*This dummy typedef exists purely to silence -Wpedantic.*/
|
||||
|
||||
@@ -32,7 +32,6 @@ void lv_example_scroll_4(void);
|
||||
void lv_example_scroll_5(void);
|
||||
void lv_example_scroll_6(void);
|
||||
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "../lv_examples.h"
|
||||
#if LV_BUILD_EXAMPLES && LV_USE_LIST
|
||||
|
||||
|
||||
/**
|
||||
* Styling the scrollbars
|
||||
*/
|
||||
@@ -28,7 +27,6 @@ void lv_example_scroll_4(void)
|
||||
"Fusce molestie rhoncus nisi sit amet tincidunt. \n"
|
||||
"Suspendisse a nunc ut magna ornare volutpat.");
|
||||
|
||||
|
||||
/*Remove the style of scrollbar to have clean start*/
|
||||
lv_obj_remove_style(obj, NULL, LV_PART_SCROLLBAR | LV_STATE_ANY);
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "../lv_examples.h"
|
||||
#if LV_BUILD_EXAMPLES && LV_FONT_DEJAVU_16_PERSIAN_HEBREW
|
||||
|
||||
|
||||
/**
|
||||
* Scrolling with Right To Left base direction
|
||||
*/
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "../lv_examples.h"
|
||||
#if LV_BUILD_EXAMPLES && LV_USE_IMG
|
||||
|
||||
|
||||
static lv_style_t style_btn;
|
||||
|
||||
/*Will be called when the styles of the base theme are already added
|
||||
@@ -36,8 +35,6 @@ static void new_theme_init_and_set(void)
|
||||
lv_disp_set_theme(NULL, &th_new);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Extending the current theme
|
||||
*/
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#include "../lv_examples.h"
|
||||
#if LV_BUILD_EXAMPLES && LV_USE_BTN && LV_USE_LABEL
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Opacity and Transformations
|
||||
*/
|
||||
|
||||