Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
0e687536
D
Docs
项目概览
OpenHarmony
/
Docs
大约 1 年 前同步成功
通知
159
Star
292
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
0e687536
编写于
5月 16, 2022
作者:
K
king_he
提交者:
Gitee
5月 16, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update en/device-dev/driver/driver-platform-watchdog-des.md.
Signed-off-by:
N
king_he
<
6384784@qq.com
>
上级
54cfc847
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
14 addition
and
15 deletion
+14
-15
en/device-dev/driver/driver-platform-watchdog-des.md
en/device-dev/driver/driver-platform-watchdog-des.md
+14
-15
未找到文件。
en/device-dev/driver/driver-platform-watchdog-des.md
浏览文件 @
0e687536
...
...
@@ -6,7 +6,7 @@ A watchdog, also called a watchdog timer, is a hardware timing device. If an err
## Available APIs<a name="section1180575010271"></a>
**Table 1**
Watchdog APIs
**Table 1**
Watchdog APIs
<a
name=
"table1731550155318"
></a>
<table><thead
align=
"left"
><tr
id=
"row4419501537"
><th
class=
"cellrowborder"
valign=
"top"
width=
"26.619999999999997%"
id=
"mcps1.2.4.1.1"
><p
id=
"p641050105320"
><a
name=
"p641050105320"
></a><a
name=
"p641050105320"
></a>
Capability
</p>
...
...
@@ -70,7 +70,7 @@ A watchdog, also called a watchdog timer, is a hardware timing device. If an err
</tbody>
</table>
>![](../public_sys-resources/icon-note.gif) **NOTE:**
>![](../public_sys-resources/icon-note.gif) **NOTE:**
<br>
>All watchdog functions provided in this document can be called only in kernel mode.
## Usage Guidelines<a name="section10103184312813"></a>
...
...
@@ -79,16 +79,16 @@ A watchdog, also called a watchdog timer, is a hardware timing device. If an err
[
Figure 1
](
#fig430533913392
)
illustrates the process of using a watchdog.
**Figure 1**
Process of using a watchdog
<a
name=
"fig430533913392"
></a>
**Figure 1**
Process of using a watchdog
<a
name=
"fig430533913392"
></a>
![](
figures/process-of-using-a-watchdog.png
"process-of-using-a-watchdog"
)
### Opening a Watchdog<a name="section66089201107"></a>
Use
**WatchdogOpen**
to open a watchdog. A system may have multiple watchdogs. You can open the specified watchdog by using the ID.
Use
**WatchdogOpen**
to open a watchdog. A system may have multiple watchdogs. You can open the specified watchdog by using the ID.
int32
\_
t WatchdogOpen
\(
int16
\_
t wdtId
\)
;
**Table 2**
Description of WatchdogOpen
**Table 2**
Description of WatchdogOpen
<a
name=
"table1413702552814"
></a>
<table><thead
align=
"left"
><tr
id=
"row131371325142819"
><th
class=
"cellrowborder"
valign=
"top"
width=
"44.99%"
id=
"mcps1.2.3.1.1"
><p
id=
"p191372254283"
><a
name=
"p191372254283"
></a><a
name=
"p191372254283"
></a><strong
id=
"b9239182472212"
><a
name=
"b9239182472212"
></a><a
name=
"b9239182472212"
></a>
Parameter
</strong></p>
...
...
@@ -133,7 +133,7 @@ if (handle == NULL) {
int32
\_
t WatchdogGetStatus
\(
DevHandle handle, int32
\_
t
\*
status
\)
;
**Table 3**
Description of WatchdogGetStatus
**Table 3**
Description of WatchdogGetStatus
<a
name=
"table1018490043"
></a>
<table><thead
align=
"left"
><tr
id=
"row31848013417"
><th
class=
"cellrowborder"
valign=
"top"
width=
"44.99%"
id=
"mcps1.2.3.1.1"
><p
id=
"p1415816132411"
><a
name=
"p1415816132411"
></a><a
name=
"p1415816132411"
></a><strong
id=
"b8395121072312"
><a
name=
"b8395121072312"
></a><a
name=
"b8395121072312"
></a>
Parameter
</strong></p>
...
...
@@ -185,7 +185,7 @@ if (ret != 0) {
int32
\_
t WatchdogSetTimeout
\(
PalHandle
\*
handle, uint32
\_
t seconds
\)
;
**Table 4**
Description of WatchdogSetTimeout
**Table 4**
Description of WatchdogSetTimeout
<a
name=
"table9159112182210"
></a>
<table><thead
align=
"left"
><tr
id=
"row1216012212212"
><th
class=
"cellrowborder"
valign=
"top"
width=
"44.99%"
id=
"mcps1.2.3.1.1"
><p
id=
"p1416017262215"
><a
name=
"p1416017262215"
></a><a
name=
"p1416017262215"
></a><strong
id=
"b16573184672318"
><a
name=
"b16573184672318"
></a><a
name=
"b16573184672318"
></a>
Parameter
</strong></p>
...
...
@@ -237,7 +237,7 @@ if (ret != 0) {
int32
\_
t WatchdogGetTimeout
\(
PalHandle
\*
handle, uint32
\_
t
\*
seconds
\)
;
**Table 5**
Description of WatchdogGetTimeout
**Table 5**
Description of WatchdogGetTimeout
<a
name=
"table10147164819233"
></a>
<table><thead
align=
"left"
><tr
id=
"row14147848142313"
><th
class=
"cellrowborder"
valign=
"top"
width=
"44.99%"
id=
"mcps1.2.3.1.1"
><p
id=
"p4147124892316"
><a
name=
"p4147124892316"
></a><a
name=
"p4147124892316"
></a><strong
id=
"b1387481413247"
><a
name=
"b1387481413247"
></a><a
name=
"b1387481413247"
></a>
Parameter
</strong></p>
...
...
@@ -289,7 +289,7 @@ if (ret != 0) {
int32
\_
t WatchdogStart
\(
DevHandle handle
\)
;
**Table 6**
Description of WatchdogStart
**Table 6**
Description of WatchdogStart
<a
name=
"table529165182515"
></a>
<table><thead
align=
"left"
><tr
id=
"row92915122513"
><th
class=
"cellrowborder"
valign=
"top"
width=
"44.99%"
id=
"mcps1.2.3.1.1"
><p
id=
"p5292582517"
><a
name=
"p5292582517"
></a><a
name=
"p5292582517"
></a><strong
id=
"b99151951162417"
><a
name=
"b99151951162417"
></a><a
name=
"b99151951162417"
></a>
Parameter
</strong></p>
...
...
@@ -335,7 +335,7 @@ if (ret != 0) {
int32
\_
t WatchdogFeed
\(
DevHandle handle
\)
;
**Table 7**
Description of WatchdogFeed
**Table 7**
Description of WatchdogFeed
<a
name=
"table091163515394"
></a>
<table><thead
align=
"left"
><tr
id=
"row891133515393"
><th
class=
"cellrowborder"
valign=
"top"
width=
"44.99%"
id=
"mcps1.2.3.1.1"
><p
id=
"p1911143513918"
><a
name=
"p1911143513918"
></a><a
name=
"p1911143513918"
></a><strong
id=
"b16850010142518"
><a
name=
"b16850010142518"
></a><a
name=
"b16850010142518"
></a>
Parameter
</strong></p>
...
...
@@ -381,7 +381,7 @@ if (ret != 0) {
int32
\_
t WatchdogStop
\(
DevHandle handle
\)
;
**Table 8**
Description of WatchdogStop
**Table 8**
Description of WatchdogStop
<a
name=
"table1286810515254"
></a>
<table><thead
align=
"left"
><tr
id=
"row28687517259"
><th
class=
"cellrowborder"
valign=
"top"
width=
"44.99%"
id=
"mcps1.2.3.1.1"
><p
id=
"p6868185120254"
><a
name=
"p6868185120254"
></a><a
name=
"p6868185120254"
></a><strong
id=
"b204221347152519"
><a
name=
"b204221347152519"
></a><a
name=
"b204221347152519"
></a>
Parameter
</strong></p>
...
...
@@ -425,11 +425,11 @@ if (ret != 0) {
### Closing a Watchdog<a name="section96561824121311"></a>
If the watchdog is no longer required, call
**WatchdogClose**
to close the watchdog handle.
If the watchdog is no longer required, call
**WatchdogClose**
to close the watchdog handle.
void WatchdogClose
\(
DevHandle handle
\)
;
**Table 9**
Description of WatchdogClose
**Table 9**
Description of WatchdogClose
<a
name=
"table1017315185320"
></a>
<table><thead
align=
"left"
><tr
id=
"row417314182327"
><th
class=
"cellrowborder"
valign=
"top"
width=
"44.99%"
id=
"mcps1.2.3.1.1"
><p
id=
"p117310184320"
><a
name=
"p117310184320"
></a><a
name=
"p117310184320"
></a><strong
id=
"b97421847122514"
><a
name=
"b97421847122514"
></a><a
name=
"b97421847122514"
></a>
Parameter
</strong></p>
...
...
@@ -535,5 +535,4 @@ static int32_t TestCaseWatchdog(void)
WatchdogClose(handle);
return -1;
}
```
```
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录