diff --git a/en/application-dev/device/usb-guidelines.md b/en/application-dev/device/usb-guidelines.md index 4cc830271fd50e3b4a0c93cab696aaca251aa18d..56e63cd47e1267a1acb08b240162dd96396c2215 100644 --- a/en/application-dev/device/usb-guidelines.md +++ b/en/application-dev/device/usb-guidelines.md @@ -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, + } + ] + } + ] + } + ] + } + ] */ ```