未验证 提交 7f1a0a6d 编写于 作者: 葛亚芳 提交者: Gitee

update en/application-dev/reference/apis/js-apis-usb.md.

Signed-off-by: N@ge-yafang <geyafang@huawei.com>
上级 4834da60
...@@ -126,8 +126,8 @@ Checks whether the application has the permission to access the device. ...@@ -126,8 +126,8 @@ Checks whether the application has the permission to access the device.
- **Example** - **Example**
```js ```js
let divicesName="1-1"; let devicesName="1-1";
let bool = usb.hasRight(divicesName); let bool = usb.hasRight(devicesName);
console.log(bool); console.log(bool);
``` ```
...@@ -152,8 +152,8 @@ Requests the temporary permission for the application to access the USB device. ...@@ -152,8 +152,8 @@ Requests the temporary permission for the application to access the USB device.
- **Example** - **Example**
```js ```js
let divicesName="1-1"; let devicesName="1-1";
usb.requestRight(divicesName).then((ret) => { usb.requestRight(devicesName).then((ret) => {
console.log(`requestRight = ${JSON.stringify(ret)}`); console.log(`requestRight = ${JSON.stringify(ret)}`);
}); });
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册