Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
55279ddf
D
Docs
项目概览
OpenHarmony
/
Docs
大约 2 年 前同步成功
通知
161
Star
293
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
55279ddf
编写于
6月 28, 2022
作者:
K
king_he
提交者:
Gitee
6月 28, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update zh-cn/device-dev/driver/driver-platform-watchdog-des.md.
Signed-off-by:
N
king_he
<
6384784@qq.com
>
上级
c1bc1d99
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
11 addition
and
35 deletion
+11
-35
zh-cn/device-dev/driver/driver-platform-watchdog-des.md
zh-cn/device-dev/driver/driver-platform-watchdog-des.md
+11
-35
未找到文件。
zh-cn/device-dev/driver/driver-platform-watchdog-des.md
浏览文件 @
55279ddf
...
...
@@ -8,7 +8,7 @@
## 接口说明
**表1**
看门狗API接口功能介绍
**表1**
看门狗API接口功能介绍
| 接口 | 接口描述 |
| -------- | -------- |
...
...
@@ -32,21 +32,18 @@
使用看门狗的一般流程如下图所示。
**图1**
看门狗使用流程图
**图1**
看门狗使用流程图
!
[
image
](
figures/看门狗使用流程图.png
"看门狗使用流程图"
)

### 打开看门狗设备
在操作看门狗之前,需要使用WatchdogOpen打开一个看门狗设备,一个系统可能有多个看门狗,通过ID号来打开指定的看门狗设备:
```
DevHandle WatchdogOpen(int16_t wdtId);
```
**表2**
WatchdogOpen参数和返回值描述
**表2**
WatchdogOpen参数和返回值描述
|
**参数**
|
**参数描述**
|
| -------- | -------- |
...
...
@@ -68,12 +65,9 @@ if (handle == NULL) {
### 获取看门狗状态
```
int32_t WatchdogGetStatus(DevHandle handle, int32_t
*
status);
```
**表3**
WatchdogGetStatus参数和返回值描述
**表3**
WatchdogGetStatus参数和返回值描述
|
**参数**
|
**参数描述**
|
| -------- | -------- |
...
...
@@ -98,12 +92,9 @@ if (ret != 0) {
### 设置超时时间
```
int32_t WatchdogSetTimeout(DevHandle
*
handle, uint32_t seconds);
```
**表4**
WatchdogSetTimeout参数和返回值描述
**表4**
WatchdogSetTimeout参数和返回值描述
|
**参数**
|
**参数描述**
|
| -------- | -------- |
...
...
@@ -128,12 +119,9 @@ if (ret != 0) {
### 获取超时时间
```
int32_t WatchdogGetTimeout(DevHandle
*handle, uint32_t *
seconds);
```
**表5**
WatchdogGetTimeout参数和返回值描述
**表5**
WatchdogGetTimeout参数和返回值描述
|
**参数**
|
**参数描述**
|
| -------- | -------- |
...
...
@@ -158,12 +146,9 @@ if (ret != 0) {
### 启动看门狗
```
int32_t WatchdogStart(DevHandle handle);
```
**表6**
WatchdogStart参数和返回值描述
**表6**
WatchdogStart参数和返回值描述
|
**参数**
|
**参数描述**
|
| -------- | -------- |
...
...
@@ -186,12 +171,9 @@ if (ret != 0) {
### 喂狗
```
int32_t WatchdogFeed(DevHandle handle);
```
**表7**
WatchdogFeed参数和返回值描述
**表7**
WatchdogFeed参数和返回值描述
|
**参数**
|
**参数描述**
|
| -------- | -------- |
...
...
@@ -214,12 +196,9 @@ if (ret != 0) {
### 停止看门狗
```
int32_t WatchdogStop(DevHandle handle);
```
**表8**
WatchdogStop参数和返回值描述
**表8**
WatchdogStop参数和返回值描述
|
**参数**
|
**参数描述**
|
| -------- | -------- |
...
...
@@ -244,12 +223,9 @@ if (ret != 0) {
当操作完毕时,使用WatchdogClose关闭打开的设备句柄:
```
void WatchdogClose(DevHandle handle);
```
**表9**
WatchdogClose参数和返回值描述
**表9**
WatchdogClose参数和返回值描述
|
**参数**
|
**参数描述**
|
| -------- | -------- |
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录