@@ -390,7 +390,7 @@ Before you do this, call [usb.getDevices](#usbgetdevices) to obtain the USB devi
## usb.closePipe
usb.closePipe(pipe: USBDevicePipe): number
closePipe(pipe: USBDevicePipe): number
Closes a USB device pipe.
...
...
@@ -421,14 +421,14 @@ Represents the USB endpoint from which data is sent or received. You can obtain
| Name| Type| Description|
| -------- | -------- | -------- |
| address | number | Endpoint address.<br>**System capability**: SystemCapability.USB.USBManager|
| attributes | number | Endpoint attributes.<br>**System capability**: SystemCapability.USB.USBManager|
| interval | number | Endpoint interval.<br>**System capability**: SystemCapability.USB.USBManager|
| maxPacketSize | number | Maximum size of data packets on the endpoint.<br>**System capability**: SystemCapability.USB.USBManager|
| direction | [USBRequestDirection](#usbrequestdirection) | Endpoint direction.<br>**System capability**: SystemCapability.USB.USBManager|
| number | number | Endpoint number.<br>**System capability**: SystemCapability.USB.USBManager|
| type | number | Endpoint type.<br>**System capability**: SystemCapability.USB.USBManager|
| interfaceId | number | Unique ID of the interface to which the endpoint belongs.<br>**System capability**: SystemCapability.USB.USBManager|
| address | number | Endpoint address.<br>**System capability**: SystemCapability.USB.USBManager|
| attributes | number | Endpoint attributes.<br>**System capability**: SystemCapability.USB.USBManager|
| interval | number | Endpoint interval.<br>**System capability**: SystemCapability.USB.USBManager|
| maxPacketSize | number | Maximum size of data packets on the endpoint.<br>**System capability**: SystemCapability.USB.USBManager|
| direction | [USBRequestDirection](#usbrequestdirection) | Endpoint direction.<br>**System capability**: SystemCapability.USB.USBManager|
| number | number | Endpoint number.<br>**System capability**: SystemCapability.USB.USBManager|
| type | number | Endpoint type.<br>**System capability**: SystemCapability.USB.USBManager|
| interfaceId | number | Unique ID of the interface to which the endpoint belongs.<br>**System capability**: SystemCapability.USB.USBManager|
## USBInterface
...
...
@@ -437,13 +437,13 @@ Represents a USB interface. One [USBConfig](#usbconfig) can contain multiple **U
| Name| Type| Description|
| -------- | -------- | -------- |
| id | number | Unique ID of the USB interface.<br>**System capability**: SystemCapability.USB.USBManager|
| protocol | number | Interface protocol.<br>**System capability**: SystemCapability.USB.USBManager|
| clazz | number | Device type.<br>**System capability**: SystemCapability.USB.USBManager|
| subClass | number | Device subclass.<br>**System capability**: SystemCapability.USB.USBManager|
| alternateSetting | number | Settings for alternating between descriptors of the same USB interface.<br>**System capability**: SystemCapability.USB.USBManager|
| name | string | Interface name.<br>**System capability**: SystemCapability.USB.USBManager|
| endpoints | Array<[USBEndpoint](#usbendpoint)> | Endpoints that belong to the USB interface.<br>**System capability**: SystemCapability.USB.USBManager|
| id | number | Unique ID of the USB interface.<br>**System capability**: SystemCapability.USB.USBManager|
| protocol | number | Interface protocol.<br>**System capability**: SystemCapability.USB.USBManager|
| clazz | number | Device type.<br>**System capability**: SystemCapability.USB.USBManager|
| subClass | number | Device subclass.<br>**System capability**: SystemCapability.USB.USBManager|
| alternateSetting | number | Settings for alternating between descriptors of the same USB interface.<br>**System capability**: SystemCapability.USB.USBManager|
| name | string | Interface name.<br>**System capability**: SystemCapability.USB.USBManager|
| endpoints | Array<[USBEndpoint](#usbendpoint)> | Endpoints that belong to the USB interface.<br>**System capability**: SystemCapability.USB.USBManager|
## USBConfig
...
...
@@ -452,13 +452,13 @@ Represents the USB configuration. One [USBDevice](#usbdevice) can contain multip
| Name| Type| Description|
| -------- | -------- | -------- |
| id | number | Unique ID of the USB configuration.<br>**System capability**: SystemCapability.USB.USBManager|
| attributes | number | Configuration attributes.<br>**System capability**: SystemCapability.USB.USBManager|
| maxPower | number | Maximum power consumption, in mA.<br>**System capability**: SystemCapability.USB.USBManager|
| name | string | Configuration name, which can be left empty.<br>**System capability**: SystemCapability.USB.USBManager|
| isRemoteWakeup | boolean | Support for remote wakeup.<br>**System capability**: SystemCapability.USB.USBManager|
| isSelfPowered | boolean | Support for independent power supplies.<br>**System capability**: SystemCapability.USB.USBManager|
| USB\_REQUEST\_TYPE\_STANDARD | 0 | Request for writing data from the host to the device. <br>**System capability**: SystemCapability.USB.USBManager|
| USB\_REQUEST\_TYPE\_CLASS | 0x80 | Request for reading data from the device to the host. <br>**System capability**: SystemCapability.USB.USBManager|
| USB_REQUEST_DIR_TO_DEVICE | 0 | Request for writing data from the host to the device.<br>**System capability**: SystemCapability.USB.USBManager|
| USB_REQUEST_DIR_FROM_DEVICE | 0x80 | Request for reading data from the device to the host.<br>**System capability**: SystemCapability.USB.USBManager|