From fce6d2982eab55d77f0932f37859e95c2e6719db Mon Sep 17 00:00:00 2001 From: Gabor Date: Thu, 24 Aug 2017 15:56:02 +0200 Subject: [PATCH 1/4] add 'misc' as submodule --- .gitmodules | 3 +++ misc | 1 + 2 files changed, 4 insertions(+) create mode 100644 .gitmodules create mode 160000 misc diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..54a610744 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "misc"] + path = misc + url = https://github.com/littlevgl/misc diff --git a/misc b/misc new file mode 160000 index 000000000..3103b9107 --- /dev/null +++ b/misc @@ -0,0 +1 @@ +Subproject commit 3103b91078906dfaf328c315ea82a731c11664d8 From 9405abb3fd508c831ed47f168669b87de2e15585 Mon Sep 17 00:00:00 2001 From: Gabor Date: Thu, 24 Aug 2017 17:01:54 +0200 Subject: [PATCH 2/4] Add misc and hal --- hal | 1 + lv_app/lv_app.c | 2 +- lv_app/lv_app_util/lv_app_notice.c | 2 +- lv_appx/lv_app_ethernet.c | 2 +- lv_appx/lv_app_files.c | 2 +- lv_appx/lv_app_gsm.c | 4 +-- lv_appx/lv_app_sysmon.c | 6 ++--- lv_appx/lv_app_wifi.c | 6 ++--- lv_draw/lv_draw.c | 10 +++---- lv_draw/lv_draw.h | 2 +- lv_draw/lv_draw_rbasic.c | 8 +++--- lv_draw/lv_draw_rbasic.h | 6 ++--- lv_draw/lv_draw_vbasic.c | 8 +++--- lv_draw/lv_draw_vbasic.h | 6 ++--- lv_obj/lv_dispi.c | 16 ++++++----- lv_obj/lv_obj.c | 43 ++++++++++++++++-------------- lv_obj/lv_obj.h | 8 +++--- lv_obj/lv_refr.c | 6 ++--- lv_obj/lv_style.c | 2 +- lv_obj/lv_style.h | 8 +++--- lv_obj/lv_vdb.c | 4 +-- lv_obj/lv_vdb.h | 4 +-- lv_objx/lv_bar.c | 2 +- lv_objx/lv_btn.c | 4 +-- lv_objx/lv_btnm.c | 2 +- lv_objx/lv_cont.c | 6 ++--- lv_objx/lv_ddlist.c | 2 +- lv_objx/lv_gauge.c | 6 ++--- lv_objx/lv_img.c | 6 ++--- lv_objx/lv_img.h | 4 +-- lv_objx/lv_label.c | 8 +++--- lv_objx/lv_label.h | 4 +-- lv_objx/lv_line.c | 2 +- lv_objx/lv_list.c | 4 +-- lv_objx/lv_lmeter.c | 2 +- lv_objx/lv_mbox.c | 4 +-- lv_objx/lv_page.c | 4 +-- lv_objx/lv_slider.c | 2 +- lv_objx/lv_ta.c | 2 +- lv_objx/lv_tabview.c | 2 +- misc | 2 +- 41 files changed, 115 insertions(+), 109 deletions(-) create mode 160000 hal diff --git a/hal b/hal new file mode 160000 index 000000000..597fd86a7 --- /dev/null +++ b/hal @@ -0,0 +1 @@ +Subproject commit 597fd86a782942df3ff7486da8a23831fe73681f diff --git a/lv_app/lv_app.c b/lv_app/lv_app.c index 6b062faaa..b5173143d 100644 --- a/lv_app/lv_app.c +++ b/lv_app/lv_app.c @@ -10,7 +10,7 @@ #if LV_APP_ENABLE != 0 #include -#include "misc/gfx/anim.h" +#include "../misc/gfx/anim.h" #include "lvgl/lv_obj/lv_refr.h" diff --git a/lv_app/lv_app_util/lv_app_notice.c b/lv_app/lv_app_util/lv_app_notice.c index d49e7e7e2..e436e1233 100644 --- a/lv_app/lv_app_util/lv_app_notice.c +++ b/lv_app/lv_app_util/lv_app_notice.c @@ -12,7 +12,7 @@ #include "../../lv_objx/lv_cont.h" #include "../../lv_objx/lv_label.h" -#include "misc/gfx/anim.h" +#include "../misc/gfx/anim.h" #include /********************* diff --git a/lv_appx/lv_app_ethernet.c b/lv_appx/lv_app_ethernet.c index 64e49d4fc..d6526867a 100644 --- a/lv_appx/lv_app_ethernet.c +++ b/lv_appx/lv_app_ethernet.c @@ -11,7 +11,7 @@ #include "../lv_app/lv_app_util/lv_app_kb.h" #include "hal/eth/eth.h" -#include "misc/os/ptask.h" +#include "../misc/os/ptask.h" #include "hal/systick/systick.h" #include diff --git a/lv_appx/lv_app_files.c b/lv_appx/lv_app_files.c index 6645e9abb..af5608d33 100644 --- a/lv_appx/lv_app_files.c +++ b/lv_appx/lv_app_files.c @@ -10,7 +10,7 @@ #if LV_APP_ENABLE != 0 && USE_LV_APP_FILES != 0 #include -#include "misc/os/ptask.h" +#include "../misc/os/ptask.h" #include "../lv_app/lv_app_util/lv_app_kb.h" #include "../lv_app/lv_app_util/lv_app_notice.h" diff --git a/lv_appx/lv_app_gsm.c b/lv_appx/lv_app_gsm.c index a60f7b8cd..6cfb0d93a 100644 --- a/lv_appx/lv_app_gsm.c +++ b/lv_appx/lv_app_gsm.c @@ -11,9 +11,9 @@ #include "../lv_app/lv_app_util/lv_app_kb.h" #include "hal/gsm/gsm.h" -#include "misc/os/ptask.h" +#include "../misc/os/ptask.h" #include "hal/systick/systick.h" -#include "misc/comm/gsmmng.h" +#include "../misc/comm/gsmmng.h" #include /********************* diff --git a/lv_appx/lv_app_sysmon.c b/lv_appx/lv_app_sysmon.c index c898ddee5..c0054509e 100644 --- a/lv_appx/lv_app_sysmon.c +++ b/lv_appx/lv_app_sysmon.c @@ -10,11 +10,11 @@ #if LV_APP_ENABLE != 0 && USE_LV_APP_SYSMON != 0 #include -#include "misc/os/ptask.h" -#include "misc/os/idle.h" +#include "../misc/os/ptask.h" +#include "../misc/os/idle.h" #include "lvgl/lv_objx/lv_chart.h" #include "lvgl/lv_app/lv_app_util/lv_app_notice.h" -#include "hal/systick/systick.h" +#include "../hal/systick/systick.h" /********************* * DEFINES diff --git a/lv_appx/lv_app_wifi.c b/lv_appx/lv_app_wifi.c index 497c7139b..148893e03 100644 --- a/lv_appx/lv_app_wifi.c +++ b/lv_appx/lv_app_wifi.c @@ -11,10 +11,10 @@ #include "../lv_app/lv_app_util/lv_app_kb.h" #include "hal/wifi/wifi.h" -#include "misc/os/ptask.h" +#include "../misc/os/ptask.h" #include "hal/systick/systick.h" -#include "misc/comm/wifimng.h" -#include "misc/fs/fat32/integer.h" +#include "../misc/comm/wifimng.h" +#include "../misc/fs/fat32/integer.h" #include /********************* diff --git a/lv_draw/lv_draw.c b/lv_draw/lv_draw.c index b8f02483d..b8281bbfa 100644 --- a/lv_draw/lv_draw.c +++ b/lv_draw/lv_draw.c @@ -6,18 +6,18 @@ /********************* * INCLUDES *********************/ -#include #include "lv_conf.h" #include #include -#include "misc/gfx/text.h" #include "lv_draw.h" -#include "misc/fs/fsint.h" -#include "misc/math/math_base.h" #include "lv_draw_rbasic.h" #include "lv_draw_vbasic.h" -#include "misc/fs/ufs/ufs.h" +#include "../misc/gfx/text.h" +#include "../misc/gfx/circ.h" +#include "../misc/fs/fsint.h" +#include "../misc/math/math_base.h" +#include "../misc/fs/ufs/ufs.h" #include "../lv_objx/lv_img.h" /********************* diff --git a/lv_draw/lv_draw.h b/lv_draw/lv_draw.h index 5c3d20673..c1856763f 100644 --- a/lv_draw/lv_draw.h +++ b/lv_draw/lv_draw.h @@ -14,7 +14,7 @@ extern "C" { * INCLUDES *********************/ #include "misc_conf.h" -#include "misc/gfx/text.h" +#include "../misc/gfx/text.h" #include "../lv_obj/lv_style.h" /********************* diff --git a/lv_draw/lv_draw_rbasic.c b/lv_draw/lv_draw_rbasic.c index d1c3ed294..a40db112c 100644 --- a/lv_draw/lv_draw_rbasic.c +++ b/lv_draw/lv_draw_rbasic.c @@ -8,8 +8,8 @@ *********************/ #include "lv_draw_rbasic.h" #include "lv_conf.h" -#include "hal/disp/disp.h" -#include "misc/gfx/font.h" +#include "../hal/disp/hal_disp.h" +#include "../misc/gfx/font.h" /********************* * DEFINES @@ -77,7 +77,7 @@ void lv_rfill(const area_t * cords_p, const area_t * mask_p, if(union_ok != false){ - disp_fill(masked_area.x1, masked_area.y1, masked_area.x2, masked_area.y2, color); + //TODO disp_fill(masked_area.x1, masked_area.y1, masked_area.x2, masked_area.y2, color); } } @@ -192,7 +192,7 @@ void lv_rmap(const area_t * cords_p, const area_t * mask_p, cord_t row; cord_t mask_w = area_get_width(&masked_a) - 1; for(row = 0; row < area_get_height(&masked_a); row++) { - disp_map(masked_a.x1, masked_a.y1 + row, masked_a.x1 + mask_w, masked_a.y1 + row, map_p); + //TODO disp_map(masked_a.x1, masked_a.y1 + row, masked_a.x1 + mask_w, masked_a.y1 + row, map_p); map_p += map_width; } diff --git a/lv_draw/lv_draw_rbasic.h b/lv_draw/lv_draw_rbasic.h index f26f9aa29..71ed01db0 100644 --- a/lv_draw/lv_draw_rbasic.h +++ b/lv_draw/lv_draw_rbasic.h @@ -13,9 +13,9 @@ extern "C" { /********************* * INCLUDES *********************/ -#include "misc/gfx/color.h" -#include "misc/gfx/area.h" -#include "misc/gfx/font.h" +#include "../misc/gfx/color.h" +#include "../misc/gfx/area.h" +#include "../misc/gfx/font.h" /********************* * DEFINES diff --git a/lv_draw/lv_draw_vbasic.c b/lv_draw/lv_draw_vbasic.c index d3f543c6e..f4e4b0948 100644 --- a/lv_draw/lv_draw_vbasic.c +++ b/lv_draw/lv_draw_vbasic.c @@ -7,10 +7,10 @@ #include #include "lv_conf.h" -#include "misc/gfx/area.h" -#include "misc/gfx/font.h" -#include "misc/gfx/color.h" -#include "hal/disp/disp.h" +#include "../misc/gfx/area.h" +#include "../misc/gfx/font.h" +#include "../misc/gfx/color.h" +#include "../hal/disp/hal_disp.h" #if LV_VDB_SIZE != 0 diff --git a/lv_draw/lv_draw_vbasic.h b/lv_draw/lv_draw_vbasic.h index c347d18be..2f9f163bc 100644 --- a/lv_draw/lv_draw_vbasic.h +++ b/lv_draw/lv_draw_vbasic.h @@ -17,9 +17,9 @@ extern "C" { #if LV_VDB_SIZE != 0 -#include "misc/gfx/color.h" -#include "misc/gfx/area.h" -#include "misc/gfx/font.h" +#include "../misc/gfx/color.h" +#include "../misc/gfx/area.h" +#include "../misc/gfx/font.h" /********************* * DEFINES diff --git a/lv_obj/lv_dispi.c b/lv_obj/lv_dispi.c index 27afa2ce9..b7aebb29d 100644 --- a/lv_obj/lv_dispi.c +++ b/lv_obj/lv_dispi.c @@ -8,12 +8,12 @@ ********************/ #include "lv_conf.h" -#include "misc/os/ptask.h" -#include "misc/math/math_base.h" +#include "../misc/os/ptask.h" +#include "../misc/math/math_base.h" #include "lv_dispi.h" #include "../lv_draw/lv_draw_rbasic.h" -#include "hal/indev/indev.h" -#include "hal/systick/systick.h" +#include "../hal/indev/hal_indev.h" +#include "../hal/systick/systick.h" #include "lv_obj.h" /********************* @@ -41,7 +41,7 @@ static void dispi_drag_throw(lv_dispi_t * dispi_p); static ptask_t* dispi_task_p; static bool lv_dispi_reset_qry; static bool lv_dispi_reset_now; -static lv_dispi_t dispi_array[INDEV_NUM]; +static lv_dispi_t dispi_array[2]; /********************** * MACROS @@ -145,12 +145,14 @@ void lv_dispi_wait_release(lv_dispi_t * dispi) */ static void dispi_task(void * param) { + + return; //TODO cord_t x; cord_t y; uint8_t i; - for (i = 0; i < INDEV_NUM; i++) { - dispi_array[i].pressed = indev_get(i, &x, &y); + for (i = 0; i < 1; i++) { + //TODO dispi_array[i].pressed = indev_get(i, &x, &y); dispi_proc_point(&dispi_array[i], x, y); } diff --git a/lv_obj/lv_obj.c b/lv_obj/lv_obj.c index d71108b31..9b5471ea5 100644 --- a/lv_obj/lv_obj.c +++ b/lv_obj/lv_obj.c @@ -15,8 +15,8 @@ #include "lv_refr.h" #include "lv_group.h" #include "../lv_app/lv_app.h" -#include "misc/gfx/anim.h" -#include "hal/indev/indev.h" +#include "../misc/gfx/anim.h" +#include "../hal/indev/hal_indev.h" #include #include @@ -64,6 +64,8 @@ LV_IMG_DECLARE(LV_IMG_DEF_WALLPAPER); */ void lv_init(void) { + misc_init(); + /*Clear the screen*/ area_t scr_area; area_set(&scr_area, 0, 0, LV_HOR_RES, LV_VER_RES); @@ -293,24 +295,25 @@ void lv_obj_del(lv_obj_t * obj) /*Delete the base objects*/ if(obj->ext != NULL) dm_free(obj->ext); dm_free(obj); /*Free the object itself*/ - - /* Reset all display input (dispi) if - * the currently pressed object is deleted too*/ - lv_dispi_t * dispi_array = lv_dispi_get_array(); - lv_obj_t * dpar; - uint8_t d; - for(d = 0; d < INDEV_NUM; d++) { - dpar = obj; - while(dpar != NULL) { - if(dispi_array[d].act_obj == dpar || - dispi_array[d].last_obj == dpar) { - lv_dispi_reset(); - break; - } else { - dpar = lv_obj_get_parent(dpar); - } - } - } + +// TODO Update with the new HAL +// /* Reset all display input (dispi) if +// * the currently pressed object is deleted too*/ +// lv_dispi_t * dispi_array = lv_dispi_get_array(); +// lv_obj_t * dpar; +// uint8_t d; +// for(d = 0; d < INDEV_NUM; d++) { +// dpar = obj; +// while(dpar != NULL) { +// if(dispi_array[d].act_obj == dpar || +// dispi_array[d].last_obj == dpar) { +// lv_dispi_reset(); +// break; +// } else { +// dpar = lv_obj_get_parent(dpar); +// } +// } +// } /*Send a signal to the parent to notify it about the child delete*/ if(par != NULL) { diff --git a/lv_obj/lv_obj.h b/lv_obj/lv_obj.h index c0ff75490..36f3bd778 100644 --- a/lv_obj/lv_obj.h +++ b/lv_obj/lv_obj.h @@ -14,12 +14,12 @@ extern "C" { * INCLUDES *********************/ #include "lv_conf.h" -#include #include #include -#include "misc/mem/dyn_mem.h" -#include "misc/mem/linked_list.h" -#include "misc/gfx/color.h" +#include "../misc/gfx/area.h" +#include "../misc/mem/dyn_mem.h" +#include "../misc/mem/linked_list.h" +#include "../misc/gfx/color.h" #include "lv_style.h" /********************* diff --git a/lv_obj/lv_refr.c b/lv_obj/lv_refr.c index 9216700be..4e43fa5c6 100644 --- a/lv_obj/lv_refr.c +++ b/lv_obj/lv_refr.c @@ -8,11 +8,11 @@ *********************/ #include #include "lv_conf.h" -#include "misc/os/ptask.h" -#include "misc/mem/fifo.h" +#include "../misc/os/ptask.h" +#include "../misc/mem/fifo.h" #include "lv_refr.h" #include "lv_vdb.h" -#include "hal/systick/systick.h" +#include "../hal/systick/systick.h" /********************* * DEFINES diff --git a/lv_obj/lv_style.c b/lv_obj/lv_style.c index 65a3b0f1c..7cf233849 100644 --- a/lv_obj/lv_style.c +++ b/lv_obj/lv_style.c @@ -9,7 +9,7 @@ #include "lv_conf.h" #include "lv_style.h" #include "lv_obj.h" -#include "misc/mem/dyn_mem.h" +#include "../misc/mem/dyn_mem.h" /********************* * DEFINES diff --git a/lv_obj/lv_style.h b/lv_obj/lv_style.h index a57c192af..3d4c80360 100644 --- a/lv_obj/lv_style.h +++ b/lv_obj/lv_style.h @@ -14,10 +14,10 @@ extern "C" { * INCLUDES *********************/ #include -#include "misc/gfx/color.h" -#include "misc/gfx/area.h" -#include "misc/gfx/font.h" -#include "misc/gfx/anim.h" +#include "../misc/gfx/color.h" +#include "../misc/gfx/area.h" +#include "../misc/gfx/font.h" +#include "../misc/gfx/anim.h" /********************* * DEFINES diff --git a/lv_obj/lv_vdb.c b/lv_obj/lv_vdb.c index 7fd4ac760..7eb50502f 100644 --- a/lv_obj/lv_vdb.c +++ b/lv_obj/lv_vdb.c @@ -5,7 +5,7 @@ #include "lv_conf.h" #if LV_VDB_SIZE != 0 -#include "hal/disp/disp.h" +#include "../hal/disp/hal_disp.h" #include #include "lv_vdb.h" @@ -146,7 +146,7 @@ void lv_vdb_flush(void) /* Now the full the VDB is filtered and the result is stored in the first quarter of it * Write out the filtered map to the display*/ - disp_map(vdb_act->area.x1 >> 1, vdb_act->area.y1 >> 1, vdb_act->area.x2 >> 1, vdb_act->area.y2 >> 1, vdb_act->buf); + //TODO disp_map(vdb_act->area.x1 >> 1, vdb_act->area.y1 >> 1, vdb_act->area.x2 >> 1, vdb_act->area.y2 >> 1, vdb_act->buf); #endif } diff --git a/lv_obj/lv_vdb.h b/lv_obj/lv_vdb.h index 54a0facf6..0f2f9e742 100644 --- a/lv_obj/lv_vdb.h +++ b/lv_obj/lv_vdb.h @@ -17,8 +17,8 @@ extern "C" { #if LV_VDB_SIZE != 0 -#include "misc/gfx/color.h" -#include "misc/gfx/area.h" +#include "../misc/gfx/color.h" +#include "../misc/gfx/area.h" /********************* * DEFINES diff --git a/lv_objx/lv_bar.c b/lv_objx/lv_bar.c index 805c0a080..5b1844c45 100644 --- a/lv_objx/lv_bar.c +++ b/lv_objx/lv_bar.c @@ -13,7 +13,7 @@ #include "lv_bar.h" #include "../lv_draw/lv_draw.h" -#include "misc/gfx/anim.h" +#include "../misc/gfx/anim.h" #include /********************* diff --git a/lv_objx/lv_btn.c b/lv_objx/lv_btn.c index ddfb22be7..27fa5c790 100644 --- a/lv_objx/lv_btn.c +++ b/lv_objx/lv_btn.c @@ -13,8 +13,8 @@ #include "lv_btn.h" #include "../lv_obj/lv_group.h" #include "../lv_draw/lv_draw.h" -#include "misc/gfx/area.h" -#include "misc/gfx/color.h" +#include "../misc/gfx/area.h" +#include "../misc/gfx/color.h" #include #include diff --git a/lv_objx/lv_btnm.c b/lv_objx/lv_btnm.c index aa19d5097..3b670d75d 100644 --- a/lv_objx/lv_btnm.c +++ b/lv_objx/lv_btnm.c @@ -13,7 +13,7 @@ #include "../lv_obj/lv_group.h" #include "../lv_draw/lv_draw.h" #include "../lv_obj/lv_refr.h" -#include "misc/gfx/text.h" +#include "../misc/gfx/text.h" /********************* * DEFINES diff --git a/lv_objx/lv_cont.c b/lv_objx/lv_cont.c index 793fb1447..80fe7b3ff 100644 --- a/lv_objx/lv_cont.c +++ b/lv_objx/lv_cont.c @@ -17,10 +17,10 @@ #include "lv_cont.h" #include "../lv_draw/lv_draw.h" #include "../lv_draw/lv_draw_vbasic.h" -#include "misc/gfx/area.h" +#include "../misc/gfx/area.h" -#include "misc/gfx/color.h" -#include "misc/math/math_base.h" +#include "../misc/gfx/color.h" +#include "../misc/math/math_base.h" /********************* * DEFINES diff --git a/lv_objx/lv_ddlist.c b/lv_objx/lv_ddlist.c index 80d57d85b..58065fc11 100644 --- a/lv_objx/lv_ddlist.c +++ b/lv_objx/lv_ddlist.c @@ -14,7 +14,7 @@ #include "../lv_draw/lv_draw.h" #include "../lv_obj/lv_group.h" #include "../lv_obj/lv_dispi.h" -#include "misc/gfx/anim.h" +#include "../misc/gfx/anim.h" /********************* * DEFINES diff --git a/lv_objx/lv_gauge.c b/lv_objx/lv_gauge.c index 4252beb98..0ccec3fc1 100644 --- a/lv_objx/lv_gauge.c +++ b/lv_objx/lv_gauge.c @@ -12,9 +12,9 @@ #include "lv_gauge.h" #include "../lv_draw/lv_draw.h" -#include "misc/gfx/text.h" -#include "misc/math/trigo.h" -#include "misc/math/math_base.h" +#include "../misc/gfx/text.h" +#include "../misc/math/trigo.h" +#include "../misc/math/math_base.h" #include #include diff --git a/lv_objx/lv_img.c b/lv_objx/lv_img.c index 62de520ff..cf1e61c88 100644 --- a/lv_objx/lv_img.c +++ b/lv_objx/lv_img.c @@ -12,11 +12,11 @@ #include "lv_img.h" #include "../lv_draw/lv_draw.h" -#include "misc/fs/fsint.h" -#include "misc/fs/ufs/ufs.h" +#include "../misc/fs/fsint.h" +#include "../misc/fs/ufs/ufs.h" #if LV_IMG_ENABLE_SYMBOLS != 0 -#include "misc/gfx/text.h" +#include "../misc/gfx/text.h" #endif /********************* diff --git a/lv_objx/lv_img.h b/lv_objx/lv_img.h index 7735bdbd9..c9d7213b7 100644 --- a/lv_objx/lv_img.h +++ b/lv_objx/lv_img.h @@ -18,7 +18,7 @@ extern "C" { #if USE_LV_IMG != 0 && USE_FSINT != 0 #include "../lv_obj/lv_obj.h" -#include "misc/fs/fsint.h" +#include "../misc/fs/fsint.h" #ifndef LV_IMG_ENABLE_SYMBOLS #define LV_IMG_ENABLE_SYMBOLS 0 @@ -26,7 +26,7 @@ extern "C" { #if LV_IMG_ENABLE_SYMBOLS != 0 #include "lv_label.h" -#include "misc/gfx/fonts/symbol_def.h" +#include "../misc/gfx/fonts/symbol_def.h" #endif /********************* diff --git a/lv_objx/lv_label.c b/lv_objx/lv_label.c index 305f0513d..e10d17e3a 100644 --- a/lv_objx/lv_label.c +++ b/lv_objx/lv_label.c @@ -9,13 +9,13 @@ #include "lv_conf.h" #if USE_LV_LABEL != 0 -#include "misc/gfx/color.h" -#include "misc/math/math_base.h" +#include "../misc/gfx/color.h" +#include "../misc/math/math_base.h" #include "lv_label.h" #include "../lv_obj/lv_obj.h" #include "../lv_obj/lv_group.h" -#include "misc/gfx/text.h" -#include "misc/gfx/anim.h" +#include "../misc/gfx/text.h" +#include "../misc/gfx/anim.h" #include "../lv_draw/lv_draw.h" /********************* diff --git a/lv_objx/lv_label.h b/lv_objx/lv_label.h index f5e84758d..2c5b5383e 100644 --- a/lv_objx/lv_label.h +++ b/lv_objx/lv_label.h @@ -17,8 +17,8 @@ extern "C" { #if USE_LV_LABEL != 0 #include "../lv_obj/lv_obj.h" -#include "misc/gfx/font.h" -#include "misc/gfx/text.h" +#include "../misc/gfx/font.h" +#include "../misc/gfx/text.h" /********************* * DEFINES diff --git a/lv_objx/lv_line.c b/lv_objx/lv_line.c index 556416ace..2bb67ff4a 100644 --- a/lv_objx/lv_line.c +++ b/lv_objx/lv_line.c @@ -11,7 +11,7 @@ #if USE_LV_LINE != 0 #include "lv_line.h" #include "../lv_draw/lv_draw.h" -#include "misc/math/math_base.h" +#include "../misc/math/math_base.h" #include #include #include diff --git a/lv_objx/lv_list.c b/lv_objx/lv_list.c index efcbe4fd6..c0f661528 100644 --- a/lv_objx/lv_list.c +++ b/lv_objx/lv_list.c @@ -12,8 +12,8 @@ #include "lv_list.h" #include "../lv_obj/lv_group.h" #include "lv_cont.h" -#include "misc/gfx/anim.h" -#include "misc/math/math_base.h" +#include "../misc/gfx/anim.h" +#include "../misc/math/math_base.h" /********************* * DEFINES diff --git a/lv_objx/lv_lmeter.c b/lv_objx/lv_lmeter.c index ca5feb3f0..e9c75d599 100644 --- a/lv_objx/lv_lmeter.c +++ b/lv_objx/lv_lmeter.c @@ -10,7 +10,7 @@ #if USE_LV_LMETER != 0 #include "lv_lmeter.h" -#include "misc/math/trigo.h" +#include "../misc/math/trigo.h" #include "../lv_draw/lv_draw.h" /********************* diff --git a/lv_objx/lv_mbox.c b/lv_objx/lv_mbox.c index a414c6b7b..15211d35c 100644 --- a/lv_objx/lv_mbox.c +++ b/lv_objx/lv_mbox.c @@ -12,8 +12,8 @@ #include "lv_mbox.h" #include "../lv_obj/lv_group.h" -#include "misc/gfx/anim.h" -#include "misc/math/math_base.h" +#include "../misc/gfx/anim.h" +#include "../misc/math/math_base.h" /********************* * DEFINES diff --git a/lv_objx/lv_page.c b/lv_objx/lv_page.c index 225cde101..f257087ff 100644 --- a/lv_objx/lv_page.c +++ b/lv_objx/lv_page.c @@ -9,13 +9,13 @@ #include "lv_conf.h" #if USE_LV_PAGE != 0 -#include "misc/math/math_base.h" +#include "../misc/math/math_base.h" #include "../lv_obj/lv_group.h" #include "../lv_objx/lv_page.h" #include "../lv_objx/lv_cont.h" #include "../lv_draw/lv_draw.h" #include "../lv_obj/lv_refr.h" -#include "misc/gfx/anim.h" +#include "../misc/gfx/anim.h" /********************* * DEFINES diff --git a/lv_objx/lv_slider.c b/lv_objx/lv_slider.c index b50f5d4b8..889894e89 100644 --- a/lv_objx/lv_slider.c +++ b/lv_objx/lv_slider.c @@ -12,7 +12,7 @@ #include "lv_slider.h" #include "../lv_obj/lv_group.h" #include "../lv_draw/lv_draw.h" -#include "misc/math/math_base.h" +#include "../misc/math/math_base.h" /********************* * DEFINES diff --git a/lv_objx/lv_ta.c b/lv_objx/lv_ta.c index 1d4e962f0..f6eb81f84 100644 --- a/lv_objx/lv_ta.c +++ b/lv_objx/lv_ta.c @@ -13,7 +13,7 @@ #include "lv_ta.h" #include "../lv_obj/lv_group.h" #include "../lv_draw/lv_draw.h" -#include "misc/gfx/anim.h" +#include "../misc/gfx/anim.h" /********************* * DEFINES diff --git a/lv_objx/lv_tabview.c b/lv_objx/lv_tabview.c index d66ef2d57..a45049df8 100644 --- a/lv_objx/lv_tabview.c +++ b/lv_objx/lv_tabview.c @@ -11,7 +11,7 @@ #include #include "lv_btnm.h" -#include "misc/gfx/anim.h" +#include "../misc/gfx/anim.h" /********************* * DEFINES diff --git a/misc b/misc index 3103b9107..e89a961bd 160000 --- a/misc +++ b/misc @@ -1 +1 @@ -Subproject commit 3103b91078906dfaf328c315ea82a731c11664d8 +Subproject commit e89a961bd1eb611019c759b78305a90ef7950ad9 From c72bb4502a7fb791f53502edd6cb2614adf7b2ff Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 25 Sep 2017 12:11:42 +0200 Subject: [PATCH 3/4] lv_ta: cursor style bugfix on '\n' --- lv_objx/lv_page.c | 7 ++-- lv_objx/lv_page.h | 8 +++++ lv_objx/lv_ta.c | 91 +++++++++++++++++++++++++++++++++++++++-------- lv_objx/lv_ta.h | 9 +++++ 4 files changed, 97 insertions(+), 18 deletions(-) diff --git a/lv_objx/lv_page.c b/lv_objx/lv_page.c index 225cde101..fa95a22c0 100644 --- a/lv_objx/lv_page.c +++ b/lv_objx/lv_page.c @@ -31,7 +31,6 @@ static void lv_page_sb_refresh(lv_obj_t * main); static bool lv_page_design(lv_obj_t * scrl, const area_t * mask, lv_design_mode_t mode); static bool lv_scrl_design(lv_obj_t * scrl, const area_t * mask, lv_design_mode_t mode); -static bool lv_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void* param); /********************** * STATIC VARIABLES @@ -82,7 +81,7 @@ lv_obj_t * lv_page_create(lv_obj_t * par, lv_obj_t * copy) lv_style_t * style = lv_style_get(LV_STYLE_PRETTY_COLOR, NULL); ext->scrl = lv_cont_create(new_page, NULL); if(ancestor_scrl_design_f == NULL) ancestor_scrl_design_f = lv_obj_get_design_f(ext->scrl); - lv_obj_set_signal_f(ext->scrl, lv_scrl_signal); + lv_obj_set_signal_f(ext->scrl, lv_page_scrl_signal); lv_obj_set_drag(ext->scrl, true); lv_obj_set_drag_throw(ext->scrl, true); lv_obj_set_protect(ext->scrl, LV_PROTECT_PARENT); @@ -102,7 +101,7 @@ lv_obj_t * lv_page_create(lv_obj_t * par, lv_obj_t * copy) } else { lv_page_ext_t * copy_ext = lv_obj_get_ext(copy); ext->scrl = lv_cont_create(new_page, copy_ext->scrl); - lv_obj_set_signal_f(ext->scrl, lv_scrl_signal); + lv_obj_set_signal_f(ext->scrl, lv_page_scrl_signal); lv_page_set_pr_action(new_page, copy_ext->pr_action); lv_page_set_rel_action(new_page, copy_ext->rel_action); @@ -209,7 +208,7 @@ bool lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param) * @param sign a signal type from lv_signal_t enum * @param param pointer to a signal specific variable */ -static bool lv_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void* param) +bool lv_page_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void * param) { bool obj_valid = true; diff --git a/lv_objx/lv_page.h b/lv_objx/lv_page.h index c2cdbc7af..d3f20e011 100644 --- a/lv_objx/lv_page.h +++ b/lv_objx/lv_page.h @@ -79,6 +79,14 @@ lv_obj_t * lv_page_create(lv_obj_t * par, lv_obj_t * copy); */ bool lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param); +/** + * Signal function of the scrollable part of a page + * @param scrl pointer to the scrollable object + * @param sign a signal type from lv_signal_t enum + * @param param pointer to a signal specific variable + */ +bool lv_page_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void * param); + /** * Set a release action for the page * @param page pointer to a page object diff --git a/lv_objx/lv_ta.c b/lv_objx/lv_ta.c index 775f8281a..a9661b9cd 100644 --- a/lv_objx/lv_ta.c +++ b/lv_objx/lv_ta.c @@ -14,7 +14,11 @@ #include "../lv_obj/lv_group.h" #include "../lv_draw/lv_draw.h" #include "misc/gfx/anim.h" +<<<<<<< ebfe8fbfd4d93bd0e09a8b16e96e623c5c6be0f2 #include "misc/gfx/text.h" +======= +#include "misc/math/math_base.h" +>>>>>>> lv_ta: cursor style bugfix on '\n' /********************* * DEFINES @@ -43,7 +47,7 @@ * STATIC PROTOTYPES **********************/ static bool lv_ta_design(lv_obj_t * ta, const area_t * mask, lv_design_mode_t mode); -static bool lv_ta_scrling_design(lv_obj_t * scrling, const area_t * mask, lv_design_mode_t mode); +static bool lv_ta_scrling_design(lv_obj_t * scrl, const area_t * mask, lv_design_mode_t mode); static void cursor_blink_anim(lv_obj_t * ta, uint8_t show); static void pwd_char_hider_anim(lv_obj_t * ta, int32_t x); static void pwd_char_hider(lv_obj_t * ta); @@ -96,6 +100,7 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, lv_obj_t * copy) if(scrl_design_f == NULL) scrl_design_f = lv_obj_get_design_f(ext->page.scrl); lv_obj_set_signal_f(new_ta, lv_ta_signal); + lv_obj_set_signal_f(lv_page_get_scrl(new_ta), lv_ta_scrl_signal); lv_obj_set_design_f(new_ta, lv_ta_design); /*Init the new text area object*/ @@ -173,6 +178,8 @@ bool lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) lv_obj_set_width(ext->label, lv_obj_get_width(scrl) - 2 * style_scrl->hpad); lv_obj_set_pos(ext->label, style_scrl->hpad, style_scrl->vpad); lv_label_set_text(ext->label, NULL); + + lv_obj_refr_ext_size(lv_page_get_scrl(ta)); } } else if(sign == LV_SIGNAL_CORD_CHG) { /*Set the label width according to the text area width*/ @@ -186,7 +193,8 @@ bool lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) lv_label_set_text(ext->label, NULL); /*Refresh the label*/ } } - } else if (sign == LV_SIGNAL_CONTROLL) { + } + else if (sign == LV_SIGNAL_CONTROLL) { char c = *((char*)param); if(c == LV_GROUP_KEY_RIGHT) { lv_ta_cursor_right(ta); @@ -202,6 +210,34 @@ bool lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) return valid; } +/** + * Signal function of the scrollable part of the text area + * @param scrl pointer to scrollable part of a text area object + * @param sign a signal type from lv_signal_t enum + * @param param pointer to a signal specific variable + * @return true: the object is still valid (not deleted), false: the object become invalid + */ +bool lv_ta_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void * param) +{ + bool valid; + + /* Include the ancient signal function */ + valid = lv_page_scrl_signal(scrl, sign, param); + + /* The object can be deleted so check its validity and then + * make the object specific signal handling */ + if(valid != false) { + if(sign == LV_SIGNAL_REFR_EXT_SIZE) { + /*Set ext. size because the cursor might be out of this object*/ + lv_obj_t * ta = lv_obj_get_parent(scrl); + lv_ta_ext_t * ext = lv_obj_get_ext(ta); + lv_style_t * style_label = lv_obj_get_style(ext->label); + + scrl->ext_size = MATH_MAX(scrl->ext_size, style_label->line_space + font_get_height(style_label->font)); + } + } + return valid; +} /*===================== * Setter functions *====================*/ @@ -779,8 +815,8 @@ static bool lv_ta_design(lv_obj_t * ta, const area_t * masp, lv_design_mode_t mo } /** - * An extended scrolling design of the page. Calls the normal design function and it draws a cursor. - * @param label pointer to a text area object + * An extended scrollable design of the page. Calls the normal design function and draws a cursor. + * @param scrl pointer to the scrollabla part of the Text area * @param mask the object will be drawn only in this area * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area * (return 'true' if yes) @@ -788,19 +824,19 @@ static bool lv_ta_design(lv_obj_t * ta, const area_t * masp, lv_design_mode_t mo * LV_DESIGN_DRAW_POST: drawing after every children are drawn * @return return true/false, depends on 'mode' */ -static bool lv_ta_scrling_design(lv_obj_t * scrling, const area_t * mask, lv_design_mode_t mode) +static bool lv_ta_scrling_design(lv_obj_t * scrl, const area_t * mask, lv_design_mode_t mode) { if(mode == LV_DESIGN_COVER_CHK) { /*Return false if the object is not covers the mask_p area*/ - return scrl_design_f(scrling, mask, mode); + return scrl_design_f(scrl, mask, mode); } else if(mode == LV_DESIGN_DRAW_MAIN) { /*Draw the object*/ - scrl_design_f(scrling, mask, mode); + scrl_design_f(scrl, mask, mode); } else if(mode == LV_DESIGN_DRAW_POST) { - scrl_design_f(scrling, mask, mode); + scrl_design_f(scrl, mask, mode); /*Draw the cursor too*/ - lv_obj_t * ta = lv_obj_get_parent(scrling); + lv_obj_t * ta = lv_obj_get_parent(scrl); lv_ta_ext_t * ta_ext = lv_obj_get_ext(ta); if(ta_ext->cursor_show == 0 || ta_ext->cursor_state == 0) return true; /*The cursor is not visible now*/ @@ -808,10 +844,11 @@ static bool lv_ta_scrling_design(lv_obj_t * scrling, const area_t * mask, lv_des lv_style_t cur_style; if(ta_ext->cursor_style != NULL) { - lv_style_cpy(&cur_style, ta_ext->cursor_style); + lv_style_cpy(&cur_style, ta_ext->cursor_style); } else { - lv_style_cpy(&cur_style, label_style); /*Use the label style is no better option and modify it */ + /*If cursor style is not specified then use the modified label style */ + lv_style_cpy(&cur_style, label_style); color_t ccolor_tmp = cur_style.ccolor; /*Make letter color to cursor color*/ cur_style.ccolor = cur_style.mcolor; /*In block mode the letter color will be current background color*/ cur_style.mcolor = ccolor_tmp; @@ -840,9 +877,33 @@ static bool lv_ta_scrling_design(lv_obj_t * scrling, const area_t * mask, lv_des printf("letter %d\n", letter); cord_t letter_w = font_get_width(label_style->font, letter != '\0' ? letter : ' '); cord_t letter_h = font_get_height(label_style->font) >> FONT_ANTIALIAS; - point_t letter_pos; - lv_label_get_letter_pos(ta_ext->label, cur_pos, &letter_pos); + /*Set letter_w (set not 0 on non printable but valid chars)*/ + cord_t letter_w; + if(txt[byte_pos] == '\0' || txt[byte_pos] == '\n' || txt[byte_pos] == '\r') { + letter_w = font_get_width(label_style->font, ' '); + } else { + letter_w = font_get_width(label_style->font, txt[byte_pos]); + } + + point_t letter_pos; + lv_label_get_letter_pos(ta_ext->label, byte_pos, &letter_pos); + + /*If the cursor is out of the text (most right) draw it to the next line*/ + if(letter_pos.x + ta_ext->label->cords.x1 + letter_w> ta_ext->label->cords.x2) { + letter_pos.x = 0; + letter_pos.y += letter_h + label_style->line_space; + + if(txt[byte_pos] != '\0') txt_utf8_next(txt, &byte_pos); + + if(txt[byte_pos] == '\0' || txt[byte_pos] == '\n' || txt[byte_pos] == '\r') { + letter_w = font_get_width(label_style->font, ' '); + } else { + letter_w = font_get_width(label_style->font, txt[cur_pos]); + } + } + + /*Draw he cursor according to the type*/ area_t cur_area; if(ta_ext->cursor_type == LV_TA_CURSOR_LINE) { cur_area.x1 = letter_pos.x + ta_ext->label->cords.x1; @@ -855,6 +916,7 @@ static bool lv_ta_scrling_design(lv_obj_t * scrling, const area_t * mask, lv_des cur_area.y1 = letter_pos.y + ta_ext->label->cords.y1; cur_area.x2 = letter_pos.x + ta_ext->label->cords.x1 + letter_w; cur_area.y2 = letter_pos.y + ta_ext->label->cords.y1 + letter_h; + lv_draw_rect(&cur_area, mask, &cur_style); /*Get the current letter*/ @@ -873,6 +935,7 @@ static bool lv_ta_scrling_design(lv_obj_t * scrling, const area_t * mask, lv_des cur_area.y1 = letter_pos.y + ta_ext->label->cords.y1; cur_area.x2 = letter_pos.x + ta_ext->label->cords.x1 + letter_w; cur_area.y2 = letter_pos.y + ta_ext->label->cords.y1 + letter_h; + cur_style.empty = 1; if(cur_style.bwidth == 0) cur_style.bwidth = 1 * LV_DOWNSCALE; /*Be sure the border will be drawn*/ lv_draw_rect(&cur_area, mask, &cur_style); @@ -881,10 +944,10 @@ static bool lv_ta_scrling_design(lv_obj_t * scrling, const area_t * mask, lv_des cur_area.y1 = letter_pos.y + ta_ext->label->cords.y1 + letter_h - cur_style.line_width; cur_area.x2 = letter_pos.x + ta_ext->label->cords.x1 + letter_w; cur_area.y2 = letter_pos.y + ta_ext->label->cords.y1 + letter_h; + lv_draw_rect(&cur_area, mask, &cur_style); } - } return true; diff --git a/lv_objx/lv_ta.h b/lv_objx/lv_ta.h index 4105d6d05..5321680d4 100644 --- a/lv_objx/lv_ta.h +++ b/lv_objx/lv_ta.h @@ -82,6 +82,15 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, lv_obj_t * copy); */ bool lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param); +/** + * Signal function of the scrollable part of the text area + * @param scrl pointer to scrollable part of a text area object + * @param sign a signal type from lv_signal_t enum + * @param param pointer to a signal specific variable + * @return true: the object is still valid (not deleted), false: the object become invalid + */ +bool lv_ta_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void * param); + /** * Insert a character to the current cursor position * @param ta pointer to a text area object From b1abcb9310dfa7f9dfa78f405101d77c110e2d15 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 2 Oct 2017 15:14:14 +0200 Subject: [PATCH 4/4] all 3 hal elements are integrated --- .gitmodules | 3 --- hal | 2 +- lv_obj/lv_dispi.c | 32 ++++++++++++++++---------------- lv_obj/lv_refr.c | 4 ++-- lv_obj/lv_vdb.c | 4 ++-- 5 files changed, 21 insertions(+), 24 deletions(-) diff --git a/.gitmodules b/.gitmodules index 54a610744..e69de29bb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "misc"] - path = misc - url = https://github.com/littlevgl/misc diff --git a/hal b/hal index 597fd86a7..86bad91ff 160000 --- a/hal +++ b/hal @@ -1 +1 @@ -Subproject commit 597fd86a782942df3ff7486da8a23831fe73681f +Subproject commit 86bad91fff25a09fc66ccda5d5eb90aeaadf26bb diff --git a/lv_obj/lv_dispi.c b/lv_obj/lv_dispi.c index 7aaca4762..276d1d1bb 100644 --- a/lv_obj/lv_dispi.c +++ b/lv_obj/lv_dispi.c @@ -90,8 +90,8 @@ void lv_dispi_reset(void) void lv_dispi_reset_lpr(lv_dispi_t * dispi) { dispi->long_press_sent = 0; - dispi->lpr_rep_time_stamp = systick_get(); - dispi->press_time_stamp = systick_get(); + dispi->lpr_rep_time_stamp = lv_hal_tick_get(); + dispi->press_time_stamp = lv_hal_tick_get(); } /** @@ -145,16 +145,16 @@ void lv_dispi_wait_release(lv_dispi_t * dispi) */ static void dispi_task(void * param) { + lv_hal_indev_data_t data; + lv_indev_t * drv; + drv = lv_hal_indev_next(NULL); - return; //TODO - cord_t x; - cord_t y; - uint8_t i; - - for (i = 0; i < 1; i++) { - //TODO dispi_array[i].pressed = indev_get(i, &x, &y); - dispi_proc_point(&dispi_array[i], x, y); - } + while(drv) { + drv->drv.get_data(&data); + drv->dispi.pressed = data.state; + dispi_proc_point(&drv->dispi,data.point.x , data.point.y); + drv = lv_hal_indev_next(drv); + } /*If reset query occurred in this round then set a flag to * ask the dispis to reset themself in the next round */ @@ -253,7 +253,7 @@ static void dispi_proc_press(lv_dispi_t * dispi_p) if(pr_obj != NULL) { /* Save the time when the obj pressed. * It is necessary to count the long press time.*/ - dispi_p->press_time_stamp = systick_get(); + dispi_p->press_time_stamp = lv_hal_tick_get(); dispi_p->long_press_sent = 0; dispi_p->drag_range_out = 0; dispi_p->drag_in_prog = 0; @@ -300,22 +300,22 @@ static void dispi_proc_press(lv_dispi_t * dispi_p) /*If there is no drag then check for long press time*/ if(dispi_p->drag_in_prog == 0 && dispi_p->long_press_sent == 0) { /*Send a signal about the long press if enough time elapsed*/ - if(systick_elaps(dispi_p->press_time_stamp) > LV_DISPI_LONG_PRESS_TIME) { + if(lv_hal_tick_elaps(dispi_p->press_time_stamp) > LV_DISPI_LONG_PRESS_TIME) { pr_obj->signal_f(pr_obj, LV_SIGNAL_LONG_PRESS, dispi_p); /*Mark the signal sending to do not send it again*/ dispi_p->long_press_sent = 1; /*Save the long press time stamp for the long press repeat handler*/ - dispi_p->lpr_rep_time_stamp = systick_get(); + dispi_p->lpr_rep_time_stamp = lv_hal_tick_get(); } } /*Send long press repeated signal*/ if(dispi_p->drag_in_prog == 0 && dispi_p->long_press_sent == 1) { /*Send a signal about the long press repeate if enough time elapsed*/ - if(systick_elaps(dispi_p->lpr_rep_time_stamp) > LV_DISPI_LONG_PRESS_REP_TIME) { + if(lv_hal_tick_elaps(dispi_p->lpr_rep_time_stamp) > LV_DISPI_LONG_PRESS_REP_TIME) { pr_obj->signal_f(pr_obj, LV_SIGNAL_LONG_PRESS_REP, dispi_p); - dispi_p->lpr_rep_time_stamp = systick_get(); + dispi_p->lpr_rep_time_stamp = lv_hal_tick_get(); } } diff --git a/lv_obj/lv_refr.c b/lv_obj/lv_refr.c index dbcd98e3a..369ee95ee 100644 --- a/lv_obj/lv_refr.c +++ b/lv_obj/lv_refr.c @@ -147,7 +147,7 @@ void lv_refr_set_monitor_cb(void (*cb)(uint32_t, uint32_t)) static void lv_refr_task(void * param) { - uint32_t start = systick_get(); + uint32_t start = lv_hal_tick_get(); lv_refr_join_area(); @@ -162,7 +162,7 @@ static void lv_refr_task(void * param) * therefore be sure the inv_buf is cleared prior to it*/ if(refr_done != false) { if(monitor_cb != NULL) { - monitor_cb(systick_elaps(start), px_num); + monitor_cb(lv_hal_tick_elaps(start), px_num); } } } diff --git a/lv_obj/lv_vdb.c b/lv_obj/lv_vdb.c index 7eb50502f..cf3700eac 100644 --- a/lv_obj/lv_vdb.c +++ b/lv_obj/lv_vdb.c @@ -105,7 +105,7 @@ void lv_vdb_flush(void) * ----------------------------- * in1_buf |2,2|6,8| 3,7 * in2_buf |4,4|7,7| 1,2 - * --------- ==> + * --------- ==> * in1_buf |1,1|1,3| * in2_buf |1,1|1,3| * */ @@ -146,7 +146,7 @@ void lv_vdb_flush(void) /* Now the full the VDB is filtered and the result is stored in the first quarter of it * Write out the filtered map to the display*/ - //TODO disp_map(vdb_act->area.x1 >> 1, vdb_act->area.y1 >> 1, vdb_act->area.x2 >> 1, vdb_act->area.y2 >> 1, vdb_act->buf); + hal_disp_map(vdb_act->area.x1 >> 1, vdb_act->area.y1 >> 1, vdb_act->area.x2 >> 1, vdb_act->area.y2 >> 1, vdb_act->buf); #endif }