perf: Optimize the layout of project files and code.
This commit is contained in:
@@ -35,9 +35,8 @@
|
|||||||
<Import Project="LVGL.Drivers.vcxitems" />
|
<Import Project="LVGL.Drivers.vcxitems" />
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="lvgl_mydemo\data\dataModel.h" />
|
<ClInclude Include="lvgl_mydemo\data\dataModel.h" />
|
||||||
<ClInclude Include="lvgl_mydemo\data\scr_mgr.h" />
|
<ClInclude Include="lvgl_mydemo\data\gui_scr_mgr.h" />
|
||||||
<ClInclude Include="lvgl_mydemo\screen\gui_main_scr.h" />
|
<ClInclude Include="lvgl_mydemo\screen\gui_main_scr.h" />
|
||||||
<ClInclude Include="lvgl_mydemo\screen\gui_scr_mgr.h" />
|
|
||||||
<ClInclude Include="lvgl_mydemo\screen\gui_test1_scr.h" />
|
<ClInclude Include="lvgl_mydemo\screen\gui_test1_scr.h" />
|
||||||
<ClInclude Include="lv_conf.h" />
|
<ClInclude Include="lv_conf.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@@ -54,12 +53,11 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="LVGL.Simulator.cpp" />
|
<ClCompile Include="LVGL.Simulator.cpp" />
|
||||||
<ClCompile Include="lvgl_mydemo\data\dataModel.c" />
|
<ClCompile Include="lvgl_mydemo\data\dataModel.c" />
|
||||||
<ClCompile Include="lvgl_mydemo\data\scr_mgr.c" />
|
<ClCompile Include="lvgl_mydemo\data\gui_scr_mgr.c" />
|
||||||
<ClCompile Include="lvgl_mydemo\log\drv_log.c" />
|
<ClCompile Include="lvgl_mydemo\log\drv_log.c" />
|
||||||
<ClCompile Include="lvgl_mydemo\log\gui_log.c" />
|
<ClCompile Include="lvgl_mydemo\log\lib_log.c" />
|
||||||
<ClCompile Include="lvgl_mydemo\lvgl_app.c" />
|
<ClCompile Include="lvgl_mydemo\lvgl_app.c" />
|
||||||
<ClCompile Include="lvgl_mydemo\screen\gui_main_scr.c" />
|
<ClCompile Include="lvgl_mydemo\screen\gui_main_scr.c" />
|
||||||
<ClCompile Include="lvgl_mydemo\screen\gui_scr_mgr.c" />
|
|
||||||
<ClCompile Include="lvgl_mydemo\screen\gui_test1_scr.c" />
|
<ClCompile Include="lvgl_mydemo\screen\gui_test1_scr.c" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -8,18 +8,15 @@
|
|||||||
<ClInclude Include="lvgl_mydemo\data\dataModel.h">
|
<ClInclude Include="lvgl_mydemo\data\dataModel.h">
|
||||||
<Filter>lvgl_mydemo\data</Filter>
|
<Filter>lvgl_mydemo\data</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="lvgl_mydemo\data\scr_mgr.h">
|
|
||||||
<Filter>lvgl_mydemo\data</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="lvgl_mydemo\screen\gui_scr_mgr.h">
|
|
||||||
<Filter>lvgl_mydemo\srceen</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="lvgl_mydemo\screen\gui_main_scr.h">
|
<ClInclude Include="lvgl_mydemo\screen\gui_main_scr.h">
|
||||||
<Filter>lvgl_mydemo\srceen</Filter>
|
<Filter>lvgl_mydemo\srceen</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="lvgl_mydemo\screen\gui_test1_scr.h">
|
<ClInclude Include="lvgl_mydemo\screen\gui_test1_scr.h">
|
||||||
<Filter>lvgl_mydemo\srceen</Filter>
|
<Filter>lvgl_mydemo\srceen</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="lvgl_mydemo\data\gui_scr_mgr.h">
|
||||||
|
<Filter>lvgl_mydemo\data</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Manifest Include="LVGL.Simulator.manifest" />
|
<Manifest Include="LVGL.Simulator.manifest" />
|
||||||
@@ -36,22 +33,19 @@
|
|||||||
<ClCompile Include="lvgl_mydemo\data\dataModel.c">
|
<ClCompile Include="lvgl_mydemo\data\dataModel.c">
|
||||||
<Filter>lvgl_mydemo\data</Filter>
|
<Filter>lvgl_mydemo\data</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="lvgl_mydemo\data\scr_mgr.c">
|
|
||||||
<Filter>lvgl_mydemo\data</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="lvgl_mydemo\screen\gui_main_scr.c">
|
<ClCompile Include="lvgl_mydemo\screen\gui_main_scr.c">
|
||||||
<Filter>lvgl_mydemo\srceen</Filter>
|
<Filter>lvgl_mydemo\srceen</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="lvgl_mydemo\screen\gui_scr_mgr.c">
|
|
||||||
<Filter>lvgl_mydemo\srceen</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="lvgl_mydemo\screen\gui_test1_scr.c">
|
<ClCompile Include="lvgl_mydemo\screen\gui_test1_scr.c">
|
||||||
<Filter>lvgl_mydemo\srceen</Filter>
|
<Filter>lvgl_mydemo\srceen</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="lvgl_mydemo\log\gui_log.c">
|
<ClCompile Include="lvgl_mydemo\log\drv_log.c">
|
||||||
<Filter>lvgl_mydemo\log</Filter>
|
<Filter>lvgl_mydemo\log</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="lvgl_mydemo\log\drv_log.c">
|
<ClCompile Include="lvgl_mydemo\data\gui_scr_mgr.c">
|
||||||
|
<Filter>lvgl_mydemo\data</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="lvgl_mydemo\log\lib_log.c">
|
||||||
<Filter>lvgl_mydemo\log</Filter>
|
<Filter>lvgl_mydemo\log</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
3
LVGL.Simulator/lvgl_mydemo/.vscode/settings.json
vendored
Normal file
3
LVGL.Simulator/lvgl_mydemo/.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"C_Cpp.errorSquiggles": "Disabled"
|
||||||
|
}
|
||||||
@@ -1 +1,20 @@
|
|||||||
lvgl mode code
|
工程文件结构
|
||||||
|
|
||||||
|
assert: 存放字体和图片资源
|
||||||
|
font:存放字体
|
||||||
|
image:存放图片
|
||||||
|
|
||||||
|
data: 用于构建MVC模型
|
||||||
|
dataModel.c: MVC模型中的Model,用于数据变化是更新显示器
|
||||||
|
gui_scr_mgr.c: MVC模型中的Controller,用于控制界面的切换
|
||||||
|
|
||||||
|
screen:界面
|
||||||
|
|
||||||
|
widgets:自定义的通用组件widgtes
|
||||||
|
|
||||||
|
event: 自定义的一些事件
|
||||||
|
|
||||||
|
log:日志管理
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
/************************************************************************
|
/************************************************************************
|
||||||
* FilePath : gui_scr_mgr.c
|
* FilePath : scr_mgr.c
|
||||||
* Author : GX.Duan
|
* Author : GX.Duan
|
||||||
* Date : 2022-09-10 14:17:29
|
* Date : 2022-08-18 22:59:28
|
||||||
* LastEditTime : 2022-09-10 15:43:26
|
* LastEditTime : 2022-09-30 22:14:31
|
||||||
* LastEditors : ShallowGreen123 2608653986@qq.com
|
* LastEditors : ShallowGreen123 2608653986@qq.com
|
||||||
* Copyright (c): 2022 by GX.Duan, All Rights Reserved.
|
* Copyright (c): 2022 by GX.Duan, All Rights Reserved.
|
||||||
* Github : https://github.com/ShallowGreen123/lvgl_mydemo
|
* Github : https://github.com/ShallowGreen123/lvgl_mydemo
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
#define __SCR_MGR_C__
|
#define __SCR_MGR_C__
|
||||||
|
|
||||||
/*********************************************************************************
|
/*********************************************************************************
|
||||||
@@ -44,7 +45,8 @@ static const SCR_MGR_SCR_HANDLE_T *ScrMgrScrHandles[] = {
|
|||||||
* STATIC FUNCTION
|
* STATIC FUNCTION
|
||||||
*********************************************************************************/
|
*********************************************************************************/
|
||||||
|
|
||||||
static SCR_MGR_SCR_HANDLE_T *ScrMgrFindScrById(uint32_t id) {
|
static SCR_MGR_SCR_HANDLE_T *ScrMgrFindScrById(uint32_t id)
|
||||||
|
{
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
|
|
||||||
for (i = 0; i < ScrMgrRegScrList->ScrCnt; i++) {
|
for (i = 0; i < ScrMgrRegScrList->ScrCnt; i++) {
|
||||||
@@ -55,7 +57,8 @@ static SCR_MGR_SCR_HANDLE_T *ScrMgrFindScrById(uint32_t id) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ScrMgrStackScrActive(SCR_MGR_SCR_STACK_HANDLE_T *stack_item) {
|
static void ScrMgrStackScrActive(SCR_MGR_SCR_STACK_HANDLE_T *stack_item)
|
||||||
|
{
|
||||||
if (stack_item->State == SCR_MGR_SCR_STATE_DESTROYED) {
|
if (stack_item->State == SCR_MGR_SCR_STATE_DESTROYED) {
|
||||||
stack_item->ScrObj = stack_item->ScrHandle->ScrCreate(NULL);
|
stack_item->ScrObj = stack_item->ScrHandle->ScrCreate(NULL);
|
||||||
stack_item->ScrHandle->ScrEnter();
|
stack_item->ScrHandle->ScrEnter();
|
||||||
@@ -66,14 +69,16 @@ static void ScrMgrStackScrActive(SCR_MGR_SCR_STACK_HANDLE_T *stack_item) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ScrMgrStackScrInactive(SCR_MGR_SCR_STACK_HANDLE_T *stack_item) {
|
static void ScrMgrStackScrInactive(SCR_MGR_SCR_STACK_HANDLE_T *stack_item)
|
||||||
|
{
|
||||||
if (stack_item->State > SCR_MGR_SCR_STATE_INACTIVE) {
|
if (stack_item->State > SCR_MGR_SCR_STATE_INACTIVE) {
|
||||||
stack_item->ScrHandle->ScrExit();
|
stack_item->ScrHandle->ScrExit();
|
||||||
stack_item->State = SCR_MGR_SCR_STATE_INACTIVE;
|
stack_item->State = SCR_MGR_SCR_STATE_INACTIVE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ScrMgrStackScrDestroy(SCR_MGR_SCR_STACK_HANDLE_T *stack_item) {
|
static void ScrMgrStackScrDestroy(SCR_MGR_SCR_STACK_HANDLE_T *stack_item)
|
||||||
|
{
|
||||||
if (stack_item->State > SCR_MGR_SCR_STATE_INACTIVE) {
|
if (stack_item->State > SCR_MGR_SCR_STATE_INACTIVE) {
|
||||||
stack_item->ScrHandle->ScrExit();
|
stack_item->ScrHandle->ScrExit();
|
||||||
stack_item->ScrHandle->ScrDestroy();
|
stack_item->ScrHandle->ScrDestroy();
|
||||||
@@ -84,7 +89,8 @@ static void ScrMgrStackScrDestroy(SCR_MGR_SCR_STACK_HANDLE_T *stack_item) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ScrMgrStackScrRemove(SCR_MGR_SCR_STACK_HANDLE_T *stack_item) {
|
static void ScrMgrStackScrRemove(SCR_MGR_SCR_STACK_HANDLE_T *stack_item)
|
||||||
|
{
|
||||||
if (stack_item->State > SCR_MGR_SCR_STATE_INACTIVE) {
|
if (stack_item->State > SCR_MGR_SCR_STATE_INACTIVE) {
|
||||||
stack_item->ScrHandle->ScrExit();
|
stack_item->ScrHandle->ScrExit();
|
||||||
stack_item->ScrHandle->ScrDestroy();
|
stack_item->ScrHandle->ScrDestroy();
|
||||||
@@ -99,7 +105,8 @@ static void ScrMgrStackScrRemove(SCR_MGR_SCR_STACK_HANDLE_T *stack_item) {
|
|||||||
* GLOBAL FUNCTION
|
* GLOBAL FUNCTION
|
||||||
*********************************************************************************/
|
*********************************************************************************/
|
||||||
|
|
||||||
void ScrMgrInit(void) {
|
void ScrMgrInit(void)
|
||||||
|
{
|
||||||
uint32_t cnt = sizeof(ScrMgrScrHandles) / sizeof(ScrMgrScrHandles[0]);
|
uint32_t cnt = sizeof(ScrMgrScrHandles) / sizeof(ScrMgrScrHandles[0]);
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
|
|
||||||
@@ -115,7 +122,8 @@ void ScrMgrInit(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ScrMgrSwitchScr(uint32_t scr_id, bool anim) {
|
bool ScrMgrSwitchScr(uint32_t scr_id, bool anim)
|
||||||
|
{
|
||||||
SCR_MGR_SCR_HANDLE_T *tgt_scr = ScrMgrFindScrById(scr_id);
|
SCR_MGR_SCR_HANDLE_T *tgt_scr = ScrMgrFindScrById(scr_id);
|
||||||
SCR_MGR_SCR_HANDLE_T *cur_scr = NULL;
|
SCR_MGR_SCR_HANDLE_T *cur_scr = NULL;
|
||||||
lv_obj_t *cur_scr_obj = NULL;
|
lv_obj_t *cur_scr_obj = NULL;
|
||||||
@@ -172,7 +180,8 @@ bool ScrMgrSwitchScr(uint32_t scr_id, bool anim) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ScrMgrPushScr(uint32_t scr_id, bool anim) {
|
bool ScrMgrPushScr(uint32_t scr_id, bool anim)
|
||||||
|
{
|
||||||
SCR_MGR_SCR_HANDLE_T *tgt_scr = ScrMgrFindScrById(scr_id);
|
SCR_MGR_SCR_HANDLE_T *tgt_scr = ScrMgrFindScrById(scr_id);
|
||||||
SCR_MGR_SCR_STACK_HANDLE_T *stack_item;
|
SCR_MGR_SCR_STACK_HANDLE_T *stack_item;
|
||||||
|
|
||||||
@@ -217,7 +226,8 @@ bool ScrMgrPushScr(uint32_t scr_id, bool anim) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ScrMgrPopScr(bool anim) {
|
bool ScrMgrPopScr(bool anim)
|
||||||
|
{
|
||||||
SCR_MGR_SCR_STACK_HANDLE_T *dst_item = NULL;
|
SCR_MGR_SCR_STACK_HANDLE_T *dst_item = NULL;
|
||||||
lv_obj_t *cur_scr_obj;
|
lv_obj_t *cur_scr_obj;
|
||||||
lv_obj_t *dst_scr_obj;
|
lv_obj_t *dst_scr_obj;
|
||||||
@@ -252,7 +262,8 @@ bool ScrMgrPopScr(bool anim) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ScrMgrPopNScr(uint32_t cnt, bool anim) {
|
bool ScrMgrPopNScr(uint32_t cnt, bool anim)
|
||||||
|
{
|
||||||
SCR_MGR_SCR_STACK_HANDLE_T *dst_item = NULL;
|
SCR_MGR_SCR_STACK_HANDLE_T *dst_item = NULL;
|
||||||
lv_obj_t *cur_scr_obj;
|
lv_obj_t *cur_scr_obj;
|
||||||
lv_obj_t *dst_scr_obj;
|
lv_obj_t *dst_scr_obj;
|
||||||
@@ -295,7 +306,8 @@ bool ScrMgrPopNScr(uint32_t cnt, bool anim) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ScrMgrPopToRoot(bool anim) {
|
bool ScrMgrPopToRoot(bool anim)
|
||||||
|
{
|
||||||
SCR_MGR_SCR_STACK_HANDLE_T *dst_item = NULL;
|
SCR_MGR_SCR_STACK_HANDLE_T *dst_item = NULL;
|
||||||
lv_obj_t *cur_scr_obj;
|
lv_obj_t *cur_scr_obj;
|
||||||
|
|
||||||
@@ -337,7 +349,8 @@ bool ScrMgrPopToRoot(bool anim) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScrMgrTrimMem(void) {
|
void ScrMgrTrimMem(void)
|
||||||
|
{
|
||||||
SCR_MGR_SCR_STACK_HANDLE_T *stack_item = ScrMgrScrStackRoot;
|
SCR_MGR_SCR_STACK_HANDLE_T *stack_item = ScrMgrScrStackRoot;
|
||||||
|
|
||||||
while ((stack_item != NULL) && (stack_item != ScrMgrScrStackTop)) {
|
while ((stack_item != NULL) && (stack_item != ScrMgrScrStackTop)) {
|
||||||
@@ -1,9 +1,13 @@
|
|||||||
/************************************************************************
|
/************************************************************************
|
||||||
* Date: 2022-09-10 14:17:40
|
* FilePath : scr_mgr.h
|
||||||
* LastEditors: ShallowGreen123 2608653986@qq.com
|
* Author : GX.Duan
|
||||||
* LastEditTime: 2022-09-10 15:17:28
|
* Date : 2022-08-18 22:59:39
|
||||||
* FilePath: \LVGL.Simulator\lvgl_mydemo\screen\gui_scr_mgr.h
|
* LastEditTime : 2022-09-30 22:14:56
|
||||||
|
* LastEditors : ShallowGreen123 2608653986@qq.com
|
||||||
|
* Copyright (c): 2022 by GX.Duan, All Rights Reserved.
|
||||||
|
* Github : https://github.com/ShallowGreen123/lvgl_mydemo
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
#ifndef __SCR_MGR_H__
|
#ifndef __SCR_MGR_H__
|
||||||
#define __SCR_MGR_H__
|
#define __SCR_MGR_H__
|
||||||
|
|
||||||
@@ -19,6 +23,7 @@
|
|||||||
* *******************************************************************************/
|
* *******************************************************************************/
|
||||||
#define DEF_SCR_MGR_LITTLE_MEM 0
|
#define DEF_SCR_MGR_LITTLE_MEM 0
|
||||||
|
|
||||||
|
// ARM 结构的单片机使用
|
||||||
// #define SCR_MGR_REG(handle) \
|
// #define SCR_MGR_REG(handle) \
|
||||||
// __attribute__((used, section("APP_SCREEN"))) const typeof(handle) *ScrMgrScrHandleList_##handle = &(handle)
|
// __attribute__((used, section("APP_SCREEN"))) const typeof(handle) *ScrMgrScrHandleList_##handle = &(handle)
|
||||||
|
|
||||||
@@ -33,9 +38,9 @@
|
|||||||
* MACROS
|
* MACROS
|
||||||
* *******************************************************************************/
|
* *******************************************************************************/
|
||||||
#ifdef __SCR_MGR_C__
|
#ifdef __SCR_MGR_C__
|
||||||
#define DEF_SCR_MGR_EXT
|
# define DEF_SCR_MGR_EXT
|
||||||
#else
|
#else
|
||||||
#define DEF_SCR_MGR_EXT extern
|
# define DEF_SCR_MGR_EXT extern
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*********************************************************************************
|
/*********************************************************************************
|
||||||
@@ -74,8 +79,7 @@ extern const SCR_MGR_SCR_HANDLE_T Gui_MainScrHandle;
|
|||||||
extern const SCR_MGR_SCR_HANDLE_T Gui_Test1ScrHandle;
|
extern const SCR_MGR_SCR_HANDLE_T Gui_Test1ScrHandle;
|
||||||
|
|
||||||
//
|
//
|
||||||
DEF_SCR_MGR_EXT void
|
DEF_SCR_MGR_EXT void ScrMgrInit(void);
|
||||||
ScrMgrInit(void);
|
|
||||||
|
|
||||||
/* Clear current stack and switch to new screen */
|
/* Clear current stack and switch to new screen */
|
||||||
DEF_SCR_MGR_EXT bool ScrMgrSwitchScr(uint32_t scr_id, bool anim);
|
DEF_SCR_MGR_EXT bool ScrMgrSwitchScr(uint32_t scr_id, bool anim);
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
/************************************************************************
|
|
||||||
* FilePath : scr_mgr.c
|
|
||||||
* Author : GX.Duan
|
|
||||||
* Date : 2022-08-18
|
|
||||||
* LastEditTime : 2022-08-19
|
|
||||||
* LastEditors : ShallowGreen123 2608653986@qq.com
|
|
||||||
* Copyright (c): by GX.Duan, All Rights Reserved.
|
|
||||||
* Github : https://github.com/ShallowGreen123/lvgl_mydemo
|
|
||||||
************************************************************************/
|
|
||||||
#define __SCR_MGR_C__
|
|
||||||
|
|
||||||
/*********************************************************************************
|
|
||||||
* INCLUDES
|
|
||||||
* *******************************************************************************/
|
|
||||||
#include "scr_mgr.h"
|
|
||||||
|
|
||||||
/*********************************************************************************
|
|
||||||
* DEFINES
|
|
||||||
* *******************************************************************************/
|
|
||||||
|
|
||||||
/*********************************************************************************
|
|
||||||
* MACROS
|
|
||||||
* *******************************************************************************/
|
|
||||||
|
|
||||||
/*********************************************************************************
|
|
||||||
* TYPEDEFS
|
|
||||||
* *******************************************************************************/
|
|
||||||
|
|
||||||
/*********************************************************************************
|
|
||||||
* STATIC FUNCTION
|
|
||||||
* *******************************************************************************/
|
|
||||||
|
|
||||||
/*********************************************************************************
|
|
||||||
* GLOBAL FUNCTION
|
|
||||||
* *******************************************************************************/
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
/************************************************************************
|
|
||||||
* FilePath : scr_mgr.h
|
|
||||||
* Author : GX.Duan
|
|
||||||
* Date : 2022-08-18
|
|
||||||
* LastEditTime : 2022-08-19
|
|
||||||
* LastEditors : ShallowGreen123 2608653986@qq.com
|
|
||||||
* Copyright (c): by GX.Duan, All Rights Reserved.
|
|
||||||
* Github : https://github.com/ShallowGreen123/lvgl_mydemo
|
|
||||||
************************************************************************/
|
|
||||||
#ifndef __SCR_MGR_H__
|
|
||||||
#define __SCR_MGR_H__
|
|
||||||
|
|
||||||
/*********************************************************************************
|
|
||||||
* INCLUDES
|
|
||||||
* *******************************************************************************/
|
|
||||||
|
|
||||||
/*********************************************************************************
|
|
||||||
* DEFINES
|
|
||||||
* *******************************************************************************/
|
|
||||||
#ifdef __SCR_MGR_C__
|
|
||||||
#define DEF_EXTERN
|
|
||||||
#else
|
|
||||||
#define DEF_EXTERN extern
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*********************************************************************************
|
|
||||||
* MACROS
|
|
||||||
* *******************************************************************************/
|
|
||||||
|
|
||||||
/*********************************************************************************
|
|
||||||
* TYPEDEFS
|
|
||||||
* *******************************************************************************/
|
|
||||||
|
|
||||||
/*********************************************************************************
|
|
||||||
* GLOBAL PROTOTYPES
|
|
||||||
* *******************************************************************************/
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
* INCLUDES
|
* INCLUDES
|
||||||
* *******************************************************************************/
|
* *******************************************************************************/
|
||||||
#include "lvgl_app.h"
|
#include "lvgl_app.h"
|
||||||
#include "screen/gui_scr_mgr.h"
|
#include "data/gui_scr_mgr.h"
|
||||||
|
|
||||||
/*********************************************************************************
|
/*********************************************************************************
|
||||||
* DEFINES
|
* DEFINES
|
||||||
@@ -39,7 +39,7 @@ static void log_write_timer_cb(lv_timer_t *t)
|
|||||||
TRACE_E("Hello wrold!");
|
TRACE_E("Hello wrold!");
|
||||||
TRACE_W("Hello wrold!");
|
TRACE_W("Hello wrold!");
|
||||||
|
|
||||||
Lib_TraceProc();
|
Lib_LogProc();
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool log_write_to_file(LIB_TRACE_ITEM_HANDLE_T *item)
|
static bool log_write_to_file(LIB_TRACE_ITEM_HANDLE_T *item)
|
||||||
@@ -53,8 +53,8 @@ static bool log_write_to_file(LIB_TRACE_ITEM_HANDLE_T *item)
|
|||||||
|
|
||||||
void lvgl_app_init(void)
|
void lvgl_app_init(void)
|
||||||
{
|
{
|
||||||
Lib_TraceInit();
|
Lib_LogInit();
|
||||||
Lib_TraceRegistWriter(log_write_to_file);
|
Lib_LogRegistWriter(log_write_to_file);
|
||||||
|
|
||||||
DataModelInit();
|
DataModelInit();
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/************************************************************************
|
/************************************************************************
|
||||||
* FilePath : lvgl_app.h
|
* FilePath : lvgl_app.h
|
||||||
* Author : GX.Duan
|
* Author : GX.Duan
|
||||||
* Date : 2022-08-07 15:20:41
|
* Date : 2022-08-07 15:20:41
|
||||||
@@ -15,9 +15,9 @@
|
|||||||
* *******************************************************************************/
|
* *******************************************************************************/
|
||||||
#include "../lvgl/lvgl.h"
|
#include "../lvgl/lvgl.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "log/gui_log.h"
|
#include "log/lib_log.h"
|
||||||
#include "data/dataModel.h"
|
#include "data/dataModel.h"
|
||||||
#include "screen/gui_scr_mgr.h"
|
#include "data/gui_scr_mgr.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|||||||
Reference in New Issue
Block a user