提交 7b1f9b0f 编写于 作者: G ge-yafang

update docs

Signed-off-by: Nge-yafang <geyafang@huawei.com>
上级 49fb93eb
......@@ -35,60 +35,60 @@ You can set a USB device as the USB host to connect to other USB devices for dat
1. Obtain the USB device list.
```js
// Import the USB API package.
import usb from '@ohos.usbV9';
// Obtain the USB device list.
let deviceList = usb.getDevices();
/*
Example deviceList structure
[
// Import the USB API package.
import usb from '@ohos.usbV9';
// Obtain the USB device list.
let deviceList = usb.getDevices();
/*
Example deviceList structure
[
{
name: "1-1",
serial: "",
manufacturerName: "",
productName: "",
version: "",
vendorId: 7531,
productId: 2,
clazz: 9,
subclass: 0,
protocol: 1,
devAddress: 1,
busNum: 1,
configs: [
{
id: 1,
attributes: 224,
isRemoteWakeup: true,
isSelfPowered: true,
maxPower: 0,
name: "1-1",
serial: "",
manufacturerName: "",
productName: "",
version: "",
vendorId: 7531,
productId: 2,
clazz: 9,
subclass: 0,
protocol: 1,
devAddress: 1,
busNum: 1,
configs: [
interfaces: [
{
id: 1,
attributes: 224,
isRemoteWakeup: true,
isSelfPowered: true,
maxPower: 0,
id: 0,
protocol: 0,
clazz: 9,
subclass: 0,
alternateSetting: 0,
name: "1-1",
interfaces: [
endpoints: [
{
id: 0,
protocol: 0,
clazz: 9,
subclass: 0,
alternateSetting: 0,
name: "1-1",
endpoints: [
{
address: 129,
attributes: 3,
interval: 12,
maxPacketSize: 4,
direction: 128,
number: 1,
type: 3,
interfaceId: 0,
}
]
}
]
}
]
}
]
address: 129,
attributes: 3,
interval: 12,
maxPacketSize: 4,
direction: 128,
number: 1,
type: 3,
interfaceId: 0,
}
]
}
]
}
]
}
]
*/
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册