From eb3d95a32016dcf9d008b7f693970785502a02ec Mon Sep 17 00:00:00 2001 From: "mark.zhu" Date: Thu, 20 Apr 2023 20:54:02 +0800 Subject: [PATCH] =?UTF-8?q?docs=20(uos&powerkey&osTimer):=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=AF=B9=E4=BA=8E=E5=9B=9E=E8=B0=83=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E5=8E=9F=E5=9E=8B=E5=92=8C=E5=8F=82=E6=95=B0=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E7=9A=84=E4=BB=8B=E7=BB=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加对于回调函数原型和参数类型的介绍 固件版本: N/A 是否需要文案翻译: 是 --- .../zh/QuecPython\346\240\207\345\207\206\345\272\223/uos.md" | 3 +-- .../zh/QuecPython\347\261\273\345\272\223/misc.PowerKey.md" | 2 +- .../zh/QuecPython\347\261\273\345\272\223/osTimer.md" | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git "a/docs/API_reference/zh/QuecPython\346\240\207\345\207\206\345\272\223/uos.md" "b/docs/API_reference/zh/QuecPython\346\240\207\345\207\206\345\272\223/uos.md" index a1768a34..cb30bb18 100644 --- "a/docs/API_reference/zh/QuecPython\346\240\207\345\207\206\345\272\223/uos.md" +++ "b/docs/API_reference/zh/QuecPython\346\240\207\345\207\206\345\272\223/uos.md" @@ -444,8 +444,7 @@ uos.set_callback(fun) **参数描述** -* `fun`,function类型,插拔卡回调 `[ind_type]` -* `ind_type`: 事件类型,0:拔卡 1:插卡 +* `fun`,插拔卡的回调函数,function类型,原型为fun(args),参数`args`为int类型,0表示拔卡,1表示插卡 **返回值描述** diff --git "a/docs/API_reference/zh/QuecPython\347\261\273\345\272\223/misc.PowerKey.md" "b/docs/API_reference/zh/QuecPython\347\261\273\345\272\223/misc.PowerKey.md" index f213ed65..2529c9a9 100644 --- "a/docs/API_reference/zh/QuecPython\347\261\273\345\272\223/misc.PowerKey.md" +++ "b/docs/API_reference/zh/QuecPython\347\261\273\345\272\223/misc.PowerKey.md" @@ -33,7 +33,7 @@ PowerKey.powerKeyEventRegister(usrFun) **参数描述:** -- `usrfun`-回调函数,原型usrfun(status),参数status:`0`表示松开,`1`表示按下;按下或松开powerkey按键时触发回调。 +- `usrfun`-回调函数,原型usrfun(status),参数status,int类型:`0`表示松开,`1`表示按下;按下或松开powerkey按键时触发回调。 **返回值描述:** diff --git "a/docs/API_reference/zh/QuecPython\347\261\273\345\272\223/osTimer.md" "b/docs/API_reference/zh/QuecPython\347\261\273\345\272\223/osTimer.md" index 76a1bf71..95e18de6 100644 --- "a/docs/API_reference/zh/QuecPython\347\261\273\345\272\223/osTimer.md" +++ "b/docs/API_reference/zh/QuecPython\347\261\273\345\272\223/osTimer.md" @@ -42,7 +42,7 @@ osTimer.start(initialTime, cyclialEn, callback) * `initialTime`,定时器超时的时间(单位ms),int类型 * `cyclialEn`,是否循环,0为单次,1为循环,int类型 -* `callback`,定时器超时触发的回调,函数 +* `callback`,定时器超时触发的回调,function类型,原型为callback(arg),`arg`未实际使用,可直接传入`None` **返回值描述** -- Gitee