diff --git a/en/application-dev/dfx/hiappevent-guidelines.md b/en/application-dev/dfx/hiappevent-guidelines.md index 17c599878816756cdf40f2dd3791dde61ed2ea00..ee553b735fb510d78ee6531e0a8a71fa99fc53bb 100644 --- a/en/application-dev/dfx/hiappevent-guidelines.md +++ b/en/application-dev/dfx/hiappevent-guidelines.md @@ -15,7 +15,7 @@ JS application event logging APIs are provided by the **hiAppEvent** module. | write(string eventName, EventType type, object keyValues, AsyncCallback\ callback): void | void | Logs application events in asynchronous mode. This method uses an asynchronous callback to return the result. | | write(string eventName, EventType type, object keyValues): Promise\ | Promise\ | Logs application events in asynchronous mode. This method uses a promise to return the result. | -When an asynchronous callback is used, the return value can be processed directly in the callback. When a promise is used, the return value can also be processed in the promise in a similar way. For details about the result codes, see [Event Verification Result Codes](hiappevent-overview.md#Event Verification Result Codes). +When an asynchronous callback is used, the return value can be processed directly in the callback. When a promise is used, the return value can also be processed in the promise in a similar way. For details about the result codes, see [Event Verification Result Codes](#event-verification-result-codes). **APIs for Event Logging Configuration** @@ -23,6 +23,24 @@ When an asynchronous callback is used, the return value can be processed directl | ------------------------------ | ------------ | ------------------------------------------------------------ | | configure(ConfigOption config) | boolean | Sets the configuration options for application event logging.
The value **true** indicates that the operation is successful, and value **false** indicates the opposite. | +## Event Verification Result Codes + +| Result Code | Cause | Check Rule | Processing Method | +| ----------- | ---------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | +| 0 | None | Event verification is successful. | Event logging is normal. No action is required. | +| -1 | Invalid event name | The event name is not empty and contains a maximum of 48 characters.
The event name consists of only the following characters: digits (0 to 9), letters (a to z), and underscore (\_).
The event name does not start with a digit or underscore (_). | Ignore this event and do not perform logging. | +| -2 | Invalid event parameter type | The event name must be a string.
The event type must be a number.
The key value must be an object. | Ignore this event and do not perform logging. | +| -99 | Application event logging disabled | The application event logging function is disabled. | Ignore this event and do not perform logging. | +| -100 | Unknown error | None | Ignore this event and do not perform logging. | +| 1 | Invalid key name | The key name is not empty and contains a maximum of 16 characters.
The key name consists of only the following characters: digits (0 to 9), letters (a to z), and underscore (\_).
The key name does not start with a digit or underscore (\_).
The key name does not end with an underscore (_). | Ignore the key-value pair and continue to perform logging. | +| 2 | Invalid key type | The key must be a string. | Ignore the key-value pair and continue to perform logging. | +| 3 | Invalid value type | The supported value types vary depending on the programming language:
boolean, number, string, or Array [basic element] | Ignore the key-value pair and continue to perform logging. | +| 4 | Value too long | The value can contain a maximum of 8*1024 characters. | Ignore the key-value pair and continue to perform logging. | +| 5 | Excess key-value pairs | The number of key-value pairs must be less than or equal to 32. | Ignore the excess key-value pairs and continue to perform logging. | +| 6 | Excess elements in a list value | The number of elements in a list value must be less than or equal to 100. | Truncate the list with only the first 100 elements retained, and continue to perform logging. | +| 7 | Invalid list value | A list value can only be a basic element.
The elements in a list value must be of the same type. | Ignore the key-value pair and continue to perform logging. | + + ## How to Develop In this example, an application event is logged after the application startup execution page is loaded. @@ -75,4 +93,4 @@ In this example, an application event is logged after the application startup ex The following sample is provided to help you better understand how to develop the application event logging feature: -- [`JsDotTest`: Event Logging Test (JavaScript) (API 7)](https://gitee.com/openharmony/app_samples/tree/master/DFX/JsDotTest) +- [`JsDotTest`: Event Logging Test (JavaScript) (API 8)](https://gitee.com/openharmony/app_samples/tree/master/DFX/JsDotTest) diff --git a/en/application-dev/dfx/hiappevent-overview.md b/en/application-dev/dfx/hiappevent-overview.md index a123c647e36d943de41b5878d07c06df0324e386..403aec02035c965da4633e8667be6803031ddf60 100644 --- a/en/application-dev/dfx/hiappevent-overview.md +++ b/en/application-dev/dfx/hiappevent-overview.md @@ -7,20 +7,3 @@ HiAppEvent provides event logging APIs for applications to log the fault, statis The HiAppEvent module of OpenHarmony can be used to develop application event services and provide functions related to application events, including flushing application events to a disk and querying historical application event data. **Logging**: Logs changes caused by user operations to provide service data for development, product, and O&M analysis. - -## Event Verification Result Codes - -| Result Code | Cause | Check Rule | Processing Method | -| ----------- | ---------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | -| 0 | None | Event verification is successful. | Event logging is normal. No action is required. | -| -1 | Invalid event name | The event name is not empty and contains a maximum of 48 characters.
The event name consists of only the following characters: digits (0 to 9), letters (a to z), and underscore (\_).
The event name does not start with a digit or underscore (_). | Ignore this event and do not perform logging. | -| -2 | Invalid event parameter type | The event name must be a string.
The event type must be a number.
The key value must be an object. | Ignore this event and do not perform logging. | -| -99 | Application event logging disabled | The application event logging function is disabled. | Ignore this event and do not perform logging. | -| -100 | Unknown error | None | Ignore this event and do not perform logging. | -| 1 | Invalid key name | The key name is not empty and contains a maximum of 16 characters.
The key name consists of only the following characters: digits (0 to 9), letters (a to z), and underscore (\_).
The key name does not start with a digit or underscore (\_).
The key name does not end with an underscore (_). | Ignore the key-value pair and continue to perform logging. | -| 2 | Invalid key type | The key must be a string. | Ignore the key-value pair and continue to perform logging. | -| 3 | Invalid value type | The supported value types vary depending on the programming language:
boolean, number, string, or Array [basic element] | Ignore the key-value pair and continue to perform logging. | -| 4 | Value too long | The value can contain a maximum of 8*1024 characters. | Ignore the key-value pair and continue to perform logging. | -| 5 | Excess key-value pairs | The number of key-value pairs must be less than or equal to 32. | Ignore the excess key-value pairs and continue to perform logging. | -| 6 | Excess elements in a list value | The number of elements in a list value must be less than or equal to 100. | Truncate the list with only the first 100 elements retained, and continue to perform logging. | -| 7 | Invalid list value | A list value can only be a basic element.
The elements in a list value must be of the same type. | Ignore the key-value pair and continue to perform logging. | \ No newline at end of file diff --git a/en/application-dev/reference/apis/js-apis-usb.md b/en/application-dev/reference/apis/js-apis-usb.md index 5a1bd85196e27394a0dcb8225df846e6aa52b541..5f8c2b898204cbddd2c78ee2f50d17afa7af67a6 100644 --- a/en/application-dev/reference/apis/js-apis-usb.md +++ b/en/application-dev/reference/apis/js-apis-usb.md @@ -20,7 +20,7 @@ Obtains the USB device list. - **Return value** | Type| Description| | -------- | -------- | - | Array<Readonly<[USBDevice](#usbdevice)>> | Device information list.| + | Array<Readonly<[USBDevice](#usbdevice)>> | Device information list. | - **Example** ```js @@ -92,12 +92,12 @@ Before you do this, call [usb.getDevices](#usbgetdevices) to obtain the USB devi - **Parameters** | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | - | device | [USBDevice](#usbdevice) | Yes| USB device information.| + | device | [USBDevice](#usbdevice) | Yes| USB device information. | - **Return value** | Type| Description| | -------- | -------- | - | Readonly<[USBDevicePipe](#usbdevicepipe)> | USB device pipe for data transfer.| + | Readonly<[USBDevicePipe](#usbdevicepipe)> | USB device pipe for data transfer. | - **Example** ```js @@ -117,12 +117,12 @@ Checks whether the application has the permission to access the device. - **Parameters** | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | - | deviceName | string | Yes| Device name.| + | deviceName | string | Yes| Device name. | - **Return value** | Type| Description| | -------- | -------- | - | boolean | Returns **true** if the application has the permission to access the device; returns **false** otherwise.| + | boolean | Returns **true** if the application has the permission to access the device; returns **false** otherwise. | - **Example** ```js @@ -143,12 +143,12 @@ Requests the temporary permission for the application to access the USB device. - **Parameters** | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | - | deviceName | string | Yes| Device name.| + | deviceName | string | Yes| Device name. | - **Return value** | Type| Description| | -------- | -------- | - | Promise<boolean> | Returns **true** if the temporary device access permissions are granted; returns **false** otherwise.| + | Promise<boolean> | Returns **true** if the temporary device access permissions are granted; returns **false** otherwise. | - **Example** ```js @@ -158,7 +158,6 @@ Requests the temporary permission for the application to access the USB device. }); ``` - ## usb.claimInterface claimInterface(pipe: USBDevicePipe, iface: USBInterface, force?: boolean): number @@ -172,14 +171,14 @@ Before you do this, call [usb.getDevices](#usbgetdevices) to obtain the USB devi - **Parameters** | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | - | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| Device pipe, which is used to determine the bus number and device address.| - | iface | [USBInterface](#usbinterface) | Yes| USB interface, which is used to determine the index of the interface to claim.| - | force | boolean | No| Whether to forcibly claim the USB interface. The default value is **false**, indicating not to forcibly claim the USB interface.| + | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| Device pipe, which is used to determine the bus number and device address. | + | iface | [USBInterface](#usbinterface) | Yes| USB interface, which is used to determine the index of the interface to claim. | + | force | boolean | No| Whether to forcibly claim the USB interface. The default value is **false**, indicating not to forcibly claim the USB interface. | - **Return value** | Type| Description| | -------- | -------- | - | number | Returns **0** if the USB interface is successfully claimed; returns an error code otherwise.| + | number | Returns **0** if the USB interface is successfully claimed; returns an error code otherwise. | - **Example** ```js @@ -201,13 +200,13 @@ Before you do this, ensure that you have claimed the interface by calling [usb.c - **Parameters** | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | - | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| Device pipe, which is used to determine the bus number and device address.| - | iface | [USBInterface](#usbinterface) | Yes| USB interface, which is used to determine the index of the interface to release.| + | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| Device pipe, which is used to determine the bus number and device address. | + | iface | [USBInterface](#usbinterface) | Yes| USB interface, which is used to determine the index of the interface to release. | - **Return value** | Type| Description| | -------- | -------- | - | number | Returns **0** if the USB interface is successfully released; returns an error code otherwise.| + | number | Returns **0** if the USB interface is successfully released; returns an error code otherwise. | - **Example** ```js @@ -229,13 +228,13 @@ Before you do this, call [usb.getDevices](#usbgetdevices) to obtain the USB devi - **Parameters** | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | - | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| Device pipe, which is used to determine the bus number and device address.| - | config | [USBConfig](#usbconfig) | Yes| USB configuration to set.| + | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| Device pipe, which is used to determine the bus number and device address. | + | config | [USBConfig](#usbconfig) | Yes| USB configuration to set. | - **Return value** | Type| Description| | -------- | -------- | - | number | Returns **0** if the USB configuration is successfully set; returns an error code otherwise.| + | number | Returns **0** if the USB configuration is successfully set; returns an error code otherwise. | - **Example** ```js @@ -243,27 +242,26 @@ Before you do this, call [usb.getDevices](#usbgetdevices) to obtain the USB devi console.log(`setConfiguration = ${ret}`); ``` - ## usb.setInterface setInterface(pipe: USBDevicePipe, iface: USBInterface): number Sets a USB interface. -Before you do this, call [usb.getDevices](#usbgetdevices) to obtain the USB device list and interfaces, call [usb.requestRight](#usbrequestright) to request the device access permission, and call [usb.connectDevice](#usbconnectdevice) to obtain **devicepipe** as an input parameter. +Before you do this, call [usb.getDevices](#usbgetdevices) to obtain the USB device list and interfaces, call [usb.requestRight](#usbrequestright) to request the device access permission, call [usb.connectDevice](#usbconnectdevice) to obtain **devicepipe** as an input parameter, and call [usb.claimInterface](#usbclaiminterface) to claim the USB interface.. **System capability**: SystemCapability.USB.USBManager - **Parameters** | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | - | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| Device pipe, which is used to determine the bus number and device address.| - | iface | [USBInterface](#usbinterface) | Yes| USB interface to set.| + | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| Device pipe, which is used to determine the bus number and device address. | + | iface | [USBInterface](#usbinterface) | Yes| USB interface to set. | - **Return value** | Type| Description| | -------- | -------- | - | number | Returns **0** if the USB interface is successfully set; returns an error code otherwise.| + | number | Returns **0** if the USB interface is successfully set; returns an error code otherwise. | - **Example** ```js @@ -285,12 +283,12 @@ Before you do this, call [usb.getDevices](#usbgetdevices) to obtain the USB devi - **Parameters** | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | - | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| Device pipe, which is used to determine the bus number and device address.| + | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| Device pipe, which is used to determine the bus number and device address. | - **Return value** | Type| Description| | -------- | -------- | - | Uint8Array | Raw descriptor data.| + | Uint8Array | Raw descriptor data. The value **undefined** indicates that the operation has failed. | - **Example** ```js @@ -311,12 +309,12 @@ Before you do this, call [usb.getDevices](#usbgetdevices) to obtain the USB devi - **Parameters** | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | - | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| Device pipe, which is used to determine the bus number and device address.| + | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| Device pipe, which is used to determine the bus number and device address. | - **Return value** | Type| Description| | -------- | -------- | - | number | File descriptor of the USB device.| + | number | File descriptor of the USB device. The value **-1** indicates that the operation has failed. | - **Example** ```js @@ -337,14 +335,14 @@ Before you do this, call [usb.getDevices](#usbgetdevices) to obtain the USB devi - **Parameters** | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | - | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| USB device pipe, which is used to determine the USB device.| - | contrlparam | [USBControlParams](#usbcontrolparams) | Yes| Control transfer parameters.| - | timeout | number | No| Timeout duration. The default value is **0**, indicating no timeout.| + | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| USB device pipe, which is used to determine the USB device. | + | contrlparam | [USBControlParams](#usbcontrolparams) | Yes| Control transfer parameters. | + | timeout | number | No| Timeout duration. The default value is **0**, indicating no timeout. | - **Return value** | Type| Description| | -------- | -------- | - | Promise<number> | Returns the size of the transmitted or received data block if the control transfer is successful; returns **-1** if an exception occurs.| + | Promise<number> | Returns the size of the transmitted or received data block if the control transfer is successful; returns **-1** if an exception occurs. | - **Example** ```js @@ -367,15 +365,15 @@ Before you do this, call [usb.getDevices](#usbgetdevices) to obtain the USB devi - **Parameters** | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | - | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| USB device pipe, which is used to determine the USB device.| - | endpoint | [USBEndpoint](#usbendpoint) | Yes| USB endpoint, which is used to determine the USB port for data transfer.| - | buffer | Uint8Array | Yes| Buffer for writing or reading data.| - | timeout | number | No| Timeout duration. The default value is **0**, indicating no timeout.| + | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| USB device pipe, which is used to determine the USB device. | + | endpoint | [USBEndpoint](#usbendpoint) | Yes| USB endpoint, which is used to determine the USB port for data transfer. | + | buffer | Uint8Array | Yes| Buffer for writing or reading data. | + | timeout | number | No| Timeout duration. The default value is **0**, indicating no timeout. | - **Return value** | Type| Description| | -------- | -------- | - | Promise<number> | Returns the size of the transmitted or received data block if the control transfer is successful; returns **-1** if an exception occurs.| + | Promise<number> | Returns the size of the transmitted or received data block if the control transfer is successful; returns **-1** if an exception occurs. | - **Example** ```js @@ -401,12 +399,12 @@ Before you do this, call [usb.getDevices](#usbgetdevices) to obtain the USB devi - **Parameters** | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | - | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| USB device pipe.| + | pipe | [USBDevicePipe](#usbdevicepipe) | Yes| USB device pipe. | - **Return value** | Type| Description| | -------- | -------- | - | number | Returns **0** if the USB device pipe is closed successfully; returns an error code otherwise.| + | number | Returns **0** if the USB device pipe is closed successfully; returns an error code otherwise. | - **Example** ```js @@ -423,14 +421,14 @@ Represents the USB endpoint from which data is sent or received. You can obtain | Name| Type| Description| | -------- | -------- | -------- | -| address | number | Endpoint address.| -| attributes | number | Endpoint attributes.| -| interval | number | Endpoint interval.| -| maxPacketSize | number | Maximum size of data packets on the endpoint.| -| direction | [USBRequestDirection](#usbrequestdirection) | Endpoint direction.| -| number | number | Endpoint number.| -| type | number | Endpoint type.| -| interfaceId | number | Unique ID of the interface to which the endpoint belongs.| +| address | number | Endpoint address. | +| attributes | number | Endpoint attributes. | +| interval | number | Endpoint interval. | +| maxPacketSize | number | Maximum size of data packets on the endpoint. | +| direction | [USBRequestDirection](#usbrequestdirection) | Endpoint direction. | +| number | number | Endpoint number. | +| type | number | Endpoint type. | +| interfaceId | number | Unique ID of the interface to which the endpoint belongs. | ## USBInterface @@ -441,13 +439,13 @@ Represents a USB interface. One [USBConfig](#usbconfig) can contain multiple **U | Name| Type| Description| | -------- | -------- | -------- | -| id | number | Unique ID of the USB interface.| -| protocol | number | Interface protocol.| -| clazz | number | Device type.| -| subClass | number | Device subclass.| -| alternateSetting | number | Settings for alternating between descriptors of the same USB interface.| -| name | string | Interface name.| -| endpoints | Array<[USBEndpoint](#usbendpoint)> | Endpoints that belong to the USB interface.| +| id | number | Unique ID of the USB interface. | +| protocol | number | Interface protocol. | +| clazz | number | Device type. | +| subClass | number | Device subclass. | +| alternateSetting | number | Settings for alternating between descriptors of the same USB interface. | +| name | string | Interface name. | +| endpoints | Array<[USBEndpoint](#usbendpoint)> | Endpoints that belong to the USB interface. | ## USBConfig @@ -458,13 +456,13 @@ Represents the USB configuration. One [USBDevice](#usbdevice) can contain multip | Name| Type| Description| | -------- | -------- | -------- | -| id | number | Unique ID of the USB configuration.| -| attributes | number | Configuration attributes.| -| maxPower | number | Maximum power consumption, in mA.| -| name | string | Configuration name, which can be left empty.| -| isRemoteWakeup | boolean | Support for remote wakeup.| -| isSelfPowered | boolean | Support for independent power supplies.| -| interfaces | Array <[USBInterface](#usbinterface)> | Supported interface attributes.| +| id | number | Unique ID of the USB configuration. | +| attributes | number | Configuration attributes. | +| maxPower | number | Maximum power consumption, in mA. | +| name | string | Configuration name, which can be left empty. | +| isRemoteWakeup | boolean | Support for remote wakeup. | +| isSelfPowered | boolean | Support for independent power supplies. | +| interfaces | Array <[USBInterface](#usbinterface)> | Supported interface attributes. | ## USBDevice @@ -475,19 +473,19 @@ Represents USB device information. | Name| Type| Description| | -------- | -------- | -------- | -| busNum | number | Bus address.| -| devAddress | number | Device address.| -| serial | string | Device SN.| -| name | string | Device name.| -| manufacturerName | string | Device manufacturer.| -| productName | string | Product information.| -| version | string | Version.| -| vendorId | number | Vendor ID.| -| productId | number | Product ID.| -| clazz | number | Device class.| -| subClass | number | Device subclass.| -| protocol | number | Device protocol code.| -| configs | Array<[USBConfig](#usbconfig)> | Device configuration descriptor information.| +| busNum | number | Bus address. | +| devAddress | number | Device address. | +| serial | string | Device SN. | +| name | string | Device name. | +| manufacturerName | string | Device manufacturer. | +| productName | string | Product information. | +| version | string | Version. | +| vendorId | number | Vendor ID. | +| productId | number | Product ID. | +| clazz | number | Device class. | +| subClass | number | Device subclass. | +| protocol | number | Device protocol code. | +| configs | Array<[USBConfig](#usbconfig)> | Device configuration descriptor information. | ## USBDevicePipe @@ -498,8 +496,8 @@ Represents a USB device pipe, which is used to determine a USB device. | Name| Type| Description| | -------- | -------- | -------- | -| busNum | number | Bus address.| -| devAddress | number | Device address.| +| busNum | number | Bus address. | +| devAddress | number | Device address. | ## USBControlParams @@ -510,12 +508,12 @@ Represents control transfer parameters. | Name| Type| Description| | -------- | -------- | -------- | -| request | number | Request type.| -| target | [USBRequestTargetType](#usbrequesttargettype) | Represents the request target type.| -| reqType | [USBControlRequestType](#usbcontrolrequesttype) | Request control type.| +| request | number | Request type. | +| target | [USBRequestTargetType](#usbrequesttargettype) | Type of the request target. | +| reqType | [USBControlRequestType](#usbcontrolrequesttype) | Request control type. | | value | number | Request parameters| -| index | number | Index of the request parameter value.| -| data | Uint8Array | Buffer for writing or reading data.| +| index | number | Index of the request parameter value. | +| data | Uint8Array | Buffer for writing or reading data. | ## USBRequestTargetType @@ -526,8 +524,8 @@ Represents the request target type. | Name| Default Value | Description| | -------- | -------- | -------- | -| USB_REQUEST_TARGET_DEVICE | 0 | Device.| -| USB_REQUEST_TARGET_INTERFACE | 1 | Interface.| +| USB_REQUEST_TARGET_DEVICE | 0 | Device. | +| USB_REQUEST_TARGET_INTERFACE | 1 | Interface. | | USB_REQUEST_TARGET_ENDPOINT | 2 | Endpoint| | USB_REQUEST_TARGET_OTHER | 3 | Others| @@ -541,7 +539,7 @@ Enumerates control request types. | Name| Default Value | Description| | -------- | -------- | -------- | | USB_REQUEST_TYPE_STANDARD | 0 | Standard| -| USB_REQUEST_TYPE_CLASS | 1 | Class.| +| USB_REQUEST_TYPE_CLASS | 1 | Class. | | USB_REQUEST_TYPE_VENDOR | 2 | Vendor| @@ -553,5 +551,5 @@ Enumerates request directions. | Name| Default Value | Description| | -------- | -------- | -------- | -| USB_REQUEST_DIR_TO_DEVICE | 0 | Request for writing data from the host to the device.| -| USB_REQUEST_DIR_FROM_DEVICE | 0x80 | Request for reading data from the device to the host.| +| USB_REQUEST_DIR_TO_DEVICE | 0 | Request for writing data from the host to the device. | +| USB_REQUEST_DIR_FROM_DEVICE | 0x80 | Request for reading data from the device to the host. |