Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
b6e3449c
S
Startup Init Lite
项目概览
OpenHarmony
/
Startup Init Lite
大约 1 年 前同步成功
通知
3
Star
37
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Startup Init Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b6e3449c
编写于
12月 06, 2022
作者:
C
chengjinsong2
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lite-m 上param_service实时保存
Signed-off-by:
N
chengjinsong2
<
chengjinsong2@huawei.com
>
上级
6f5ed9ed
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
6 addition
and
13 deletion
+6
-13
services/param/liteos/param_hal.c
services/param/liteos/param_hal.c
+6
-1
services/param/liteos/param_service.c
services/param/liteos/param_service.c
+0
-12
未找到文件。
services/param/liteos/param_hal.c
浏览文件 @
b6e3449c
...
@@ -141,12 +141,17 @@ static int LoadPersistParam(void)
...
@@ -141,12 +141,17 @@ static int LoadPersistParam(void)
PARAM_CHECK
(
ret
>=
0
,
break
,
"Failed to read file %s"
,
path
);
PARAM_CHECK
(
ret
>=
0
,
break
,
"Failed to read file %s"
,
path
);
uint32_t
currLen
=
0
;
uint32_t
currLen
=
0
;
char
*
tmp
=
buffer
;
while
(
currLen
<
fileSize
)
{
while
(
currLen
<
fileSize
)
{
if
(
buffer
[
currLen
]
==
'\n'
)
{
// split line
if
(
buffer
[
currLen
]
==
'\n'
)
{
// split line
buffer
[
currLen
]
=
'\0'
;
buffer
[
currLen
]
=
'\0'
;
ret
=
SplitParamString
(
buffer
,
NULL
,
0
,
LoadOnePersistParam_
,
NULL
);
ret
=
SplitParamString
(
tmp
,
NULL
,
0
,
LoadOnePersistParam_
,
NULL
);
PARAM_CHECK
(
ret
==
0
,
continue
,
"Failed to set param %d %s"
,
ret
,
buffer
);
PARAM_CHECK
(
ret
==
0
,
continue
,
"Failed to set param %d %s"
,
ret
,
buffer
);
paramNum
++
;
paramNum
++
;
if
(
currLen
+
1
>=
fileSize
)
{
break
;
}
tmp
=
buffer
+
currLen
+
1
;
}
}
currLen
++
;
currLen
++
;
}
}
...
...
services/param/liteos/param_service.c
浏览文件 @
b6e3449c
...
@@ -138,18 +138,6 @@ void LiteParamService(void)
...
@@ -138,18 +138,6 @@ void LiteParamService(void)
InitParamService
();
InitParamService
();
// get persist param
// get persist param
LoadPersistParams
();
LoadPersistParams
();
osThreadAttr_t
attr
;
attr
.
name
=
"ParamServiceTask"
;
attr
.
attr_bits
=
0U
;
attr
.
cb_mem
=
NULL
;
attr
.
cb_size
=
0U
;
attr
.
stack_mem
=
NULL
;
attr
.
stack_size
=
0
;
attr
.
priority
=
osPriorityBelowNormal
;
if
(
osThreadNew
((
osThreadFunc_t
)
ParamServiceTask
,
NULL
,
&
attr
)
==
NULL
)
{
PARAM_LOGE
(
"Failed to create ParamServiceTask! %d"
,
errno
);
}
}
}
CORE_INIT
(
LiteParamService
);
CORE_INIT
(
LiteParamService
);
#endif
#endif
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录