1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

Add misc and hal

This commit is contained in:
Gabor 2017-08-24 17:01:54 +02:00
parent eaf7a123d4
commit 9405abb3fd
41 changed files with 115 additions and 109 deletions

1
hal Submodule

@ -0,0 +1 @@
Subproject commit 597fd86a782942df3ff7486da8a23831fe73681f

View File

@ -10,7 +10,7 @@
#if LV_APP_ENABLE != 0
#include <stdio.h>
#include "misc/gfx/anim.h"
#include "../misc/gfx/anim.h"
#include "lvgl/lv_obj/lv_refr.h"

View File

@ -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 <stdio.h>
/*********************

View File

@ -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 <stdio.h>

View File

@ -10,7 +10,7 @@
#if LV_APP_ENABLE != 0 && USE_LV_APP_FILES != 0
#include <stdio.h>
#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"

View File

@ -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 <stdio.h>
/*********************

View File

@ -10,11 +10,11 @@
#if LV_APP_ENABLE != 0 && USE_LV_APP_SYSMON != 0
#include <stdio.h>
#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

View File

@ -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 <stdio.h>
/*********************

View File

@ -6,18 +6,18 @@
/*********************
* INCLUDES
*********************/
#include <misc/gfx/circ.h>
#include "lv_conf.h"
#include <stdio.h>
#include <stdbool.h>
#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"
/*********************

View File

@ -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"
/*********************

View File

@ -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;
}

View File

@ -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

View File

@ -7,10 +7,10 @@
#include <string.h>
#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

View File

@ -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

View File

@ -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);
}

View File

@ -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 <stdint.h>
#include <string.h>
@ -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) {

View File

@ -14,12 +14,12 @@ extern "C" {
* INCLUDES
*********************/
#include "lv_conf.h"
#include <misc/gfx/area.h>
#include <stddef.h>
#include <stdbool.h>
#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"
/*********************

View File

@ -8,11 +8,11 @@
*********************/
#include <stddef.h>
#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

View File

@ -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

View File

@ -14,10 +14,10 @@ extern "C" {
* INCLUDES
*********************/
#include <stdbool.h>
#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

View File

@ -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 <stddef.h>
#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
}

View File

@ -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

View File

@ -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 <stdio.h>
/*********************

View File

@ -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 <stdbool.h>
#include <string.h>

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 <stdio.h>
#include <string.h>

View File

@ -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
/*********************

View File

@ -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
/*********************

View File

@ -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"
/*********************

View File

@ -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

View File

@ -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 <stdbool.h>
#include <stdint.h>
#include <string.h>

View File

@ -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

View File

@ -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"
/*********************

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -11,7 +11,7 @@
#include <lvgl/lv_objx/lv_tabview.h>
#include "lv_btnm.h"
#include "misc/gfx/anim.h"
#include "../misc/gfx/anim.h"
/*********************
* DEFINES

2
misc

@ -1 +1 @@
Subproject commit 3103b91078906dfaf328c315ea82a731c11664d8
Subproject commit e89a961bd1eb611019c759b78305a90ef7950ad9