diff --git a/en/application-dev/dfx/Readme-EN.md b/en/application-dev/dfx/Readme-EN.md
index b5990650c61eae7ed57a0b1dbc35489947de8bc8..5a1b6326bae1ecb94ef7fe8d9e4cfe2cdf2c6c56 100644
--- a/en/application-dev/dfx/Readme-EN.md
+++ b/en/application-dev/dfx/Readme-EN.md
@@ -4,6 +4,9 @@
- [Development of Performance Tracing](hitracemeter-guidelines.md)
- [Development of Distributed Call Chain Tracing](hitracechain-guidelines.md)
- [HiLog Development (Native)](hilog-guidelines.md)
+- Performance Tracing
+ - [Development of Performance Tracing (ArkTS)](hitracemeter-guidelines.md)
+ - [Development of Performance Tracing (Native)](hitracemeter-native-guidelines.md)
- Error Management
- [Development of Error Manager](errormanager-guidelines.md)
- [Development of Application Recovery](apprecovery-guidelines.md)
diff --git a/en/application-dev/dfx/hitracemeter-guidelines.md b/en/application-dev/dfx/hitracemeter-guidelines.md
index 3244aa9356bbcd3748594061a3752fad8aa3d3f3..a4152acb7303cd672b830d80a3ba48bc54ee8d9c 100644
--- a/en/application-dev/dfx/hitracemeter-guidelines.md
+++ b/en/application-dev/dfx/hitracemeter-guidelines.md
@@ -1,4 +1,4 @@
-# Development of Performance Tracing
+# Development of Performance Tracing (ArkTS)
## Introduction
@@ -17,19 +17,19 @@ hiTraceMeter provides APIs for system performance tracing. You can call the APIs
## Constraints
-Due to the asynchronous I/O feature of JS, the hiTraceMeter module provides only asynchronous APIs.
+- Due to the asynchronous I/O feature of JS, the hiTraceMeter module provides only asynchronous APIs.
## Available APIs
-The performance tracing APIs are provided by the **hiTraceMeter** module. For details, see [API Reference](../reference/apis/js-apis-hitracemeter.md).
+The performance tracing APIs are provided by the **hiTraceMeter** module. For details, see [API Reference]( ../reference/apis/js-apis-hitracemeter.md).
**APIs for performance tracing**
-| API | Return Value | Description |
-| ---------------------------------------------------------------------------- | --------- | ------------ |
-| hiTraceMeter.startTrace(name: string, taskId: number) | void | Marks the start of a trace task. If multiple trace tasks with the same name need to be performed at the same time or a trace task needs to be performed multiple times concurrently, different task IDs must be specified in **startTrace**. If the trace tasks with the same name are not performed at the same time, the same task ID can be used.|
-| hiTraceMeter.finishTrace(name: string, taskId: number) | void | Marks the end of a trace task. The values of **name** and **taskId** must be the same as those of **hiTraceMeter.startTrace**.|
-| hiTraceMeter.traceByValue(name: string, value: number) | void | Marks the value changes of a numeric variable in a trace task.|
+| API | Return Value | Description |
+| ------------------------------------------------------ | ---- | -------------------------------------------------------------------------------------------------------------------- |
+| hiTraceMeter.startTrace(name: string, taskId: number) | void | Marks the start of a trace task. If multiple trace tasks with the same name need to be performed at the same time or a trace task needs to be performed multiple times concurrently, different task IDs must be specified in **startTrace**. If the trace tasks with the same name are not performed at the same time, the same task ID can be used.|
+| hiTraceMeter.finishTrace(name: string, taskId: number) | void | Marks the end of a trace task. The values of **name** and **taskId** must be the same as those of **hiTraceMeter.startTrace**. |
+| hiTraceMeter.traceByValue(name: string, value: number) | void | Marks the value changes of a numeric variable in a trace task. |
## How to Develop
diff --git a/en/application-dev/dfx/hitracemeter-native-guidelines.md b/en/application-dev/dfx/hitracemeter-native-guidelines.md
new file mode 100644
index 0000000000000000000000000000000000000000..bb0274f7c4077b016061430250e7a949cf826864
--- /dev/null
+++ b/en/application-dev/dfx/hitracemeter-native-guidelines.md
@@ -0,0 +1,52 @@
+# Development of Performance Tracing (Native)
+
+## Introduction
+
+hiTraceMeter provides APIs for system performance tracing. You can call the APIs provided by the hiTraceMeter module in your own service logic to effectively track service processes and check the system performance.
+> **NOTE**
+
+> - This development guide is applicable only when you use Native APIs for application development. For details about APIs, see [API Reference](../reference/native-apis/_hitrace.md).
+> - For details about how to use ArkTS APIs for application development, see [Development Guidelines](hitracemeter-guidelines.md) and [API Reference](../reference/apis/js-apis-hitracemeter.md).
+
+## Available APIs
+
+| API| Description|
+| -------- | -------- |
+| void OH_HiTrace_StartTrace(const char* name) | Starts a synchronous time slice trace.|
+| void OH_HiTrace_FinishTrace() | Ends a synchronous time slice trace.|
+| void OH_HiTrace_StartAsyncTrace(const char* name, int32_t taskId) | Starts an asynchronous time slice trace.|
+| void OH_HiTrace_FinishAsyncTrace(const char* name, int32_t taskId) | Ends an asynchronous time slice trace.|
+| void OH_HiTrace_CountTrace(const char* name, int64_t count) | Performs an integer trace.|
+
+**Parameter Description**
+
+| Name| Type| Mandatory| Description |
+| ------ | ------ | ---- | ------------------------------------------------------------ |
+| name | string | No | Name of the variable.|
+| taskId | number | No | ID used to indicate the association of APIs in a trace. If multiple traces with the same name need to be performed at the same time or a trace needs to be performed multiple times concurrently, different task IDs must be specified in **startTrace**.|
+| count | number | No | Value of the variable. |
+
+## Development Example
+
+1. Add the link of **libhitrace_ndk.z.so** to **CMakeLists.txt**.
+ ```
+ target_link_libraries(entry PUBLIC libhitrace_ndk.z.so)
+ ```
+2. Reference the **hitrace** header file in the source file.
+ ```c++
+ #include "hitrace/trace.h"
+ ```
+3. Open the hdc shell and run the **hitrace --trace_begin app** command to enable the trace function.
+ ```shell
+ capturing trace...
+ ```
+4. Perform a performance trace. The following uses asynchronous trace as an example.
+ ```c++
+ OH_HiTrace_StartAsyncTrace("hitraceTest", 123);
+ OH_HiTrace_FinishAsyncTrace("hitraceTest", 123);
+ ```
+5. Run the **hitrace --trace_dump | grep hitraceTest** command to view the trace result.
+ ```shell
+ <...>-2477 (-------) [001] .... 396.427165: tracing_mark_write: S|2477|H:hitraceTest 123
+ <...>-2477 (-------) [001] .... 396.427196: tracing_mark_write: F|2477|H:hitraceTest 123
+ ```
diff --git a/en/application-dev/reference/apis/js-apis-inputdevice.md b/en/application-dev/reference/apis/js-apis-inputdevice.md
index d07a232664c8e095c9dd7dbf33f41b571c33f3e4..b69a4f06be062bf9a06e61ee79c0c5d496749148 100644
--- a/en/application-dev/reference/apis/js-apis-inputdevice.md
+++ b/en/application-dev/reference/apis/js-apis-inputdevice.md
@@ -468,11 +468,13 @@ Sets the keyboard repeat delay. This API uses an asynchronous callback to return
**System capability**: SystemCapability.MultimodalInput.Input.InputDevice
+**System API**: This is a system API.
+
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------ | ---- | ------------------------------------------------------------ |
-| delay | number | Yes | Keyboard repeat delay, in ms. The value range is [300 ms, 1000 ms] and the default value is **500**.|
+| delay | number | Yes | Keyboard repeat delay, in ms. The value range is [300, 1000] and the default value is **500**.|
| callback | AsyncCallback<void> | Yes | Callback used to return the result.|
**Example**
@@ -499,6 +501,8 @@ Sets the keyboard repeat delay. This API uses a promise to return the result.
**System capability**: SystemCapability.MultimodalInput.Input.InputDevice
+**System API**: This is a system API.
+
**Parameters**
| Name | Type | Mandatory | Description |
@@ -523,6 +527,66 @@ try {
}
```
+## inputDevice.getKeyboardRepeatDelay10+
+
+getKeyboardRepeatDelay(callback: AsyncCallback<number>): void
+
+Obtains the keyboard repeat delay. This API uses an asynchronous callback to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.InputDevice
+
+**System API**: This is a system API.
+
+**Parameters**
+
+| Name | Type | Mandatory| Description |
+| -------- | ------ | ---- | ------------------------------------------------------------ |
+| callback | AsyncCallback<number> | Yes | Callback used to return the result.|
+
+**Example**
+
+```js
+try {
+ inputDevice.getKeyboardRepeatDelay((error, delay) => {
+ if (error) {
+ console.log(`Get keyboard repeat delay failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+ return;
+ }
+ console.log(`Get keyboard repeat delay success`);
+ });
+} catch (error) {
+ console.log(`Get keyboard repeat delay failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
+## inputDevice.getKeyboardRepeatDelay10+
+
+getKeyboardRepeatDelay(): Promise<number>
+
+Obtains the keyboard repeat delay. This API uses a promise to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.InputDevice
+
+**System API**: This is a system API.
+
+**Return value**
+
+| Parameters | Description |
+| --------------------- | ------------------- |
+| Promise<number> | Promise used to return the result.|
+
+**Example**
+
+```js
+try {
+ inputDevice.getKeyboardRepeatDelay().then(delay => {
+ console.log(`Get keyboard repeat delay success`);
+ });
+} catch (error) {
+ console.log(`Get keyboard repeat delay failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
## inputDevice.setKeyboardRepeatRate10+
setKeyboardRepeatRate(rate: number, callback: AsyncCallback<void>): void
@@ -531,6 +595,8 @@ Sets the keyboard repeat rate. This API uses an asynchronous callback to return
**System capability**: SystemCapability.MultimodalInput.Input.InputDevice
+**System API**: This is a system API.
+
**Parameters**
| Name | Type | Mandatory| Description |
@@ -562,6 +628,8 @@ Sets the keyboard repeat rate. This API uses a promise to return the result.
**System capability**: SystemCapability.MultimodalInput.Input.InputDevice
+**System API**: This is a system API.
+
**Parameters**
| Name | Type | Mandatory | Description |
@@ -586,6 +654,66 @@ try {
}
```
+## inputDevice.getKeyboardRepeatRate10+
+
+getKeyboardRepeatRate(callback: AsyncCallback<number>): void
+
+Obtains the keyboard repeat rate. This API uses an asynchronous callback to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.InputDevice
+
+**System API**: This is a system API.
+
+**Parameters**
+
+| Name | Type | Mandatory | Description |
+| -------- | --------------------------- | ---- | -------------- |
+| callback | AsyncCallback<number> | Yes | Callback used to return the result.|
+
+**Example**
+
+```js
+try {
+ inputDevice.getKeyboardRepeatRate((error, rate) => {
+ if (error) {
+ console.log(`Get keyboard repeat rate failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+ return;
+ }
+ console.log(`Get keyboard repeat rate success`);
+ });
+} catch (error) {
+ console.log(`Get keyboard repeat rate failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
+## inputDevice.getKeyboardRepeatRate10+
+
+getKeyboardRepeatRate(): Promise<number>
+
+Obtains the keyboard repeat rate. This API uses a promise to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.InputDevice
+
+**System API**: This is a system API.
+
+**Return value**
+
+| Parameters | Description |
+| --------------------- | ------------------- |
+| Promise<number> | Promise used to return the result.|
+
+**Example**
+
+```js
+try {
+ inputDevice.getKeyboardRepeatRate().then(rate => {
+ console.log(`Get keyboard repeat rate success`);
+ });
+} catch (error) {
+ console.log(`Get keyboard repeat rate failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
## DeviceListener9+
Defines the listener for hot swap events of an input device.
diff --git a/en/application-dev/reference/apis/js-apis-mindSporeLite.md b/en/application-dev/reference/apis/js-apis-mindSporeLite.md
index dfa2aa0e22c175001ed2598102da9313f7a588b1..6a80afa3976c1ee8c4fdce9e3ffa0e1288fdd62c 100644
--- a/en/application-dev/reference/apis/js-apis-mindSporeLite.md
+++ b/en/application-dev/reference/apis/js-apis-mindSporeLite.md
@@ -1,8 +1,7 @@
# @ohos.ai.mindSporeLite (Inference)
-The **mindSporeLite** module provides APIs for the MindSpore Lite inference engine to implment model inference.
-
MindSpore Lite is an AI engine that implements AI model inference for different hardware devices. It has been used in a wide range of fields, such as image classification, target recognition, facial recognition, and character recognition.
+The **mindSporeLite** module provides APIs for the MindSpore Lite inference engine to implment model inference.
> **NOTE**
>
diff --git a/en/application-dev/reference/apis/js-apis-observer.md b/en/application-dev/reference/apis/js-apis-observer.md
index 81a8b7bc6859f69bb6543e18600fd46296bb818c..1c511921ee8e093eb8cd4a7c4b42d0694fdafe10 100644
--- a/en/application-dev/reference/apis/js-apis-observer.md
+++ b/en/application-dev/reference/apis/js-apis-observer.md
@@ -849,6 +849,83 @@ observer.off('simStateChange', callback);
observer.off('simStateChange');
```
+## observer.on('iccAccountInfoChange')10+
+
+on\(type: 'iccAccountInfoChange', callback: Callback\\): void;
+
+Registers an observer for account information change events of the SIM card. This API uses an asynchronous callback to return the result.
+
+**System capability**: SystemCapability.Telephony.StateRegistry
+
+**Parameters**
+
+| Name | Type | Mandatory| Description |
+| -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
+| type | string | Yes | Account information change event. This field has a fixed value of **iccAccountInfoChange**. |
+| callback | Callback\ | Yes | Callback used to return the result.|
+
+**Error codes**
+
+For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
+
+| ID| Error Message |
+| -------- | -------------------------------------------- |
+| 8300001 | Invalid parameter value. |
+| 8300002 | Operation failed. Cannot connect to service. |
+| 8300003 | System internal error. |
+| 8300999 | Unknown error code. |
+
+**Example**
+
+```js
+observer.on('iccAccountInfoChange', error => {
+ console.log("on iccAccountInfoChange, error:" + JSON.stringify(error));
+});
+```
+
+
+## observer.off('iccAccountInfoChange')10+
+
+off\(type: 'iccAccountInfoChange', callback?: Callback\\): void;
+
+Unregisters the observer for account information change events of the SIM card. This API uses an asynchronous callback to return the result.
+
+>**NOTE**
+>
+>You can pass the callback of the **on** function if you want to cancel listening for a certain type of event. If you do not pass the callback, you will cancel listening for all events.
+
+**System capability**: SystemCapability.Telephony.StateRegistry
+
+**Parameters**
+
+| Name | Type | Mandatory| Description |
+| -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
+| type | string | Yes | Account information change event. This field has a fixed value of **iccAccountInfoChange**. |
+| callback | Callback\ | No | Callback used to return the result.|
+
+**Error codes**
+
+For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
+
+| ID| Error Message |
+| -------- | -------------------------------------------- |
+| 8300001 | Invalid parameter value. |
+| 8300002 | Operation failed. Cannot connect to service. |
+| 8300003 | System internal error. |
+| 8300999 | Unknown error code. |
+
+**Example**
+
+```js
+let callback = data => {
+ console.log("on iccAccountInfoChange, data:" + JSON.stringify(data));
+}
+observer.on('iccAccountInfoChange', callback);
+// You can pass the callback of the on method to cancel listening for a certain type of callback. If you do not pass the callback, you will cancel listening for all callbacks.
+observer.off('iccAccountInfoChange', callback);
+observer.off('iccAccountInfoChange');
+```
+
## LockReason8+
diff --git a/en/application-dev/reference/apis/js-apis-pointer.md b/en/application-dev/reference/apis/js-apis-pointer.md
index 61bac1ec1ef7b02115705e7e5e34b600faedca60..9f949c10e762e34ae641d648d676f0d754c9b52c 100644
--- a/en/application-dev/reference/apis/js-apis-pointer.md
+++ b/en/application-dev/reference/apis/js-apis-pointer.md
@@ -850,3 +850,879 @@ Enumerates mouse pointer styles.
| MIDDLE_BTN_SOUTH_EAST | 36 | Scrolling south-east ||
| MIDDLE_BTN_SOUTH_WEST | 37 | Scrolling south-west ||
| MIDDLE_BTN_NORTH_SOUTH_WEST_EAST | 38 | Moving as a cone in four directions||
+| HORIZONTAL_TEXT_CURSOR10+ | 39 | Horizontal text selection||
+| CURSOR_CROSS10+ | 40 | Cross cursor||
+| CURSOR_CIRCLE10+ | 41 | Circular cursor||
+
+## pointer.setTouchpadScrollSwitch10+
+
+setTouchpadScrollSwitch(state: boolean, callback: AsyncCallback\): void
+
+Sets the scroll switch of the touchpad. This API uses an asynchronous callback to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.Pointer
+
+**System API**: This is a system API.
+
+**Parameters**
+
+| Name | Type | Mandatory | Description |
+| -------- | ------------------------- | ---- | ------------------------------------- |
+| state | boolean | Yes | Scroll switch status. The value **true** indicates that the scroll switch is enabled, and the value **false** indicates the opposite. The default value is **true**. |
+| callback | AsyncCallback\ | Yes | Callback used to return the result.|
+
+**Example**
+
+```js
+try {
+ pointer.setTouchpadScrollSwitch(true, (error) => {
+ if (error) {
+ console.log(`setTouchpadScrollSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+ return;
+ }
+ console.log(`setTouchpadScrollSwitch success`);
+ });
+} catch (error) {
+ console.log(`setTouchpadScrollSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
+## pointer.setTouchpadScrollSwitch10+
+
+setTouchpadScrollSwitch(state: boolean): Promise\
+
+Sets the scroll switch of the touchpad. This API uses a promise to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.Pointer
+
+**System API**: This is a system API.
+
+**Parameters**
+
+| Name | Type | Mandatory | Description |
+| ----- | ------ | ---- | ----------------------------------- |
+| state | boolean| Yes | Scroll switch status. The value **true** indicates that the scroll switch is enabled, and the value **false** indicates the opposite. The default value is **true**.|
+
+**Return value**
+
+| Name | Description |
+| ------------------- | ---------------- |
+| Promise\ | Promise used to return the result.|
+
+**Example**
+
+```js
+try {
+ pointer.setTouchpadScrollSwitch(false).then(() => {
+ console.log(`setTouchpadScrollSwitch success`);
+ });
+} catch (error) {
+ console.log(`setTouchpadScrollSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
+## pointer.getTouchpadScrollSwitch10+
+
+getTouchpadScrollSwitch(callback: AsyncCallback\): void
+
+Obtains the scroll switch status of the touchpad. This API uses an asynchronous callback to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.Pointer
+
+**System API**: This is a system API.
+
+**Parameters**
+
+| Name | Type | Mandatory | Description |
+| -------- | --------------------------- | ---- | -------------- |
+| callback | AsyncCallback\ | Yes | Callback used to return the result.|
+
+**Example**
+
+```js
+try {
+ pointer.getTouchpadScrollSwitch ((error, state) => {
+ console.log(`getTouchpadScrollSwitch success, state: ${JSON.stringify(state)}`);
+ });
+} catch (error) {
+ console.log(`getTouchpadScrollSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
+## pointer.getTouchpadScrollSwitch10+
+
+getTouchpadScrollSwitch(): Promise\
+
+Obtains the scroll switch status of the touchpad. This API uses a promise to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.Pointer
+
+**System API**: This is a system API.
+
+**Return value**
+
+| Name | Description |
+| --------------------- | ------------------- |
+| Promise\ | Promise used to return the result.|
+
+**Example**
+
+```js
+try {
+ pointer.getTouchpadScrollSwitch().then((state) => {
+ console.log(`getTouchpadScrollSwitch success, state: ${JSON.stringify(state)}`);
+ });
+} catch (error) {
+ console.log(`getTouchpadScrollSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
+## pointer.setTouchpadScrollDirection10+
+
+setTouchpadScrollDirection(state: boolean, callback: AsyncCallback\): void
+
+Sets the scroll direction of the touchpad. This API uses an asynchronous callback to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.Pointer
+
+**System API**: This is a system API.
+
+**Parameters**
+
+| Name | Type | Mandatory | Description |
+| -------- | ------------------------- | ---- | ------------------------------------- |
+| state | boolean | Yes | Scroll direction of the touchpad. The value **true** indicates that the scroll direction is the same as the finger moving direction, and the value **false** indicates the opposite. The default value is **true**. |
+| callback | AsyncCallback\ | Yes | Callback used to return the result.|
+
+**Example**
+
+```js
+try {
+ pointer.setTouchpadScrollDirection(true, (error) => {
+ if (error) {
+ console.log(`setTouchpadScrollDirection failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+ return;
+ }
+ console.log(`setTouchpadScrollDirection success`);
+ });
+} catch (error) {
+ console.log(`setTouchpadScrollDirection failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
+## pointer.setTouchpadScrollDirection10+
+
+setTouchpadScrollDirection(state: boolean): Promise\
+
+Sets the scroll direction of the touchpad. This API uses a promise to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.Pointer
+
+**System API**: This is a system API.
+
+**Parameters**
+
+| Name | Type | Mandatory | Description |
+| ----- | ------ | ---- | ----------------------------------- |
+| state | boolean| Yes | Scroll direction of the touchpad. The value **true** indicates that the scroll direction is the same as the finger moving direction, and the value **false** indicates the opposite. The default value is **true**. |
+
+**Return value**
+
+| Name | Description |
+| ------------------- | ---------------- |
+| Promise\ | Promise used to return the result.|
+
+**Example**
+
+```js
+try {
+ pointer.setTouchpadScrollDirection (false).then(() => {
+ console.log(`setTouchpadScrollDirection success`);
+ });
+} catch (error) {
+ console.log(`setTouchpadScrollDirection failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
+## pointer.getTouchpadScrollDirection10+
+
+getTouchpadScrollDirection(callback: AsyncCallback\): void
+
+Obtains the scroll direction of the touchpad. This API uses an asynchronous callback to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.Pointer
+
+**System API**: This is a system API.
+
+**Parameters**
+
+| Name | Type | Mandatory | Description |
+| -------- | --------------------------- | ---- | -------------- |
+| callback | AsyncCallback\ | Yes | Callback used to return the result.|
+
+**Example**
+
+```js
+try {
+ pointer.getTouchpadScrollSwitch ((error, state) => {
+ console.log(`getTouchpadScrollDirection success, state: ${JSON.stringify(state)}`);
+ });
+} catch (error) {
+ console.log(`getTouchpadScrollDirection failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
+## pointer.getTouchpadScrollDirection10+
+
+getTouchpadScrollDirection(): Promise\
+
+Obtains the scroll direction of the touchpad. This API uses a promise to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.Pointer
+
+**System API**: This is a system API.
+
+**Return value**
+
+| Name | Description |
+| --------------------- | ------------------- |
+| Promise\ | Promise used to return the result.|
+
+**Example**
+
+```js
+try {
+ pointer.getTouchpadScrollDirection().then((state) => {
+ console.log(`getTouchpadScrollDirection success, state: ${JSON.stringify(state)}`);
+ });
+} catch (error) {
+ console.log(`getTouchpadScrollDirection failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
+## pointer.setTouchpadTapSwitch10+
+
+setTouchpadTapSwitch(state: boolean, callback: AsyncCallback\): void
+
+Sets the tap switch of the touchpad. This API uses an asynchronous callback to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.Pointer
+
+**System API**: This is a system API.
+
+**Parameters**
+
+| Name | Type | Mandatory | Description |
+| -------- | ------------------------- | ---- | ------------------------------------- |
+| state | boolean | Yes |Tap switch status of the touchpad The value **true** indicates that the tap switch is enabled, and the value **false** indicates the opposite. The default value is **true**. |
+| callback | AsyncCallback\ | Yes | Callback used to return the result.|
+
+**Example**
+
+```js
+try {
+ pointer.setTouchpadTapSwitch(true, (error) => {
+ if (error) {
+ console.log(`setTouchpadTapSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+ return;
+ }
+ console.log(`setTouchpadTapSwitch success`);
+ });
+} catch (error) {
+ console.log(`setTouchpadTapSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
+## pointer.setTouchpadTapSwitch 10+
+
+setTouchpadTapSwitch(state: boolean): Promise\
+
+Sets the tap switch of the touchpad. This API uses a promise to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.Pointer
+
+**System API**: This is a system API.
+
+**Parameters**
+
+| Name | Type | Mandatory | Description |
+| ----- | ------ | ---- | ----------------------------------- |
+| state | boolean| Yes | Tap switch status of the touchpad The value **true** indicates that the tap switch is enabled, and the value **false** indicates the opposite. The default value is **true**. |
+
+**Return value**
+
+| Name | Description |
+| ------------------- | ---------------- |
+| Promise\ | Promise used to return the result.|
+
+**Example**
+
+```js
+try {
+ pointer.setTouchpadTapSwitch(false).then(() => {
+ console.log(`setTouchpadTapSwitch success`);
+ });
+} catch (error) {
+ console.log(`setTouchpadTapSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
+## pointer.getTouchpadTapSwitch10+
+
+getTouchpadTapSwitch(callback: AsyncCallback\): void
+
+Obtains the tap switch status of the touchpad. This API uses an asynchronous callback to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.Pointer
+
+**System API**: This is a system API.
+
+**Parameters**
+
+| Name | Type | Mandatory | Description |
+| -------- | --------------------------- | ---- | -------------- |
+| callback | AsyncCallback\ | Yes | Callback used to return the result.|
+
+**Example**
+
+```js
+try {
+ pointer.getTouchpadTapSwitch((error, state) => {
+ console.log(`getTouchpadTapSwitch success, state: ${JSON.stringify(state)}`);
+ });
+} catch (error) {
+ console.log(`getTouchpadTapSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
+## pointer.getTouchpadTapSwitch10+
+
+getTouchpadTapSwitch(): Promise\
+
+Obtains the tap switch status of the touchpad. This API uses a promise to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.Pointer
+
+**System API**: This is a system API.
+
+**Return value**
+
+| Name | Description |
+| --------------------- | ------------------- |
+| Promise\ | Promise used to return the result.|
+
+**Example**
+
+```js
+try {
+ pointer.getTouchpadTapSwitch().then((state) => {
+ console.log(`getTouchpadTapSwitch success, state: ${JSON.stringify(state)}`);
+ });
+} catch (error) {
+ console.log(`getTouchpadTapSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
+## pointer.setTouchpadPointerSpeed10+
+
+setTouchpadPointerSpeed(speed: number, callback: AsyncCallback\): void
+
+Sets the cursor moving speed of the touchpad. This API uses an asynchronous callback to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.Pointer
+
+**System API**: This is a system API.
+
+**Parameters**
+
+| Name | Type | Mandatory | Description |
+| -------- | ------------------------- | ---- | ------------------------------------- |
+| speed | number | Yes |Cursor moving speed of the touchpad. The value range is [1,11]. The default value is **5**. |
+| callback | AsyncCallback\ | Yes | Callback used to return the result.|
+
+**Example**
+
+```js
+try {
+ pointer.setTouchpadPointerSpeed(1, (error) => {
+ if (error) {
+ console.log(`setTouchpadPointerSpeedfailed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+ return;
+ }
+ console.log(`setTouchpadPointerSpeed success`);
+ });
+} catch (error) {
+ console.log(`setTouchpadPointerSpeed failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
+## pointer.setTouchpadPointerSpeed10+
+
+setTouchpadPointerSpeed(speed: number): Promise\
+
+Sets the cursor moving speed of the touchpad. This API uses a promise to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.Pointer
+
+**System API**: This is a system API.
+
+**Parameters**
+
+| Name | Type | Mandatory | Description |
+| ----- | ------ | ---- | ----------------------------------- |
+| speed| number | Yes | Cursor moving speed of the touchpad. The value range is [1,11]. The default value is **5**. |
+
+**Return value**
+
+| Name | Description |
+| ------------------- | ---------------- |
+| Promise\ | Promise used to return the result.|
+
+**Example**
+
+```js
+try {
+ pointer.setTouchpadPointerSpeed(10).then(() => {
+ console.log(`setTouchpadPointerSpeed success`);
+ });
+} catch (error) {
+ console.log(`setTouchpadPointerSpeed failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
+## pointer.getTouchpadPointerSpeed10+
+
+getTouchpadPointerSpeed(callback: AsyncCallback\): void
+
+Obtains the cursor moving speed of the touchpad. This API uses an asynchronous callback to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.Pointer
+
+**System API**: This is a system API.
+
+**Parameters**
+
+| Name | Type | Mandatory | Description |
+| -------- | --------------------------- | ---- | -------------- |
+| callback | AsyncCallback\ | Yes | Callback used to return the result.|
+
+**Example**
+
+```js
+try {
+ pointer.getTouchpadPointerSpeed((error, speed) => {
+ console.log(`getTouchpadPointerSpeed success, speed: ${JSON.stringify(speed)}`);
+ });
+} catch (error) {
+ console.log(`getTouchpadPointerSpeed failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
+## pointer.getTouchpadPointerSpeed10+
+
+getTouchpadPointerSpeed(): Promise\
+
+Obtains the cursor moving speed of the touchpad. This API uses a promise to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.Pointer
+
+**System API**: This is a system API.
+
+**Return value**
+
+| Name | Description |
+| --------------------- | ------------------- |
+| Promise\ | Promise used to return the result.|
+
+**Example**
+
+```js
+try {
+ pointer.getTouchpadPointerSpeed().then((speed) => {
+ console.log(`getTouchpadPointerSpeed success, speed: ${JSON.stringify(speed)}`);
+ });
+} catch (error) {
+ console.log(`getTouchpadPointerSpeed failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
+## pointer.setTouchpadPinchSwitch10+
+
+setTouchpadPinchSwitch(state: boolean, callback: AsyncCallback\): void
+
+Sets the pinch switch of the touchpad. This API uses an asynchronous callback to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.Pointer
+
+**System API**: This is a system API.
+
+**Parameters**
+
+| Name | Type | Mandatory | Description |
+| -------- | ------------------------- | ---- | ------------------------------------- |
+| state | boolean | Yes |Pinch switch status of the touchpad. The value **true** indicates that the pinch switch is enabled, and the value **false** indicates the opposite. The default value is **true**. |
+| callback | AsyncCallback\ | Yes | Callback used to return the result.|
+
+**Example**
+
+```js
+try {
+ pointer.setTouchpadTapSwitch(true, (error) => {
+ if (error) {
+ console.log(`setTouchpadPinchSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+ return;
+ }
+ console.log(`setTouchpadPinchSwitch success`);
+ });
+} catch (error) {
+ console.log(`setTouchpadPinchSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
+## pointer.setTouchpadPinchSwitch10+
+
+setTouchpadPinchSwitch(state: boolean): Promise\
+
+Sets the pinch switch of the touchpad. This API uses a promise to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.Pointer
+
+**System API**: This is a system API.
+
+**Parameters**
+
+| Name | Type | Mandatory | Description |
+| ----- | ------ | ---- | ----------------------------------- |
+| state | boolean| Yes | Pinch switch status of the touchpad. The value **true** indicates that the pinch switch is enabled, and the value **false** indicates the opposite. The default value is **true**. |
+
+**Return value**
+
+| Name | Description |
+| ------------------- | ---------------- |
+| Promise\ | Promise used to return the result.|
+
+**Example**
+
+```js
+try {
+ pointer.setTouchpadPinchSwitch(false).then(() => {
+ console.log(`setTouchpadPinchSwitch success`);
+ });
+} catch (error) {
+ console.log(`setTouchpadPinchSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
+## pointer.getTouchpadPinchSwitch10+
+
+getTouchpadPinchSwitch(callback: AsyncCallback\): void
+
+Obtains the pinch switch status of the touchpad. This API uses an asynchronous callback to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.Pointer
+
+**System API**: This is a system API.
+
+**Parameters**
+
+| Name | Type | Mandatory | Description |
+| -------- | --------------------------- | ---- | -------------- |
+| callback | AsyncCallback\ | Yes | Callback used to return the result.|
+
+**Example**
+
+```js
+try {
+ pointer.getTouchpadPinchSwitch((error, state) => {
+ console.log(`getTouchpadPinchSwitch success, state: ${JSON.stringify(state)}`);
+ });
+} catch (error) {
+ console.log(`getTouchpadPinchSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
+## pointer.getTouchpadPinchSwitch10+
+
+getTouchpadPinchSwitch(): Promise\
+
+Obtains the pinch switch status of the touchpad. This API uses a promise to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.Pointer
+
+**System API**: This is a system API.
+
+**Return value**
+
+| Name | Description |
+| --------------------- | ------------------- |
+| Promise\ | Promise used to return the result.|
+
+**Example**
+
+```js
+try {
+ pointer.getTouchpadPinchSwitch().then((state) => {
+ console.log(`getTouchpadPinchSwitch success, state: ${JSON.stringify(state)}`);
+ });
+} catch (error) {
+ console.log(`getTouchpadPinchSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
+## pointer.setTouchpadSwipeSwitch10+
+
+setTouchpadSwipeSwitch(state: boolean, callback: AsyncCallback\): void
+
+Sets the multi-finger swipe switch of the touchpad. This API uses an asynchronous callback to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.Pointer
+
+**System API**: This is a system API.
+
+**Parameters**
+
+| Name | Type | Mandatory | Description |
+| -------- | ------------------------- | ---- | ------------------------------------- |
+| state | boolean | Yes |Swipe switch status of the touchpad. The value **true** indicates that the swipe switch is enabled, and the value **false** indicates the opposite. The default value is **true**. |
+| callback | AsyncCallback\ | Yes | Callback used to return the result.|
+
+**Example**
+
+```js
+try {
+ pointer.setTouchpadSwipeSwitch(true, (error) => {
+ if (error) {
+ console.log(`setTouchpadSwipeSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+ return;
+ }
+ console.log(`setTouchpadSwipeSwitch success`);
+ });
+} catch (error) {
+ console.log(`setTouchpadSwipeSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
+## pointer.setTouchpadSwipeSwitch10+
+
+setTouchpadSwipeSwitch(state: boolean): Promise\
+
+Sets the swipe switch of the touchpad. This API uses a promise to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.Pointer
+
+**System API**: This is a system API.
+
+**Parameters**
+
+| Name | Type | Mandatory | Description |
+| ----- | ------ | ---- | ----------------------------------- |
+| state | boolean| Yes | Swipe switch status of the touchpad. The value **true** indicates that the swipe switch is enabled, and the value **false** indicates the opposite. The default value is **true**. |
+
+**Return value**
+
+| Name | Description |
+| ------------------- | ---------------- |
+| Promise\ | Promise used to return the result.|
+
+**Example**
+
+```js
+try {
+ pointer.setTouchpadSwipeSwitch(false).then(() => {
+ console.log(`setTouchpadSwipeSwitch success`);
+ });
+} catch (error) {
+ console.log(`setTouchpadSwipeSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
+## pointer.getTouchpadSwipeSwitch10+
+
+getTouchpadSwipeSwitch(callback: AsyncCallback\): void
+
+Obtains the multi-finger swipe switch status of the touchpad. This API uses an asynchronous callback to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.Pointer
+
+**System API**: This is a system API.
+
+**Parameters**
+
+| Name | Type | Mandatory | Description |
+| -------- | --------------------------- | ---- | -------------- |
+| callback | AsyncCallback\ | Yes | Callback used to return the result.|
+
+**Example**
+
+```js
+try {
+ pointer.getTouchpadSwipeSwitch((error, state) => {
+ console.log(`getTouchpadSwipeSwitch success, state: ${JSON.stringify(state)}`);
+ });
+} catch (error) {
+ console.log(`getTouchpadSwipeSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
+## pointer.getTouchpadSwipeSwitch10+
+
+getTouchpadSwipeSwitch(): Promise\
+
+Obtains the multi-finger swipe switch status of the touchpad. This API uses a promise to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.Pointer
+
+**System API**: This is a system API.
+
+**Return value**
+
+| Name | Description |
+| --------------------- | ------------------- |
+| Promise\ | Promise used to return the result.|
+
+**Example**
+
+```js
+try {
+ pointer.getTouchpadSwipeSwitch().then((state) => {
+ console.log(`getTouchpadSwipeSwitch success, state: ${JSON.stringify(state)}`);
+ });
+} catch (error) {
+ console.log(`getTouchpadSwipeSwitch failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
+## RightClickType10+
+
+Enumerates shortcut menu triggering modes.
+
+**System capability**: SystemCapability.MultimodalInput.Input.Pointer
+
+| Name | Value | Description |
+| -------------------------------- | ---- | ------ |
+| TOUCHPAD_RIGHT_BUTTON | 1 |Tapping the right-button area of the touchpad.|
+| TOUCHPAD_LEFT_BUTTON | 2 |Tapping the left-button area of the touchpad.|
+| TOUCHPAD_TWO_FINGER_TAP | 3 |Tapping or pressing the touchpad with two fingers.|
+
+## pointer.setTouchpadRightClickType10+
+
+setTouchpadRightClickType(type: RightClickType, callback: AsyncCallback\): void
+
+Sets the shortcut menu type of the touchpad. This API uses an asynchronous callback to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.Pointer
+
+**System API**: This is a system API.
+
+**Parameters**
+
+| Name | Type | Mandatory | Description |
+| -------- | ------------------------- | ---- | ------------------------------------- |
+| type| RightClickType| Yes |Shortcut menu type of the touchpad.
- TOUCHPAD_RIGHT_BUTTON: tapping the right-button area of the touchpad.
- TOUCHPAD_LEFT_BUTTON: tapping the left-button area of the touchpad.
- TOUCHPAD_TWO_FINGER_TAP: tapping or pressing the touchpad with two fingers.
The default value is **TOUCHPAD_RIGHT_BUTTON**. |
+| callback | AsyncCallback\ | Yes | Callback used to return the result.|
+
+**Example**
+
+```js
+try {
+ pointer.setTouchpadRightClickType(RightClickType::TOUCHPAD_RIGHT_BUTTON , (error) => {
+ if (error) {
+ console.log(`setTouchpadRightClickType, error: ${JSON.stringify(error, [`code`, `message`])}`);
+ return;
+ }
+ console.log(`setTouchpadRightClickType success`);
+ });
+} catch (error) {
+ console.log(`setTouchpadRightClickType failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
+## pointer.setTouchpadRightClickType10+
+
+setTouchpadRightClickType(type: RightClickType): Promise\
+
+Sets the shortcut menu type of the touchpad. This API uses a promise to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.Pointer
+
+**System API**: This is a system API.
+
+**Parameters**
+
+| Name | Type | Mandatory | Description |
+| ----- | ------ | ---- | ----------------------------------- |
+| type| RightClickType| Yes | Shortcut menu type of the touchpad.
- TOUCHPAD_RIGHT_BUTTON: tapping the right-button area of the touchpad.
- TOUCHPAD_LEFT_BUTTON: tapping the left-button area of the touchpad.
- TOUCHPAD_TWO_FINGER_TAP: tapping or pressing the touchpad with two fingers.
The default value is **TOUCHPAD_RIGHT_BUTTON**.|
+
+**Return value**
+
+| Name | Description |
+| ------------------- | ---------------- |
+| Promise\ | Promise used to return the result.|
+
+**Example**
+
+```js
+try {
+ pointer.setTouchpadRightClickType(RightClickType::TOUCHPAD_RIGHT_BUTTON ).then(() => {
+ console.log(`setTouchpadRightClickType success`);
+ });
+} catch (error) {
+ console.log(`setTouchpadRightClickType failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
+## pointer.getTouchpadRightClickType10+
+
+getTouchpadRightClickType(callback: AsyncCallback\): void
+
+Obtains the shortcut menu type of the touchpad. This API uses an asynchronous callback to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.Pointer
+
+**System API**: This is a system API.
+
+**Parameters**
+
+| Name | Type | Mandatory | Description |
+| -------- | --------------------------- | ---- | -------------- |
+| callback | AsyncCallback\ | Yes | Callback used to return the result.|
+
+**Example**
+
+```js
+try {
+ pointer.getTouchpadRightClickType((error, type) => {
+ console.log(`getTouchpadRightClickType success, type: ${JSON.stringify(type)}`);
+ });
+} catch (error) {
+ console.log(`getTouchpadRightClickType failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
+
+## pointer.getTouchpadRightClickType10+
+
+getTouchpadRightClickType(): Promise\
+
+Obtains the shortcut menu type of the touchpad. This API uses a promise to return the result.
+
+**System capability**: SystemCapability.MultimodalInput.Input.Pointer
+
+**System API**: This is a system API.
+
+**Return value**
+
+| Name | Description |
+| --------------------- | ------------------- |
+| Promise\ | Promise used to return the result.|
+
+**Example**
+
+```js
+try {
+ pointer.getTouchpadRightClickType().then((type) => {
+ console.log(`getTouchpadRightClickType success, typeed: ${JSON.stringify(type)}`);
+ });
+} catch (error) {
+ console.log(`getTouchpadRightClickType failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
+}
+```
diff --git a/en/application-dev/reference/apis/js-apis-power.md b/en/application-dev/reference/apis/js-apis-power.md
index 04967480dfd6469eea02de987f0be83a71f6fc9d..00455b6440d170f5579d0376b3156dab7859ff0f 100644
--- a/en/application-dev/reference/apis/js-apis-power.md
+++ b/en/application-dev/reference/apis/js-apis-power.md
@@ -147,7 +147,7 @@ try {
## power.suspend9+
-suspend(): void
+suspend(isImmediate?: boolean): void
Hibernates a device.
@@ -155,6 +155,13 @@ Hibernates a device.
**System capability:** SystemCapability.PowerManager.PowerManager.Core
+**Parameters**
+
+| Name| Type | Mandatory| Description |
+| ------ | ------ | ---- | ---------- |
+| isImmediate10+ | boolean | No | Whether to hibernate a device immediately. If this parameter is not specified, the default value **false** is used. The system automatically determines when to enter the hibernation state.
**NOTE**: This parameter is supported since API version 10.|
+
+
**Error codes**
For details about the error codes, see [Power Manager Error Codes](../errorcodes/errorcode-power.md).
@@ -289,6 +296,39 @@ power.setPowerMode(power.DevicePowerMode.MODE_PERFORMANCE)
});
```
+## power.isStandby10+
+
+isStandby(): boolean
+
+Checks whether the device is in standby mode.
+
+**System capability:** SystemCapability.PowerManager.PowerManager.Core
+
+**Return value**
+
+| Type | Description |
+| ------------------- | -------------------------------------- |
+| boolean | The value **true** indicates that the device is in standby mode, and the value **false** indicates the opposite.|
+
+**Error codes**
+
+For details about the error codes, see [Power Manager Error Codes](../errorcodes/errorcode-power.md).
+
+| ID | Error Message |
+|---------|---------|
+| 4900101 | If connecting to the service failed. |
+
+**Example**
+
+```js
+try {
+ var isStandby = power.isStandby();
+ console.info('device is in standby: ' + isStandby);
+} catch(err) {
+ console.error('check isStandby failed, err: ' + err);
+}
+```
+
## power.rebootDevice(deprecated)
rebootDevice(reason: string): void
diff --git a/en/application-dev/reference/apis/js-apis-shortKey.md b/en/application-dev/reference/apis/js-apis-shortKey.md
index 79a8ce26644ead2c634af316ab5e191fc6955442..712d5e10bdb062edb0b8e6d1a36020fb83b73f91 100644
--- a/en/application-dev/reference/apis/js-apis-shortKey.md
+++ b/en/application-dev/reference/apis/js-apis-shortKey.md
@@ -15,7 +15,7 @@ import shortKey from '@ohos.multimodalInput.shortKey';
## shortKey.setKeyDownDuration
-setKeyDownDuration(businessId: string, delay: number, callback: AsyncCallback<void>): void
+setKeyDownDuration(businessKey: string, delay: number, callback: AsyncCallback<void>): void
Sets the delay for starting an ability using the shortcut key. This API uses an asynchronous callback to return the result.
@@ -25,7 +25,7 @@ Sets the delay for starting an ability using the shortcut key. This API uses an
| Name | Type | Mandatory| Description |
| ---------- | ------------------- | ---- | ------------------------------------------------------------ |
-| businessId | string | Yes | Unique service ID registered on the multimodal side. It corresponds to **businessId** in the **ability_launch_config.json** file.|
+| businessKey| string | Yes | Unique service ID registered on the multimodal side. It corresponds to **businessId** in the **ability_launch_config.json** file.|
| delay | number | Yes | Delay for starting an ability using the shortcut key, in ms.|
| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
@@ -49,7 +49,7 @@ try {
## shortKey.setKeyDownDuration
-setKeyDownDuration(businessId: string, delay: number): Promise<void>
+setKeyDownDuration(businessKey: string, delay: number): Promise<void>
Sets the delay for starting an ability using the shortcut key. This API uses a promise to return the result.
@@ -59,7 +59,7 @@ Sets the delay for starting an ability using the shortcut key. This API uses a p
| Name | Type | Mandatory| Description |
| ---------- | ------ | ---- | ------------------------------------------------------------ |
-| businessId | string | Yes | Unique service ID registered on the multimodal side. It corresponds to **businessId** in the **ability_launch_config.json** file.|
+| businessKey| string | Yes | Unique service ID registered on the multimodal side. It corresponds to **businessId** in the **ability_launch_config.json** file.|
| delay | number | Yes | Delay for starting an ability using the shortcut key, in ms.|
**Return value**
diff --git a/en/application-dev/reference/apis/js-apis-sim.md b/en/application-dev/reference/apis/js-apis-sim.md
index 08700a85bd5bab7b6bc8a0e190f5376602eeb462..fb3aa7540b8383f983436c0d713e09346ad6aa3e 100644
--- a/en/application-dev/reference/apis/js-apis-sim.md
+++ b/en/application-dev/reference/apis/js-apis-sim.md
@@ -615,7 +615,7 @@ Checks whether the SIM card in the specified slot is installed. This API uses an
| Name | Type | Mandatory| Description |
| -------- | --------------------------- | ---- | -------------------------------------- |
| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2|
-| callback | AsyncCallback<boolean> | Yes | Callback used to return the result. |
+| callback | AsyncCallback<boolean> | Yes | Callback used to return the result. The value **true** indicates that the SIM card in the specified slot is installed, and the value **false** indicates the opposite. |
**Error codes**
@@ -681,13 +681,15 @@ promise.then(data => {
});
```
-## sim.getSimAccountInfo7+
+## sim.getSimAccountInfo10+
getSimAccountInfo\(slotId: number, callback: AsyncCallback\\): void
Obtains SIM card account information. This API uses an asynchronous callback to return the result.
-**System API**: This is a system API.
+>**NOTE**
+>
+>If you do not have the **GET_TELEPHONY_STATE** permission, the ICCID and number information is empty.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
@@ -706,8 +708,6 @@ For details about the following error codes, see [Telephony Error Codes](../../r
| ID| Error Message |
| -------- | -------------------------------------------- |
-| 201 | Permission denied. |
-| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. |
| 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. |
@@ -725,13 +725,15 @@ sim.getSimAccountInfo(0, (err, data) => {
```
-## sim.getSimAccountInfo7+
+## sim.getSimAccountInfo10+
getSimAccountInfo\(slotId: number\): Promise\
Obtains SIM card account information. This API uses a promise to return the result.
-**System API**: This is a system API.
+>**NOTE**
+>
+>If you do not have the **GET_TELEPHONY_STATE** permission, the ICCID and number information is empty.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
@@ -755,8 +757,6 @@ For details about the following error codes, see [Telephony Error Codes](../../r
| ID| Error Message |
| -------- | -------------------------------------------- |
-| 201 | Permission denied. |
-| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. |
| 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. |
@@ -776,13 +776,15 @@ promise.then(data => {
});
```
-## sim.getActiveSimAccountInfoList8+
+## sim.getActiveSimAccountInfoList10+
getActiveSimAccountInfoList\(callback: AsyncCallback\\>\): void
Obtains the account information list of the active SIM card. This API uses an asynchronous callback to return the result.
-**System API**: This is a system API.
+>**NOTE**
+>
+>If you do not have the **GET_TELEPHONY_STATE** permission, the ICCID and number information is empty.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
@@ -800,8 +802,6 @@ For details about the following error codes, see [Telephony Error Codes](../../r
| ID| Error Message |
| -------- | -------------------------------------------- |
-| 201 | Permission denied. |
-| 202 | Non-system applications use system APIs. |
| 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. |
@@ -817,13 +817,15 @@ sim.getActiveSimAccountInfoList((err, data) => {
```
-## sim.getActiveSimAccountInfoList8+
+## sim.getActiveSimAccountInfoList10+
getActiveSimAccountInfoList\(\): Promise\\>;
Obtains the account information list of the active SIM card. This API uses a promise to return the result.
-**System API**: This is a system API.
+>**NOTE**
+>
+>If you do not have the **GET_TELEPHONY_STATE** permission, the ICCID and number information is empty.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
@@ -841,8 +843,6 @@ For details about the following error codes, see [Telephony Error Codes](../../r
| ID| Error Message |
| -------- | -------------------------------------------- |
-| 201 | Permission denied. |
-| 202 | Non-system applications use system APIs. |
| 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. |
| 8300004 | Do not have sim card. |
@@ -2250,6 +2250,7 @@ For details about the following error codes, see [Telephony Error Codes](../../r
| ID| Error Message |
| -------- | -------------------------------------------- |
| 201 | Permission denied. |
+| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. |
| 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. |
@@ -2302,6 +2303,7 @@ For details about the following error codes, see [Telephony Error Codes](../../r
| ID| Error Message |
| -------- | -------------------------------------------- |
| 201 | Permission denied. |
+| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. |
| 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. |
@@ -3990,6 +3992,80 @@ try {
}
```
+## sim.getDefaultVoiceSimId10+
+
+getDefaultVoiceSimId\(callback: AsyncCallback\\): void
+
+Obtains the default slot ID of the SIM card that provides voice services. This API uses an asynchronous callback to return the result.
+
+**System capability**: SystemCapability.Telephony.CoreService
+
+**Parameters**
+
+| Name | Type | Mandatory| Description |
+| -------- | --------------------------- | ---- | ---------- |
+| callback | AsyncCallback<number> | Yes | Callback used to return the result.
The return value is bound to the SIM card and increases from 1.|
+
+**Error codes**
+
+For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
+
+| ID| Error Message |
+| -------- | -------------------------------------------- |
+| 401 | Parameter error. |
+| 8300001 | Invalid parameter value. |
+| 8300002 | Operation failed. Cannot connect to service. |
+| 8300003 | System internal error. |
+| 8300004 | Do not have sim card. |
+| 8300999 | Unknown error code. |
+| 8301001 | SIM card is not activated. |
+
+**Example**
+
+```js
+sim.getDefaultVoiceSimId((err, data) => {
+ console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
+});
+```
+
+## sim.getDefaultVoiceSimId10+
+
+getDefaultVoiceSimId\(\): Promise\
+
+Obtains the default slot ID of the SIM card that provides voice services. This API uses a promise to return the result.
+
+**System capability**: SystemCapability.Telephony.CoreService
+
+**Return value**
+
+| Type | Description |
+| ----------------- | --------------------------------------- |
+| Promise\ | Promise used to return the result.
The return value is bound to the SIM card and increases from 1.|
+
+**Error codes**
+
+For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
+
+| ID| Error Message |
+| -------- | -------------------------------------------- |
+| 8300001 | Invalid parameter value. |
+| 8300002 | Operation failed. Cannot connect to service. |
+| 8300003 | System internal error. |
+| 8300004 | Do not have sim card. |
+| 8300999 | Unknown error code. |
+| 8301001 | SIM card is not activated. |
+
+**Example**
+
+```js
+let promise = sim.getDefaultVoiceSimId();
+promise.then(data => {
+ console.log(`getDefaultVoiceSimId success, promise: data->${JSON.stringify(data)}`);
+}).catch(err => {
+ console.log(`getDefaultVoiceSimId failed, promise: err->${JSON.stringify(err)}`);
+});
+```
+
## SimState
Enumerates SIM card states.
@@ -4113,7 +4189,7 @@ Defines the personalized lock information.
## IccAccountInfo7+
-Defines the ICC account information.
+ICC account information.
**System API**: This is a system API.
diff --git a/en/application-dev/reference/apis/js-apis-sms.md b/en/application-dev/reference/apis/js-apis-sms.md
index b959988ba1c900b0ef4273ec6773a504076c76a6..e428eaa609d028073417c7759d3b0c645e5f80a7 100644
--- a/en/application-dev/reference/apis/js-apis-sms.md
+++ b/en/application-dev/reference/apis/js-apis-sms.md
@@ -99,12 +99,16 @@ promise.then(data => {
});
```
-## sms.sendMessage
+## sms.sendMessage(deprecated)
sendMessage\(options: SendMessageOptions\): void
Sends an SMS message.
+> **NOTE**
+>
+> This API is supported since API version 8 and deprecated since API version 10. You are advised to use [sendShortMessage](#smssendshortmessage10).
+
**Required permissions**: ohos.permission.SEND_MESSAGES
**System capability**: SystemCapability.Telephony.SmsMms
@@ -146,6 +150,114 @@ let options = {slotId, content, destinationHost, serviceCenter, destinationPort,
sms.sendMessage(options);
```
+## sms.sendShortMessage10+
+
+sendShortMessage\(options: SendMessageOptions, callback: AsyncCallback<void>\): void
+
+Sends an SMS message. This API uses an asynchronous callback to return the result.
+
+**Required permissions**: ohos.permission.SEND_MESSAGES
+
+**System capability**: SystemCapability.Telephony.SmsMms
+
+**Parameters**
+
+| Name | Type | Mandatory| Description |
+| -------- | --------------------------- | ---- | ---------------------------------------- |
+| options | [SendMessageOptions](#sendmessageoptions) | Yes | Options (including the callback) for sending an SMS message.|
+| callback | AsyncCallback<void> | Yes | Callback used to return the result.|
+
+**Error codes**
+
+For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
+
+| ID| Error Message |
+| -------- | -------------------------------------------- |
+| 201 | Permission denied. |
+| 401 | Parameter error. |
+| 8300001 | Invalid parameter value. |
+| 8300002 | Operation failed. Cannot connect to service. |
+| 8300003 | System internal error. |
+| 8300999 | Unknown error code. |
+
+**Example**
+
+```js
+let sendCallback = function (err, data) {
+ console.log(`sendCallback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
+}
+let deliveryCallback = function (err, data) {
+ console.log(`deliveryCallback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
+}
+let slotId = 0;
+let content ='SMS message content';
+let destinationHost = '+861xxxxxxxxxx';
+let serviceCenter = '+861xxxxxxxxxx';
+let destinationPort = 1000;
+let options = {slotId, content, destinationHost, serviceCenter, destinationPort, sendCallback, deliveryCallback};
+sms.sendMessage(options, (err) => {
+ console.log(`callback: err->${JSON.stringify(err)}`);
+});
+```
+
+## sms.sendShortMessage10+
+
+sendShortMessage\(options: SendMessageOptions\): Promise<void>
+
+Sends an SMS message. This API uses a promise to return the result.
+
+**Required permissions**: ohos.permission.SEND_MESSAGES
+
+**System capability**: SystemCapability.Telephony.SmsMms
+
+**Parameters**
+
+| Name | Type | Mandatory| Description |
+| -------- | --------------------------- | ---- | ---------------------------------------- |
+| options | [SendMessageOptions](#sendmessageoptions) | Yes | Options (including the callback) for sending an SMS message.|
+
+**Return value**
+
+| Type | Description |
+| --------------- | ------------------------------------------------------------ |
+| Promise<void> | Promise used to return the result.|
+
+**Error codes**
+
+For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
+
+| ID| Error Message |
+| -------- | -------------------------------------------- |
+| 201 | Permission denied. |
+| 401 | Parameter error. |
+| 8300001 | Invalid parameter value. |
+| 8300002 | Operation failed. Cannot connect to service. |
+| 8300003 | System internal error. |
+| 8300999 | Unknown error code. |
+
+**Example**
+
+```js
+let sendCallback = function (err, data) {
+ console.log(`sendCallback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
+}
+let deliveryCallback = function (err, data) {
+ console.log(`deliveryCallback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
+}
+let slotId = 0;
+let content ='SMS message content';
+let destinationHost = '+861xxxxxxxxxx';
+let serviceCenter = '+861xxxxxxxxxx';
+let destinationPort = 1000;
+let options = {slotId, content, destinationHost, serviceCenter, destinationPort, sendCallback, deliveryCallback};
+let promise = sms.sendShortMessage(options);
+promise.then(() => {
+ console.log(`sendShortMessage success`);
+}).catch(err => {
+ console.error(`sendShortMessage failed, promise: err->${JSON.stringify(err)}`);
+});
+
+```
## sms.getDefaultSmsSlotId7+
@@ -1371,6 +1483,7 @@ For details about the following error codes, see [Telephony Error Codes](../../r
| ID| Error Message |
| -------- | -------------------------------------------- |
+| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. |
| 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. |
@@ -1415,6 +1528,7 @@ For details about the following error codes, see [Telephony Error Codes](../../r
| ID| Error Message |
| -------- | -------------------------------------------- |
+| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. |
| 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. |
@@ -1456,6 +1570,7 @@ For details about the following error codes, see [Telephony Error Codes](../../r
| ID| Error Message |
| -------- | -------------------------------------------- |
+| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. |
| 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. |
@@ -1508,6 +1623,7 @@ For details about the following error codes, see [Telephony Error Codes](../../r
| ID| Error Message |
| -------- | -------------------------------------------- |
+| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. |
| 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. |
@@ -1534,6 +1650,81 @@ promise.then(data => {
});
```
+## sms.getDefaultSmsSimId10+
+
+getDefaultSmsSimId\(callback: AsyncCallback<number>\): void
+
+Obtains the default ID of the SIM card used to send SMS messages. This API uses an asynchronous callback to return the result.
+
+**System capability**: SystemCapability.Telephony.SmsMms
+
+**Parameters**
+
+| Name | Type | Mandatory| Description |
+| -------- | --------------------------- | ---- | ---------------------------------------- |
+| callback | AsyncCallback<number> | Yes | Callback used to return the result.
The return value is bound to the SIM card and increases from 1.|
+
+**Error codes**
+
+For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
+
+| ID| Error Message |
+| -------- | -------------------------------------------- |
+| 401 | Parameter error. |
+| 8300001 | Invalid parameter value. |
+| 8300002 | Operation failed. Cannot connect to service. |
+| 8300003 | System internal error. |
+| 8300004 | Do not have sim card. |
+| 8300999 | Unknown error code. |
+| 8301001 | SIM card is not activated. |
+
+**Example**
+
+```js
+sms.getDefaultSmsSimId((err, data) => {
+ console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
+});
+```
+
+
+## sms.getDefaultSmsSimId10+
+
+getDefaultSmsSimId\(\): Promise<number>
+
+Obtains the default ID of the SIM card used to send SMS messages. This API uses a promise to return the result.
+
+**System capability**: SystemCapability.Telephony.SmsMms
+
+**Return value**
+
+| Type | Description |
+| --------------- | ------------------------------------------------------------ |
+| Promise<number> | Promise used to return the result.
The return value is bound to the SIM card and increases from 1.|
+
+**Error codes**
+
+For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md).
+
+| ID| Error Message |
+| -------- | -------------------------------------------- |
+| 8300001 | Invalid parameter value. |
+| 8300002 | Operation failed. Cannot connect to service. |
+| 8300003 | System internal error. |
+| 8300004 | Do not have sim card. |
+| 8300999 | Unknown error code. |
+| 8301001 | SIM card is not activated. |
+
+**Example**
+
+```js
+let promise = sms.getDefaultSmsSimId();
+promise.then(data => {
+ console.log(`getDefaultSmsSimId success, promise: data->${JSON.stringify(data)}`);
+}).catch(err => {
+ console.error(`getDefaultSmsSimId failed, promise: err->${JSON.stringify(err)}`);
+});
+```
+
## ShortMessage
Defines an SMS message instance.
@@ -2026,7 +2217,7 @@ Defines an MMS message delivery index.
| messageId | string | Yes | Message ID.|
| date | number | Yes | Date. |
| to | Array<[MmsAddress](#mmsaddress8)\> | Yes | Destination address.|
-| status | number | Yes | Status |
+| status | number | Yes | Status. |
| version | [MmsVersionType](#mmsversiontype8) | Yes | Version. |
## MmsRespInd8+
@@ -2040,7 +2231,7 @@ Defines an MMS response index.
| Name | Type | Mandatory| Description |
| ------------- | ---------------------------------- | ---- | -------- |
| transactionId | string | Yes | Event ID. |
-| status | number | Yes | Status |
+| status | number | Yes | Status. |
| version | [MmsVersionType](#mmsversiontype8) | Yes | Version. |
| reportAllowed | [ReportType](#reporttype8) | No | Report allowed.|
diff --git a/en/application-dev/reference/apis/js-apis-socket.md b/en/application-dev/reference/apis/js-apis-socket.md
index 62bdc0ec13d6df516a3d0b632f9c6fcbd30b342e..6e89fa67f9e48752ca11967eb4be365554c9cf17 100644
--- a/en/application-dev/reference/apis/js-apis-socket.md
+++ b/en/application-dev/reference/apis/js-apis-socket.md
@@ -2398,7 +2398,7 @@ Enables listening for **close** events of a **TCPSocketConnection** object. This
| Name | Type | Mandatory| Description |
| -------- | ---------------- | ---- | ----------------------------------- |
| type | string | Yes | Type of the event to subscribe to.
**close**: close event|
-| callback | Callback\ | No | Callback used to return the result. |
+| callback | Callback\ | Yes | Callback used to return the result. |
**Error codes**
diff --git a/en/application-dev/reference/apis/js-apis-telephony-data.md b/en/application-dev/reference/apis/js-apis-telephony-data.md
index 4b234fb7c765a888a037d1034856225d069e5bb3..27ed2853288b73303f841a2c2c6061fcfe90a191 100644
--- a/en/application-dev/reference/apis/js-apis-telephony-data.md
+++ b/en/application-dev/reference/apis/js-apis-telephony-data.md
@@ -1,6 +1,6 @@
# @ohos.telephony.data (Cellular Data)
-The cellular data module provides basic mobile data management functions. You can obtain and set the default slot of the SIM card used for mobile data, and obtain the uplink and downlink connection status of cellular data services and connection status of the packet switched (PS) domain. Besides, you can check whether cellular data services and data roaming are enabled.
+The **data** module provides basic mobile data management functions. You can obtain and set the default slot of the SIM card used for mobile data, and obtain the uplink and downlink connection status of cellular data services and connection status of the packet switched (PS) domain. Besides, you can check whether cellular data services and data roaming are enabled.
>**NOTE**
>
@@ -24,7 +24,7 @@ Obtains the default slot of the SIM card used for mobile data. This API uses an
| Name | Type | Mandatory| Description |
| -------- | ----------------------- | ---- | ------------------------------------------ |
-| callback | AsyncCallback\ | Yes | Callback used to return the result.
**0**: card slot 1
**1**: card slot 2|
+| callback | AsyncCallback\ | Yes | Callback used to return the result.
**0**: card slot 1.
**1**: card slot 2.|
**Example**
@@ -46,7 +46,7 @@ Obtains the default slot of the SIM card used for mobile data. This API uses a p
| Type | Description |
| ----------------- | ------------------------------------------------------------ |
-| Promise\ | Promise used to return the result.
**0**: card slot 1
**1**: card slot 2|
+| Promise\ | Promise used to return the result.
**0**: card slot 1.
**1**: card slot 2.|
**Example**
@@ -71,7 +71,7 @@ Obtains the default SIM card used for mobile data synchronously.
| Type | Description |
| ------ | -------------------------------------------------- |
-| number | Card slot ID.
**0**: card slot 1
**1**: card slot 2|
+| number | Card slot ID.
**0**: card slot 1.
**1**: card slot 2.|
**Example**
@@ -87,7 +87,7 @@ Sets the default slot of the SIM card used for mobile data. This API uses an asy
**System API**: This is a system API.
-**Required permission**: ohos.permission.SET_TELEPHONY_STATE
+**Required permissions**: ohos.permission.SET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CellularData
@@ -95,7 +95,7 @@ Sets the default slot of the SIM card used for mobile data. This API uses an asy
| Name | Type | Mandatory| Description |
| -------- | --------------------- | ---- | ------------------------------------------------------------ |
-| slotId | number | Yes | SIM card slot ID.
**0**: card slot 1
**1**: card slot 2
**-1**: Clears the default configuration.|
+| slotId | number | Yes | SIM card slot ID.
- **0**: card slot 1.
- **1**: card slot 2.
- **-1**: Clears the default configuration.|
| callback | AsyncCallback\ | Yes | Callback used to return the result. |
**Error codes**
@@ -130,7 +130,7 @@ Sets the default slot of the SIM card used for mobile data. This API uses a prom
**System API**: This is a system API.
-**Required permission**: ohos.permission.SET_TELEPHONY_STATE
+**Required permissions**: ohos.permission.SET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CellularData
@@ -138,7 +138,7 @@ Sets the default slot of the SIM card used for mobile data. This API uses a prom
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ------------------------------------------------------------ |
-| slotId | number | Yes | SIM card slot ID.
**0**: card slot 1
**1**: card slot 2
**-1**: Clears the default configuration.|
+| slotId | number | Yes | SIM card slot ID.
- **0**: card slot 1.
- **1**: card slot 2.
- **-1**: Clears the default configuration.|
**Return value**
@@ -356,7 +356,7 @@ Checks whether roaming is enabled for the cellular data service. This API uses a
| Name | Type | Mandatory| Description |
| -------- | ------------------------ | ---- | ------------------------------------------------------------ |
-| slotId | number | Yes | Card slot ID.
**0**: card slot 1
**1**: card slot 2 |
+| slotId | number | Yes | Card slot ID.
**0**: card slot 1.
**1**: card slot 2. |
| callback | AsyncCallback\ | Yes | Callback used to return the result.
**true**: Roaming is enabled for the cellular data service.
**false**: Roaming is disabled for the cellular data service.|
**Error codes**
@@ -394,7 +394,7 @@ Checks whether roaming is enabled for the cellular data service. This API uses a
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ---------------------------------------- |
-| slotId | number | Yes | Card slot ID.
**0**: card slot 1
**1**: card slot 2|
+| slotId | number | Yes | Card slot ID.
**0**: card slot 1.
**1**: card slot 2.|
**Return value**
@@ -434,7 +434,7 @@ Enables the cellular data service. This API uses an asynchronous callback to ret
**System API**: This is a system API.
-**Required permission**: ohos.permission.SET_TELEPHONY_STATE
+**Required permissions**: ohos.permission.SET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CellularData
@@ -474,7 +474,7 @@ Enables the cellular data service. This API uses a promise to return the result.
**System API**: This is a system API.
-**Required permission**: ohos.permission.SET_TELEPHONY_STATE
+**Required permissions**: ohos.permission.SET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CellularData
@@ -515,7 +515,7 @@ Disables the cellular data service. This API uses an asynchronous callback to re
**System API**: This is a system API.
-**Required permission**: ohos.permission.SET_TELEPHONY_STATE
+**Required permissions**: ohos.permission.SET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CellularData
@@ -555,7 +555,7 @@ Disables the cellular data service. This API uses a promise to return the result
**System API**: This is a system API.
-**Required permission**: ohos.permission.SET_TELEPHONY_STATE
+**Required permissions**: ohos.permission.SET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CellularData
@@ -596,7 +596,7 @@ Enables the cellular data roaming service. This API uses an asynchronous callbac
**System API**: This is a system API.
-**Required permission**: ohos.permission.SET_TELEPHONY_STATE
+**Required permissions**: ohos.permission.SET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CellularData
@@ -604,7 +604,7 @@ Enables the cellular data roaming service. This API uses an asynchronous callbac
| Name | Type | Mandatory| Description |
| -------- | --------------------- | ---- | ---------------------------------------- |
-| slotId | number | Yes | Card slot ID.
**0**: card slot 1
**1**: card slot 2|
+| slotId | number | Yes | Card slot ID.
**0**: card slot 1.
**1**: card slot 2.|
| callback | AsyncCallback\ | Yes | Callback used to return the result. |
**Error codes**
@@ -637,7 +637,7 @@ Enables the cellular data roaming service. This API uses a promise to return the
**System API**: This is a system API.
-**Required permission**: ohos.permission.SET_TELEPHONY_STATE
+**Required permissions**: ohos.permission.SET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CellularData
@@ -645,7 +645,7 @@ Enables the cellular data roaming service. This API uses a promise to return the
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ---------------------------------------- |
-| slotId | number | Yes | Card slot ID.
**0**: card slot 1
**1**: card slot 2|
+| slotId | number | Yes | Card slot ID.
**0**: card slot 1.
**1**: card slot 2.|
**Return value**
@@ -686,7 +686,7 @@ Disables the cellular data roaming service. This API uses an asynchronous callba
**System API**: This is a system API.
-**Required permission**: ohos.permission.SET_TELEPHONY_STATE
+**Required permissions**: ohos.permission.SET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CellularData
@@ -694,7 +694,7 @@ Disables the cellular data roaming service. This API uses an asynchronous callba
| Name | Type | Mandatory| Description |
| -------- | --------------------- | ---- | ---------------------------------------- |
-| slotId | number | Yes | Card slot ID.
**0**: card slot 1
**1**: card slot 2|
+| slotId | number | Yes | Card slot ID.
**0**: card slot 1.
**1**: card slot 2.|
| callback | AsyncCallback\ | Yes | Callback used to return the result. |
**Error codes**
@@ -727,7 +727,7 @@ Disables the cellular data roaming service. This API uses a promise to return th
**System API**: This is a system API.
-**Required permission**: ohos.permission.SET_TELEPHONY_STATE
+**Required permissions**: ohos.permission.SET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CellularData
@@ -735,7 +735,7 @@ Disables the cellular data roaming service. This API uses a promise to return th
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ---------------------------------------- |
-| slotId | number | Yes | Card slot ID.
**0**: card slot 1
**1**: card slot 2|
+| slotId | number | Yes | Card slot ID.
**0**: card slot 1.
**1**: card slot 2.|
**Return value**
@@ -768,6 +768,26 @@ promise.then(() => {
});
```
+## data.getDefaultCellularDataSimId10+
+
+getDefaultCellularDataSimId(): number
+
+Obtains the default ID of the SIM card used for mobile data.
+
+**System capability**: SystemCapability.Telephony.CellularData
+
+**Return value**
+
+| Type | Description |
+| ------ | -------------------------------------------------- |
+| number | Obtains the default ID of the SIM card used for mobile data.
The return value is bound to the SIM card and increases from 1.|
+
+**Example**
+
+```js
+console.log("Result: "+ data.getDefaultCellularDataSimId())
+```
+
## DataFlowType
Defines the cellular data flow type.
diff --git a/en/application-dev/reference/apis/js-apis-usbManager.md b/en/application-dev/reference/apis/js-apis-usbManager.md
index ac6de75dd00fc24d9503039fdae5bf6be0931ee7..204318356f38eca412eed855ddff9d0e324a8463 100644
--- a/en/application-dev/reference/apis/js-apis-usbManager.md
+++ b/en/application-dev/reference/apis/js-apis-usbManager.md
@@ -152,7 +152,7 @@ Checks whether the user, for example, the application or system, has the device
**Example**
```js
-let devicesName="1-1";
+let devicesName = "1-1";
let bool = usb.hasRight(devicesName);
console.log(`${bool}`);
```
@@ -180,7 +180,7 @@ Requests the temporary permission for the application to access a USB device. Th
**Example**
```js
-let devicesName="1-1";
+let devicesName = "1-1";
usb.requestRight(devicesName).then((ret) => {
console.log(`requestRight = ${ret}`);
});
@@ -209,7 +209,7 @@ Removes the permission for the application to access a USB device.
**Example**
```js
-let devicesName= "1-1";
+let devicesName = "1-1";
if (usb.removeRight(devicesName)) {
console.log(`Succeed in removing right`);
}
@@ -277,6 +277,15 @@ Before you do this, call [usb.getDevices](#usbgetdevices) to obtain the USB devi
**Example**
```js
+let devicesList = usb.getDevices();
+if (devicesList.length == 0) {
+ console.log(`device list is empty`);
+}
+
+let device = devicesList[0];
+usb.requestRight(device.name);
+let devicepipe = usb.connectDevice(device);
+let interfaces = device.configs[0].interfaces[0];
let ret = usb.claimInterface(devicepipe, interfaces);
console.log(`claimInterface = ${ret}`);
```
@@ -307,7 +316,17 @@ Before you do this, ensure that you have claimed the interface by calling [usb.c
**Example**
```js
-let ret = usb.releaseInterface(devicepipe, interfaces);
+let devicesList = usb.getDevices();
+if (devicesList.length == 0) {
+ console.log(`device list is empty`);
+}
+
+let device = devicesList[0];
+usb.requestRight(device.name);
+let devicepipe = usb.connectDevice(device);
+let interfaces = device.configs[0].interfaces[0];
+let ret = usb.claimInterface(devicepipe, interfaces);
+ret = usb.releaseInterface(devicepipe, interfaces);
console.log(`releaseInterface = ${ret}`);
```
@@ -337,6 +356,15 @@ Before you do this, call [usb.getDevices](#usbgetdevices) to obtain the USB devi
**Example**
```js
+let devicesList = usb.getDevices();
+if (devicesList.length == 0) {
+ console.log(`device list is empty`);
+}
+
+let device = devicesList[0];
+usb.requestRight(device.name);
+let devicepipe = usb.connectDevice(device);
+let config = device.configs[0];
let ret = usb.setConfiguration(devicepipe, config);
console.log(`setConfiguration = ${ret}`);
```
@@ -367,7 +395,17 @@ Before you do this, call [usb.getDevices](#usbgetdevices) to obtain the USB devi
**Example**
```js
-let ret = usb.setInterface(devicepipe, interfaces);
+let devicesList = usb.getDevices();
+if (devicesList.length == 0) {
+ console.log(`device list is empty`);
+}
+
+let device = devicesList[0];
+usb.requestRight(device.name);
+let devicepipe = usb.connectDevice(device);
+let interfaces = device.configs[0].interfaces[0];
+let ret = usb.claimInterface(devicepipe, interfaces);
+ret = usb.setInterface(devicepipe, interfaces);
console.log(`setInterface = ${ret}`);
```
@@ -396,6 +434,13 @@ Before you do this, call [usb.getDevices](#usbgetdevices) to obtain the USB devi
**Example**
```js
+let devicesList = usb.getDevices();
+if (devicesList.length == 0) {
+ console.log(`device list is empty`);
+}
+
+usb.requestRight(devicesList[0].name);
+let devicepipe = usb.connectDevice(devicesList[0]);
let ret = usb.getRawDescriptor(devicepipe);
```
@@ -424,6 +469,13 @@ Before you do this, call [usb.getDevices](#usbgetdevices) to obtain the USB devi
**Example**
```js
+let devicesList = usb.getDevices();
+if (devicesList.length == 0) {
+ console.log(`device list is empty`);
+}
+
+usb.requestRight(devicesList[0].name);
+let devicepipe = usb.connectDevice(devicesList[0]);
let ret = usb.getFileDescriptor(devicepipe);
```
@@ -462,6 +514,14 @@ let param = {
index: 0,
data: null
};
+
+let devicesList = usb.getDevices();
+if (devicesList.length == 0) {
+ console.log(`device list is empty`);
+}
+
+usb.requestRight(devicesList[0].name);
+let devicepipe = usb.connectDevice(devicesList[0]);
usb.controlTransfer(devicepipe, param).then((ret) => {
console.log(`controlTransfer = ${ret}`);
})
@@ -498,8 +558,21 @@ Before you do this, call [usb.getDevices](#usbgetdevices) to obtain the USB devi
// Call usb.getDevices to obtain a data set. Then, obtain a USB device and its access permission.
// Pass the obtained USB device as a parameter to usb.connectDevice. Then, call usb.connectDevice to connect the USB device.
// Call usb.claimInterface to claim the USB interface. After that, call usb.bulkTransfer to start bulk transfer.
+let devicesList = usb.getDevices();
+if (devicesList.length == 0) {
+ console.log(`device list is empty`);
+}
+
+let device = devicesList[0];
+usb.requestRight(device.name);
+
+let devicepipe = usb.connectDevice(device);
+let interfaces = device.configs[0].interfaces[0];
+let endpoint = device.configs[0].interfaces[0].endpoints[0];
+let ret = usb.claimInterface(devicepipe, interfaces);
+let buffer = new Uint8Array(128);
usb.bulkTransfer(devicepipe, endpoint, buffer).then((ret) => {
- console.log(`bulkTransfer = ${ret}`);
+ console.log(`bulkTransfer = ${ret}`);
});
```
@@ -528,6 +601,13 @@ Before you do this, call [usb.getDevices](#usbgetdevices) to obtain the USB devi
**Example**
```js
+let devicesList = usb.getDevices();
+if (devicesList.length == 0) {
+ console.log(`device list is empty`);
+}
+
+usb.requestRight(devicesList[0].name);
+let devicepipe = usb.connectDevice(devicesList[0]);
let ret = usb.closePipe(devicepipe);
console.log(`closePipe = ${ret}`);
```
@@ -606,6 +686,14 @@ Sets the current USB function list in Device mode.
| ------ | ------------------------------ | ---- | ----------------- |
| funcs | [FunctionType](#functiontype) | Yes | USB function list in numeric mask format.|
+**Error codes**
+
+For details about the error codes, see [USB Error Codes](../errorcodes/errorcode-usb.md).
+
+| ID| Error Message |
+| -------- | ---------------------------------------------------- |
+| 14400002 | Permission denied.The HDC is disabled by the system. |
+
**Return value**
| Type | Description |
diff --git a/en/application-dev/reference/native-apis/Readme-EN.md b/en/application-dev/reference/native-apis/Readme-EN.md
index 87aeec065c1bc5d206b96b68a1c0e4971aeda87f..fee6bf6d47f2dd9fc3268c8e0384cf0ea0567727 100644
--- a/en/application-dev/reference/native-apis/Readme-EN.md
+++ b/en/application-dev/reference/native-apis/Readme-EN.md
@@ -29,6 +29,8 @@
- [HuksTypeApi](_huks_type_api.md)
- [Init](init.md)
- [Memory](memory.md)
+ - [UsbDdk](_usb_ddk.md)
+ - [Hitrace](_hitrace.md)
- Header Files
- [drawing_bitmap.h](drawing__bitmap_8h.md)
- [drawing_brush.h](drawing__brush_8h.md)
@@ -87,6 +89,9 @@
- [relational_store.h](relational__store_8h.md)
- [syscap_ndk.h](syscap__ndk_8h.md)
- [purgeable_memory.h](purgeable__memory_8h.md)
+ - [usb_ddk_api.h](usb__ddk__api_8h.md)
+ - [usb_ddk_types.h](usb__ddk__types_8h.md)
+ - [trace.h](trace_8h.md)
- Structs
- [OH_Drawing_BitmapFormat](_o_h___drawing___bitmap_format.md)
- [OH_NativeBuffer_Config](_o_h___native_buffer___config.md)
@@ -132,3 +137,14 @@
- [OH_Rdb_Store](_o_h___rdb___store.md)
- [OH_VBucket](_o_h___v_bucket.md)
- [OH_VObject](_o_h___v_object.md)
+ - [UsbConfigDescriptor](_usb_config_descriptor.md)
+ - [UsbControlRequestSetup](_usb_control_request_setup.md)
+ - [UsbDdkConfigDescriptor](_usb_ddk_config_descriptor.md)
+ - [UsbDdkEndpointDescriptor](_usb_ddk_endpoint_descriptor.md)
+ - [UsbDdkInterface](_usb_ddk_interface.md)
+ - [UsbDdkInterfaceDescriptor](_usb_ddk_interface_descriptor.md)
+ - [UsbDeviceDescriptor](_usb_device_descriptor.md)
+ - [UsbDeviceMemMap](_usb_device_mem_map.md)
+ - [UsbEndpointDescriptor](_usb_endpoint_descriptor.md)
+ - [UsbInterfaceDescriptor](_usb_interface_descriptor.md)
+ - [UsbRequestPipe](_usb_request_pipe.md)
diff --git a/en/application-dev/reference/native-apis/_hitrace.md b/en/application-dev/reference/native-apis/_hitrace.md
new file mode 100644
index 0000000000000000000000000000000000000000..995308c7599bda3f33b27224a038ce64377fdeb7
--- /dev/null
+++ b/en/application-dev/reference/native-apis/_hitrace.md
@@ -0,0 +1,154 @@
+# Hitrace
+
+
+## Overview
+
+hiTraceMeter provides APIs for system performance tracing.
+
+You can call the APIs provided by hiTraceMeter in your own service logic to effectively track service processes and check the system performance.
+
+\@syscap SystemCapability.HiviewDFX.HiTrace
+
+**Since**
+
+10
+
+
+## Summary
+
+
+### File
+
+| Name| Description|
+| -------- | -------- |
+| [trace.h](trace_8h.md) | Defines APIs of the HiTraceMeter module for performance trace.
**File to include**:
**Library**: libhitrace_ndk.z.so|
+
+### Functions
+
+| Name| Description|
+| -------- | -------- |
+| [OH_HiTrace_StartTrace](#oh_hitrace_starttrace) (const char \*name) | Marks the start of a synchronous trace.|
+| [OH_HiTrace_FinishTrace](#oh_hitrace_finishtrace) (void) | Marks the end of a synchronous trace.|
+| [OH_HiTrace_StartAsyncTrace](#oh_hitrace_startasynctrace) (const char \*name, int32_t taskId) | Marks the start of an asynchronous trace.|
+| [OH_HiTrace_FinishAsyncTrace](#oh_hitrace_finishasynctrace) (const char \*name, int32_t taskId) | Marks the end of an asynchronous trace.|
+| [OH_HiTrace_CountTrace](#oh_hitrace_counttrace) (const char \*name, int64_t count) | Traces the value change of an integer variable based on its name.|
+
+
+## Function Description
+
+
+### OH_HiTrace_CountTrace()
+
+
+```
+void OH_HiTrace_CountTrace (const char * name, int64_t count )
+```
+
+**Description**
+
+Traces the value change of an integer variable based on its name.
+
+This API can be executed for multiple times to trace the value change of a given integer variable at different time points.
+
+**Parameters**
+
+| Name| Description|
+| -------- | -------- |
+| name | Name of the integer variable. It does not need to be the same as the real variable name.|
+| count | Integer value. Generally, an integer variable can be specified.|
+
+**Since**
+
+10
+
+
+### OH_HiTrace_FinishAsyncTrace()
+
+
+```
+void OH_HiTrace_FinishAsyncTrace (const char * name, int32_t taskId )
+```
+
+**Description**
+
+Marks the end of an asynchronous trace.
+
+This API is called in the callback function after an asynchronous trace is complete. It is used with **OH_HiTrace_StartAsyncTrace** in pairs. Its name and task ID must be the same as those of **OH_HiTrace_StartAsyncTrace**.
+
+**Parameters**
+
+| Name| Description|
+| -------- | -------- |
+| name | Name of the asynchronous trace.|
+| taskId | ID of the asynchronous trace. The start and end of an asynchronous trace task do not occur in sequence. Therefore, the start and end of an asynchronous trace need to be matched based on the task name and the unique task ID together.|
+
+**Since**
+
+10
+
+
+### OH_HiTrace_FinishTrace()
+
+
+```
+void OH_HiTrace_FinishTrace (void )
+```
+
+**Description**
+
+Marks the end of a synchronous trace.
+
+This API must be used with **OH_HiTrace_StartTrace** in pairs. During trace data parsing, the system matches it with the **OH_HiTrace_StartTrace** API recently invoked in the service process.
+
+**Since**
+
+10
+
+
+### OH_HiTrace_StartAsyncTrace()
+
+
+```
+void OH_HiTrace_StartAsyncTrace (const char * name, int32_t taskId )
+```
+
+**Description**
+
+Marks the start of an asynchronous trace.
+
+This API is called to implement performance trace in asynchronous manner. The start and end of an asynchronous trace task do not occur in sequence. Therefore, a unique **taskId** is required to ensure proper data parsing. It is passed as an input parameter for the asynchronous API. This API is used with **OH_HiTrace_FinishAsyncTrace** in pairs. The two APIs that have the same name and task ID together form an asynchronous trace. If multiple trace tasks with the same name need to be performed at the same time or a trace task needs to be performed multiple times concurrently, different task IDs must be specified in **OH_HiTrace_StartTrace**. If the trace tasks with the same name are not performed at the same time, the same taskId can be used.
+
+**Parameters**
+
+| Name| Description|
+| -------- | -------- |
+| name | Name of an asynchronous trace.|
+| taskId | ID of the asynchronous trace. The start and end of an asynchronous trace task do not occur in sequence. Therefore, the start and end of an asynchronous trace need to be matched based on the task name and the unique task ID together.|
+
+**Since**
+
+10
+
+
+### OH_HiTrace_StartTrace()
+
+
+```
+void OH_HiTrace_StartTrace (const char * name)
+```
+
+**Description**
+
+Marks the start of a synchronous trace.
+
+This API is used with **OH_HiTrace_FinishTrace** in pairs. The two APIs can be used in nested mode. The stack data structure is used for matching during trace data parsing.
+
+**Parameters**
+
+| Name| Description|
+| -------- | -------- |
+| name | Name of the synchronous trace.|
+
+**Since**
+
+10
diff --git a/en/application-dev/reference/native-apis/_usb_config_descriptor.md b/en/application-dev/reference/native-apis/_usb_config_descriptor.md
new file mode 100644
index 0000000000000000000000000000000000000000..2a5e7498f86d2aaaeaff4548cd75bce912d2dcf2
--- /dev/null
+++ b/en/application-dev/reference/native-apis/_usb_config_descriptor.md
@@ -0,0 +1,130 @@
+# UsbConfigDescriptor
+
+
+## Overview
+
+Defines standard configuration descriptors, which correspond to **Standard Configuration Descriptor** in the USB protocol.
+
+**Since**
+
+10
+
+**Related Modules**
+
+[UsbDdk](_usb_ddk.md)
+
+
+## Summary
+
+
+### Member Variables
+
+| Name| Description|
+| -------- | -------- |
+| [bLength](#blength) | Size of the descriptor, in bytes.|
+| [bDescriptorType](#bdescriptortype) | Descriptor type.|
+| [wTotalLength](#wtotallength) | Total length of the configuration descriptor, including the configuration, interface, endpoint, and class- or vendor-specific descriptors.|
+| [bNumInterfaces](#bnuminterfaces) | Number of interfaces supported by the configuration.|
+| [bConfigurationValue](#bconfigurationvalue) | Configuration index, which is used to select the configuration.|
+| [iConfiguration](#iconfiguration) | Index of the string descriptor that describes the configuration.|
+| [bmAttributes](#bmattributes) | Configuration attributes, including the power mode and remote wakeup.|
+| [bMaxPower](#bmaxpower) | Maximum power consumption of the bus-powered USB device, in 2 mA.|
+
+
+## Member Variable Description
+
+
+### bConfigurationValue
+
+
+```
+uint8_t UsbConfigDescriptor::bConfigurationValue
+```
+
+**Description**
+
+Configuration index, which is used to select the configuration.
+
+
+### bDescriptorType
+
+
+```
+uint8_t UsbConfigDescriptor::bDescriptorType
+```
+
+**Description**
+
+Descriptor type.
+
+
+### bLength
+
+
+```
+uint8_t UsbConfigDescriptor::bLength
+```
+
+**Description**
+
+Size of the descriptor, in bytes.
+
+
+### bmAttributes
+
+
+```
+uint8_t UsbConfigDescriptor::bmAttributes
+```
+
+**Description**
+
+Configuration attributes, including the power mode and remote wakeup.
+
+
+### bMaxPower
+
+
+```
+uint8_t UsbConfigDescriptor::bMaxPower
+```
+
+**Description**
+
+Maximum power consumption of the bus-powered USB device, in 2 mA.
+
+
+### bNumInterfaces
+
+
+```
+uint8_t UsbConfigDescriptor::bNumInterfaces
+```
+
+**Description**
+
+Number of interfaces supported by the configuration.
+
+
+### iConfiguration
+
+
+```
+uint8_t UsbConfigDescriptor::iConfiguration
+```
+
+**Description**
+
+Index of the string descriptor that describes the configuration.
+
+
+### wTotalLength
+
+
+```
+uint16_t UsbConfigDescriptor::wTotalLength
+```
+
+**Description**
+
+Total length of the configuration descriptor, including the configuration, interface, endpoint, and class- or vendor-specific descriptors.
diff --git a/en/application-dev/reference/native-apis/_usb_control_request_setup.md b/en/application-dev/reference/native-apis/_usb_control_request_setup.md
new file mode 100644
index 0000000000000000000000000000000000000000..84277932fa8f813b3127b2f416595ded5449a4a4
--- /dev/null
+++ b/en/application-dev/reference/native-apis/_usb_control_request_setup.md
@@ -0,0 +1,91 @@
+# UsbControlRequestSetup
+
+
+## Overview
+
+Defines the setup data for control transfer, which corresponds to Setup Data in the USB protocol.
+
+**Since**
+
+10
+
+**Related Modules**
+
+[UsbDdk](_usb_ddk.md)
+
+
+## Summary
+
+
+### Member Variables
+
+| Name| Description|
+| -------- | -------- |
+| [bmRequestType](#bmrequesttype) | Request type.|
+| [bRequest](#brequest) | Specific request.|
+| [wValue](#wvalue) | Value corresponding to **wValue** in the USB protocol. Its meaning varies according to the request.|
+| [wIndex](#windex) | Index corresponding to **wIndex** in the USB protocol. It is usually used to transfer the index or offset. Its meaning varies according to the request. |
+| [wLength](#wlength) | Data length corresponding to **wLength** in the USB protocol. If data is transferred, this field indicates the number of transferred bytes.|
+
+
+## Member Variable Description
+
+
+### wIndex
+
+
+```
+uint16_t UsbControlRequestSetup::wIndex
+```
+
+**Description**
+
+Index corresponding to **wIndex** in the USB protocol. It is usually used to transfer the index or offset. Its meaning varies according to the request.
+
+
+### wLength
+
+
+```
+uint16_t UsbControlRequestSetup::wLength
+```
+
+**Description**
+
+Data length corresponding to **wLength** in the USB protocol. If data is transferred, this field indicates the number of transferred bytes.
+
+
+### bRequest
+
+
+```
+uint8_t UsbControlRequestSetup::bRequest
+```
+
+**Description**
+
+Specific request.
+
+
+### bmRequestType
+
+
+```
+uint8_t UsbControlRequestSetup::bmRequestType
+```
+
+**Description**
+
+Request type.
+
+
+### wValue
+
+
+```
+uint16_t UsbControlRequestSetup::wValue
+```
+
+**Description**
+
+Value corresponding to **wValue** in the USB protocol. Its meaning varies according to the request.
diff --git a/en/application-dev/reference/native-apis/_usb_ddk.md b/en/application-dev/reference/native-apis/_usb_ddk.md
new file mode 100644
index 0000000000000000000000000000000000000000..1fa6721f4cc8acc4e7db23e38384ff3579c5a840
--- /dev/null
+++ b/en/application-dev/reference/native-apis/_usb_ddk.md
@@ -0,0 +1,472 @@
+# UsbDdk
+
+
+## Overview
+
+Provides USB DDK APIs to open and close USB interfaces, perform non-isochronous and isochronous data transfer over USB pipes, and implement control transfer and interrupt transfer, etc.
+
+\@syscap SystemCapability.Driver.USB.Extension
+
+**Since**
+
+10
+
+
+## Summary
+
+
+### File
+
+| Name| Description|
+| -------- | -------- |
+| [usb_ddk_api.h](usb__ddk__api_8h.md) | Declares the USB DDK APIs used by the USB host to access USB devices.
File to include: <usb/usb_ddk_api.h>|
+| [usb_ddk_types.h](usb__ddk__types_8h.md) | Provides the enumerated variables, structures, and macros used in USB DDK APIs.
File to include: <usb/usb_ddk_types.h> |
+
+
+### Structs
+
+| Name| Description|
+| -------- | -------- |
+| [UsbControlRequestSetup](_usb_control_request_setup.md) | Setup data for control transfer. It corresponds to **Setup Data** in the USB protocol.|
+| [UsbDeviceDescriptor](_usb_device_descriptor.md) | Standard device descriptor, corresponding to **Standard Device Descriptor** in the USB protocol.|
+| [UsbConfigDescriptor](_usb_config_descriptor.md) | Standard configuration descriptor, corresponding to **Standard Configuration Descriptor** in the USB protocol.|
+| [UsbInterfaceDescriptor](_usb_interface_descriptor.md) | Standard interface descriptor, corresponding to **Standard Interface Descriptor** in the USB protocol.|
+| [UsbEndpointDescriptor](_usb_endpoint_descriptor.md) | Standard endpoint descriptor, corresponding to **Standard Endpoint Descriptor** in the USB protocol.|
+| [UsbDdkEndpointDescriptor](_usb_ddk_endpoint_descriptor.md) | Endpoint descriptor.|
+| [UsbDdkInterfaceDescriptor](_usb_ddk_interface_descriptor.md) | Interface descriptor.|
+| [UsbDdkInterface](_usb_ddk_interface.md) | USB DDK interface, which is a collection of alternate settings for a particular USB interface.|
+| [UsbDdkConfigDescriptor](_usb_ddk_config_descriptor.md) | Configuration descriptor.|
+| [UsbRequestPipe](_usb_request_pipe.md) | Request pipe.|
+| [UsbDeviceMemMap](_usb_device_mem_map.md) | Device memory map created by calling [OH_Usb_CreateDeviceMemMap()](#oh_usb_createdevicememmap). A buffer using the device memory map can provide better performance.|
+
+
+### Types
+
+| Name| Description|
+| -------- | -------- |
+| [UsbDdkEndpointDescriptor](#usbddkendpointdescriptor) | Endpoint descriptor.|
+| [UsbDdkInterfaceDescriptor](#usbddkinterfacedescriptor) | Interface descriptor.|
+| [UsbDdkInterface](#usbddkinterface) | USB DDK interface, which is a collection of alternate settings for a particular USB interface.|
+| [UsbDdkConfigDescriptor](#usbddkconfigdescriptor) | Configuration descriptor.|
+| [UsbDeviceMemMap](#usbdevicememmap) | Device memory map created by calling [OH_Usb_CreateDeviceMemMap()](#oh_usb_createdevicememmap). A buffer using the device memory map can provide better performance.|
+
+
+### Enums
+
+| Name| Description|
+| -------- | -------- |
+| [UsbDdkErrCode](#usbddkerrcode) {
USB_DDK_SUCCESS = 0, USB_DDK_FAILED = -1, USB_DDK_INVALID_PARAMETER = -2, USB_DDK_MEMORY_ERROR = -3,
USB_DDK_INVALID_OPERATION = -4, USB_DDK_NULL_PTR = -5, USB_DDK_DEVICE_BUSY = -6, USB_DDK_TIMEOUT = -7
} | USB DDK error code definitions.|
+
+
+### Functions
+
+| Name| Description|
+| -------- | -------- |
+| [OH_Usb_Init](#oh_usb_init) (void) | Initializes the DDK.|
+| [OH_Usb_Release](#oh_usb_release) (void) | Releases the DDK.|
+| [OH_Usb_GetDeviceDescriptor](#oh_usb_getdevicedescriptor) (uint64_t deviceId, struct [UsbDeviceDescriptor](_usb_device_descriptor.md) \*desc) | Obtains the device descriptor.|
+| [OH_Usb_GetConfigDescriptor](#oh_usb_getconfigdescriptor) (uint64_t deviceId, uint8_t configIndex, struct [UsbDdkConfigDescriptor](_usb_ddk_config_descriptor.md) \*\*const config) | Obtains the configuration descriptor. To avoid memory leakage, use **OH_Usb_FreeConfigDescriptor** to release a descriptor after use.|
+| [OH_Usb_FreeConfigDescriptor](#oh_usb_freeconfigdescriptor) (const struct [UsbDdkConfigDescriptor](_usb_ddk_config_descriptor.md) \*const config) | Releases the configuration descriptor. To avoid memory leakage, release a descriptor after use.|
+| [OH_Usb_ClaimInterface](#oh_usb_claiminterface) (uint64_t deviceId, uint8_t interfaceIndex, uint64_t \*[interfaceHandle](usb__ddk__types_8h.md#interfacehandle)) | Declares a USB interface.|
+| [OH_Usb_ReleaseInterface](#oh_usb_releaseinterface) (uint64_t [interfaceHandle](usb__ddk__types_8h.md#interfacehandle)) | Releases a USB interface.|
+| [OH_Usb_SelectInterfaceSetting](#oh_usb_selectinterfacesetting) (uint64_t [interfaceHandle](usb__ddk__types_8h.md#interfacehandle), uint8_t settingIndex) | Activates the alternate setting of a USB interface.|
+| [OH_Usb_GetCurrentInterfaceSetting](#oh_usb_getcurrentinterfacesetting) (uint64_t [interfaceHandle](usb__ddk__types_8h.md#interfacehandle), uint8_t \*settingIndex) | Obtains the activated alternate setting of a USB interface.|
+| [OH_Usb_SendControlReadRequest](#oh_usb_sendcontrolreadrequest) (uint64_t [interfaceHandle](usb__ddk__types_8h.md#interfacehandle), const struct [UsbControlRequestSetup](_usb_control_request_setup.md) \*setup, uint32_t [timeout](usb__ddk__types_8h.md#timeout), uint8_t \*data, uint32_t \*dataLen) | Sends a control read transfer request. This API works in a synchronous manner.|
+| [OH_Usb_SendControlWriteRequest](#oh_usb_sendcontrolwriterequest) (uint64_t [interfaceHandle](usb__ddk__types_8h.md#interfacehandle), const struct [UsbControlRequestSetup](_usb_control_request_setup.md) \*setup, uint32_t [timeout](usb__ddk__types_8h.md#timeout), const uint8_t \*data, uint32_t dataLen) | Sends a control write transfer request. This API works in a synchronous manner.|
+| [OH_Usb_SendPipeRequest](#oh_usb_sendpiperequest) (const struct [UsbRequestPipe](_usb_request_pipe.md) \*pipe, [UsbDeviceMemMap](_usb_device_mem_map.md) \*devMmap) | Sends a pipe request. This API works in a synchronous manner. It applies to interrupt transfer and bulk transfer.|
+| [OH_Usb_CreateDeviceMemMap](#oh_usb_createdevicememmap) (uint64_t deviceId, size_t size, [UsbDeviceMemMap](_usb_device_mem_map.md) \*\*devMmap) | Creates a buffer. To avoid memory leakage, use [OH_Usb_DestroyDeviceMemMap()](#oh_usb_destroydevicememmap) to destroy a buffer after use.|
+| [OH_Usb_DestroyDeviceMemMap](#oh_usb_destroydevicememmap) ([UsbDeviceMemMap](_usb_device_mem_map.md) \*devMmap) | Destroys a buffer. To avoid resource leakage, destroy a buffer in time after use.|
+
+
+## Type Description
+
+
+### UsbDdkConfigDescriptor
+
+
+```
+typedef struct UsbDdkConfigDescriptor UsbDdkConfigDescriptor
+```
+
+**Description**
+
+Configuration descriptor.
+
+
+### UsbDdkEndpointDescriptor
+
+
+```
+typedef struct UsbDdkEndpointDescriptor UsbDdkEndpointDescriptor
+```
+
+**Description**
+
+Endpoint descriptor.
+
+
+### UsbDdkInterface
+
+
+```
+typedef struct UsbDdkInterface UsbDdkInterface
+```
+
+**Description**
+
+USB DDK interface, which is a collection of alternate settings for a particular USB interface.
+
+
+### UsbDdkInterfaceDescriptor
+
+
+```
+typedef struct UsbDdkInterfaceDescriptor UsbDdkInterfaceDescriptor
+```
+
+**Description**
+
+Interface descriptor.
+
+
+### UsbDeviceMemMap
+
+
+```
+typedef struct UsbDeviceMemMap UsbDeviceMemMap
+```
+
+**Description**
+
+Device memory map created by calling [OH_Usb_CreateDeviceMemMap()](#oh_usb_createdevicememmap). A buffer using the device memory map can provide better performance.
+
+
+## Enum Description
+
+
+### UsbDdkErrCode
+
+
+```
+enum UsbDdkErrCode
+```
+
+**Description**
+
+USB DDK error code definitions.
+
+| Value| Description|
+| -------- | -------- |
+| USB_DDK_SUCCESS | Operation successful.|
+| USB_DDK_FAILED | Operation failed.|
+| USB_DDK_INVALID_PARAMETER | Invalid parameter.|
+| USB_DDK_MEMORY_ERROR | Memory-related error, for example, insufficient memory, memory data copy failure, or memory application failure.|
+| USB_DDK_INVALID_OPERATION | Invalid operation.|
+| USB_DDK_NULL_PTR | Null pointer.|
+| USB_DDK_DEVICE_BUSY | Device busy.|
+| USB_DDK_TIMEOUT | Transfer timed out.|
+
+
+## Function Description
+
+
+### OH_Usb_ClaimInterface()
+
+
+```
+int32_t OH_Usb_ClaimInterface (uint64_t deviceId, uint8_t interfaceIndex, uint64_t * interfaceHandle )
+```
+
+**Description**
+
+Declares a USB interface.
+
+**Parameters**
+
+| Name| Description|
+| -------- | -------- |
+| deviceId | Device ID.|
+| interfaceIndex | Interface index, which corresponds to [bInterfaceNumber](_usb_interface_descriptor.md#binterfacenumber) in the USB protocol.|
+| interfaceHandle | Interface operation handle. After the interface is claimed successfully, a value will be assigned to this parameter.|
+
+**Returns**
+
+**0** if the operation is successful; a negative value otherwise.
+
+
+### OH_Usb_CreateDeviceMemMap()
+
+
+```
+int32_t OH_Usb_CreateDeviceMemMap (uint64_t deviceId, size_t size, UsbDeviceMemMap ** devMmap )
+```
+
+**Description**
+
+Creates a buffer. To avoid memory leakage, use [OH_Usb_DestroyDeviceMemMap()](#oh_usb_destroydevicememmap) to destroy a buffer after use.
+
+**Parameters**
+
+| Name| Description|
+| -------- | -------- |
+| deviceId | Device ID.|
+| size | Buffer size.|
+| devMmap | Data memory map, through which the created buffer is returned to the caller.|
+
+**Returns**
+
+**0** if the operation is successful; a negative value otherwise.
+
+
+### OH_Usb_DestroyDeviceMemMap()
+
+
+```
+void OH_Usb_DestroyDeviceMemMap (UsbDeviceMemMap * devMmap)
+```
+
+**Description**
+
+Destroys a buffer. To avoid resource leakage, destroy a buffer in time after use.
+
+**Parameters**
+
+| Name| Description|
+| -------- | -------- |
+| devMmap | Destroys the buffer created by [OH_Usb_CreateDeviceMemMap()](#oh_usb_createdevicememmap).|
+
+
+### OH_Usb_FreeConfigDescriptor()
+
+
+```
+void OH_Usb_FreeConfigDescriptor (const struct UsbDdkConfigDescriptor *const config)
+```
+
+**Description**
+
+Releases the configuration descriptor. To avoid memory leakage, use **OH_Usb_FreeConfigDescriptor** to release a descriptor after use.
+
+**Parameters**
+
+| Name| Description|
+| -------- | -------- |
+| config | Configuration descriptor obtained by calling [OH_Usb_GetConfigDescriptor()](#oh_usb_getconfigdescriptor).|
+
+
+### OH_Usb_GetConfigDescriptor()
+
+
+```
+int32_t OH_Usb_GetConfigDescriptor (uint64_t deviceId, uint8_t configIndex, struct UsbDdkConfigDescriptor **const config )
+```
+
+**Description**
+
+Obtains the configuration descriptor. To avoid memory leakage, use **OH_Usb_FreeConfigDescriptor** to release a descriptor after use.
+
+**Parameters**
+
+| Name| Description|
+| -------- | -------- |
+| deviceId | Device ID.|
+| configIndex | Configuration ID, which corresponds to [bConfigurationValue](_usb_config_descriptor.md#bconfigurationvalue) in the USB protocol.|
+| config | Configuration descriptor, which includes the standard configuration descriptor defined in the USB protocol and the associated interface descriptor and endpoint descriptor.|
+
+**Returns**
+
+**0** if the operation is successful; a negative value otherwise.
+
+
+### OH_Usb_GetCurrentInterfaceSetting()
+
+
+```
+int32_t OH_Usb_GetCurrentInterfaceSetting (uint64_t interfaceHandle, uint8_t * settingIndex )
+```
+
+**Description**
+
+Obtains the activated alternate setting of a USB interface.
+
+**Parameters**
+
+| Name| Description|
+| -------- | -------- |
+| interfaceHandle | Interface operation handle.|
+| settingIndex | Index of the alternate setting, which corresponds to [bAlternateSetting](_usb_interface_descriptor.md#balternatesetting) in the USB protocol.|
+
+**Returns**
+
+**0** if the operation is successful; a negative value otherwise.
+
+
+### OH_Usb_GetDeviceDescriptor()
+
+
+```
+int32_t OH_Usb_GetDeviceDescriptor (uint64_t deviceId, struct UsbDeviceDescriptor * desc )
+```
+
+**Description**
+
+Obtains the device descriptor.
+
+**Parameters**
+
+| Name| Description|
+| -------- | -------- |
+| deviceId | Device ID.|
+| desc | Device descriptor. For details, see [UsbDeviceDescriptor](_usb_device_descriptor.md).|
+
+**Returns**
+
+**0** if the operation is successful; a negative value otherwise.
+
+
+### OH_Usb_Init()
+
+
+```
+int32_t OH_Usb_Init (void )
+```
+
+**Description**
+
+Initializes the DDK.
+
+**Returns**
+
+**0** if the operation is successful; a negative value otherwise.
+
+
+### OH_Usb_Release()
+
+
+```
+void OH_Usb_Release (void )
+```
+
+**Description**
+
+Releases the DDK.
+
+
+### OH_Usb_ReleaseInterface()
+
+
+```
+int32_t OH_Usb_ReleaseInterface (uint64_t interfaceHandle)
+```
+
+**Description**
+
+Releases a USB interface.
+
+**Parameters**
+
+| Name| Description|
+| -------- | -------- |
+| interfaceHandle | Interface operation handle.|
+
+**Returns**
+
+**0** if the operation is successful; a negative value otherwise.
+
+
+### OH_Usb_SelectInterfaceSetting()
+
+
+```
+int32_t OH_Usb_SelectInterfaceSetting (uint64_t interfaceHandle, uint8_t settingIndex )
+```
+
+**Description**
+
+Activates the alternate setting of a USB interface.
+
+**Parameters**
+
+| Name| Description|
+| -------- | -------- |
+| interfaceHandle | Interface operation handle.|
+| settingIndex | Index of the alternate setting, which corresponds to [bAlternateSetting](_usb_interface_descriptor.md#balternatesetting) in the USB protocol.|
+
+**Returns**
+
+**0** if the operation is successful; a negative value otherwise.
+
+
+### OH_Usb_SendControlReadRequest()
+
+
+```
+int32_t OH_Usb_SendControlReadRequest (uint64_t interfaceHandle, const struct UsbControlRequestSetup * setup, uint32_t timeout, uint8_t * data, uint32_t * dataLen )
+```
+
+**Description**
+
+Sends a control read transfer request. This API works in a synchronous manner.
+
+**Parameters**
+
+| Name| Description|
+| -------- | -------- |
+| interfaceHandle | Interface operation handle.|
+| setup | Request parameters. For details, see [UsbControlRequestSetup](_usb_control_request_setup.md).|
+| timeout | Timeout duration, in milliseconds.|
+| data | Data to be transferred.|
+| dataLen | Data length. The return value indicates the length of the actually read data.|
+
+**Returns**
+
+**0** if the operation is successful; a negative value otherwise.
+
+
+### OH_Usb_SendControlWriteRequest()
+
+
+```
+int32_t OH_Usb_SendControlWriteRequest (uint64_t interfaceHandle, const struct UsbControlRequestSetup * setup, uint32_t timeout, const uint8_t * data, uint32_t dataLen )
+```
+
+**Description**
+
+Sends a control write transfer request. This API works in a synchronous manner.
+
+**Parameters**
+
+| Name| Description|
+| -------- | -------- |
+| interfaceHandle | Interface operation handle.|
+| setup | Request parameters. For details, see [UsbControlRequestSetup](_usb_control_request_setup.md).|
+| timeout | Timeout duration, in milliseconds.|
+| data | Data to be transferred.|
+| dataLen | Data length.|
+
+**Returns**
+
+**0** if the operation is successful; a negative value otherwise.
+
+
+### OH_Usb_SendPipeRequest()
+
+
+```
+int32_t OH_Usb_SendPipeRequest (const struct UsbRequestPipe * pipe, UsbDeviceMemMap * devMmap )
+```
+
+**Description**
+
+Sends a pipe request. This API works in a synchronous manner. It applies to interrupt transfer and bulk transfer.
+
+**Parameters**
+
+| Name| Description|
+| -------- | -------- |
+| pipe | Pipe used to transfer data.|
+| devMmap | Device memory map, which can be obtained by calling [OH_Usb_CreateDeviceMemMap()](#oh_usb_createdevicememmap).|
+
+**Returns**
+
+**0** if the operation is successful; a negative value otherwise.
diff --git a/en/application-dev/reference/native-apis/_usb_ddk_config_descriptor.md b/en/application-dev/reference/native-apis/_usb_ddk_config_descriptor.md
new file mode 100644
index 0000000000000000000000000000000000000000..bfaecd425c45b53eef5dd8968bf16372024230a2
--- /dev/null
+++ b/en/application-dev/reference/native-apis/_usb_ddk_config_descriptor.md
@@ -0,0 +1,78 @@
+# UsbDdkConfigDescriptor
+
+
+## Overview
+
+Defines configuration descriptors.
+
+**Since**
+
+10
+
+**Related Modules**
+
+[UsbDdk](_usb_ddk.md)
+
+
+## Summary
+
+
+### Member Variables
+
+| Name| Description|
+| -------- | -------- |
+| [configDescriptor](#configdescriptor) | Standard configuration descriptor.|
+| [interface](#interface) | Interfaces contained in the configuration.|
+| [extra](#extra) | Unresolved descriptor, including class- or vendor-specific descriptors.|
+| [extraLength](#extralength) | Length of the unresolved descriptor.|
+
+
+## Member Variable Description
+
+
+### configDescriptor
+
+
+```
+struct UsbConfigDescriptor UsbDdkConfigDescriptor::configDescriptor
+```
+
+**Description**
+
+Standard configuration descriptor.
+
+
+### extra
+
+
+```
+uint8_t* UsbDdkConfigDescriptor::extra
+```
+
+**Description**
+
+Unresolved descriptor, including class- or vendor-specific descriptors.
+
+
+### extraLength
+
+
+```
+uint32_t UsbDdkConfigDescriptor::extraLength
+```
+
+**Description**
+
+Length of the unresolved descriptor.
+
+
+### interface
+
+
+```
+struct UsbDdkInterface* UsbDdkConfigDescriptor::interface
+```
+
+**Description**
+
+Interfaces contained in the configuration.
diff --git a/en/application-dev/reference/native-apis/_usb_ddk_endpoint_descriptor.md b/en/application-dev/reference/native-apis/_usb_ddk_endpoint_descriptor.md
new file mode 100644
index 0000000000000000000000000000000000000000..243b7c06e4b2b9a45176695963beecadfc863ce3
--- /dev/null
+++ b/en/application-dev/reference/native-apis/_usb_ddk_endpoint_descriptor.md
@@ -0,0 +1,65 @@
+# UsbDdkEndpointDescriptor
+
+
+## Overview
+
+Defines endpoint descriptors.
+
+**Since**
+
+10
+
+**Related Modules**
+
+[UsbDdk](_usb_ddk.md)
+
+
+## Summary
+
+
+### Member Variables
+
+| Name| Description|
+| -------- | -------- |
+| [endpointDescriptor](#endpointdescriptor) | Standard endpoint descriptor.|
+| [extra](#extra) | Unresolved descriptor, including class- or vendor-specific descriptors.|
+| [extraLength](#extralength) | Length of the unresolved descriptor.|
+
+
+## Member Variable Description
+
+
+### endpointDescriptor
+
+
+```
+struct UsbEndpointDescriptor UsbDdkEndpointDescriptor::endpointDescriptor
+```
+
+**Description**
+
+Standard endpoint descriptor.
+
+
+### extra
+
+
+```
+uint8_t* UsbDdkEndpointDescriptor::extra
+```
+
+**Description**
+
+Unresolved descriptor, including class- or vendor-specific descriptors.
+
+
+### extraLength
+
+
+```
+uint32_t UsbDdkEndpointDescriptor::extraLength
+```
+
+**Description**
+
+Length of the unresolved descriptor.
diff --git a/en/application-dev/reference/native-apis/_usb_ddk_interface.md b/en/application-dev/reference/native-apis/_usb_ddk_interface.md
new file mode 100644
index 0000000000000000000000000000000000000000..be24c7a9d80eb52d12c74ae1a27b4d3985db0bac
--- /dev/null
+++ b/en/application-dev/reference/native-apis/_usb_ddk_interface.md
@@ -0,0 +1,52 @@
+# UsbDdkInterface
+
+
+## Overview
+
+Defines a USB DDK interface, which is a collection of alternate settings for a particular USB interface.
+
+**Since**
+
+10
+
+**Related Modules**
+
+[UsbDdk](_usb_ddk.md)
+
+
+## Summary
+
+
+### Member Variables
+
+| Name| Description|
+| -------- | -------- |
+| [numAltsetting](#numaltsetting) | Number of alternate settings of the interface.|
+| [altsetting](#altsetting) | Alternate setting of the interface.|
+
+
+## Member Variable Description
+
+
+### altsetting
+
+
+```
+struct UsbDdkInterfaceDescriptor* UsbDdkInterface::altsetting
+```
+
+**Description**
+
+Alternate setting of the interface.
+
+
+### numAltsetting
+
+
+```
+uint8_t UsbDdkInterface::numAltsetting
+```
+
+**Description**
+
+Number of alternate settings of the interface.
diff --git a/en/application-dev/reference/native-apis/_usb_ddk_interface_descriptor.md b/en/application-dev/reference/native-apis/_usb_ddk_interface_descriptor.md
new file mode 100644
index 0000000000000000000000000000000000000000..c3ecc8992d41adbb133e22430ec6b06c4a6dcd84
--- /dev/null
+++ b/en/application-dev/reference/native-apis/_usb_ddk_interface_descriptor.md
@@ -0,0 +1,78 @@
+# UsbDdkInterfaceDescriptor
+
+
+## Overview
+
+Defines interface descriptors.
+
+**Since**
+
+10
+
+**Related Modules**
+
+[UsbDdk](_usb_ddk.md)
+
+
+## Summary
+
+
+### Member Variables
+
+| Name| Description|
+| -------- | -------- |
+| [interfaceDescriptor](#interfacedescriptor) | Standard interface descriptor.|
+| [endPoint](#endpoint) | Endpoint descriptor contained in the interface.|
+| [extra](#extra) | Unresolved descriptor, including class- or vendor-specific descriptors.|
+| [extraLength](#extralength) | Length of the unresolved descriptor.|
+
+
+## Member Variable Description
+
+
+### endPoint
+
+
+```
+struct UsbDdkEndpointDescriptor* UsbDdkInterfaceDescriptor::endPoint
+```
+
+**Description**
+
+Endpoint descriptor contained in the interface.
+
+
+### extra
+
+
+```
+uint8_t* UsbDdkInterfaceDescriptor::extra
+```
+
+**Description**
+
+Unresolved descriptor, including class- or vendor-specific descriptors.
+
+
+### extraLength
+
+
+```
+uint32_t UsbDdkInterfaceDescriptor::extraLength
+```
+
+**Description**
+
+Length of the unresolved descriptor.
+
+
+### interfaceDescriptor
+
+
+```
+struct UsbInterfaceDescriptor UsbDdkInterfaceDescriptor::interfaceDescriptor
+```
+
+**Description**
+
+Standard interface descriptor.
diff --git a/en/application-dev/reference/native-apis/_usb_device_descriptor.md b/en/application-dev/reference/native-apis/_usb_device_descriptor.md
new file mode 100644
index 0000000000000000000000000000000000000000..a998d2a7fd180e2a2c9f9acd88133134d727c826
--- /dev/null
+++ b/en/application-dev/reference/native-apis/_usb_device_descriptor.md
@@ -0,0 +1,208 @@
+# UsbDeviceDescriptor
+
+
+## Overview
+
+Defines standard device descriptors, which correspond to **Standard Device Descriptor** in the USB protocol.
+
+**Since**
+
+10
+
+**Related Modules**
+
+[UsbDdk](_usb_ddk.md)
+
+
+## Summary
+
+
+### Member Variables
+
+| Name| Description|
+| -------- | -------- |
+| [bLength](#blength) | Size of the descriptor, in bytes.|
+| [bDescriptorType](#bdescriptortype) | Descriptor type.|
+| [bcdUSB](#bcdusb) | USB protocol release number.|
+| [bDeviceClass](#bdeviceclass) | Interface class code allocated by the USB-IF.|
+| [bDeviceSubClass](#bdevicesubclass) | Device subclass code allocated by USB-IF. The value is limited by that of bDeviceClass.|
+| [bDeviceProtocol](#bdeviceprotocol) | Protocol code allocated by USB-IF. The value is limited by that of [bDeviceClass](#bdeviceclass) and [bDeviceSubClass](#bdevicesubclass).|
+| [bMaxPacketSize0](#bmaxpacketsize0) | Maximum packet size of endpoint 0. Only values 8, 16, 32, and 64 are valid.|
+| [idVendor](#idvendor) | Vendor ID allocated by USB-IF.|
+| [idProduct](#idproduct) | Product ID allocated by the vendor.|
+| [bcdDevice](#bcddevice) | Device release number.|
+| [iManufacturer](#imanufacturer) | Index of the string descriptor that describes the vendor.|
+| [iProduct](#iproduct) | Index of the string descriptor that describes the product.|
+| [iSerialNumber](#iserialnumber) | Index of the string descriptor that describes the device SN.|
+| [bNumConfigurations](#bnumconfigurations) | Configuration quantity.|
+
+
+## Member Variable Description
+
+
+### bcdDevice
+
+
+```
+uint16_t UsbDeviceDescriptor::bcdDevice
+```
+
+**Description**
+
+Device release number.
+
+
+### bcdUSB
+
+
+```
+uint16_t UsbDeviceDescriptor::bcdUSB
+```
+
+**Description**
+
+USB protocol release number.
+
+
+### bDescriptorType
+
+
+```
+uint8_t UsbDeviceDescriptor::bDescriptorType
+```
+
+**Description**
+
+Descriptor type.
+
+
+### bDeviceClass
+
+
+```
+uint8_t UsbDeviceDescriptor::bDeviceClass
+```
+
+**Description**
+
+Interface class code allocated by the USB-IF.
+
+
+### bDeviceProtocol
+
+
+```
+uint8_t UsbDeviceDescriptor::bDeviceProtocol
+```
+
+**Description**
+
+Protocol code allocated by USB-IF. The value is limited by that of [bDeviceClass](#bdeviceclass) and [bDeviceSubClass](#bdevicesubclass).
+
+
+### bDeviceSubClass
+
+
+```
+uint8_t UsbDeviceDescriptor::bDeviceSubClass
+```
+
+**Description**
+
+Device subclass code allocated by USB-IF. The value is limited by that of bDeviceClass.
+
+
+### bLength
+
+
+```
+uint8_t UsbDeviceDescriptor::bLength
+```
+
+**Description**
+
+Size of the descriptor, in bytes.
+
+
+### bMaxPacketSize0
+
+
+```
+uint8_t UsbDeviceDescriptor::bMaxPacketSize0
+```
+
+**Description**
+
+Maximum packet size of endpoint 0. Only values 8, 16, 32, and 64 are valid.
+
+
+### bNumConfigurations
+
+
+```
+uint8_t UsbDeviceDescriptor::bNumConfigurations
+```
+
+**Description**
+
+Configuration quantity.
+
+
+### idProduct
+
+
+```
+uint16_t UsbDeviceDescriptor::idProduct
+```
+
+**Description**
+
+Product ID allocated by the vendor.
+
+
+### idVendor
+
+
+```
+uint16_t UsbDeviceDescriptor::idVendor
+```
+
+**Description**
+
+Vendor ID allocated by USB-IF.
+
+
+### iManufacturer
+
+
+```
+uint8_t UsbDeviceDescriptor::iManufacturer
+```
+
+**Description**
+
+Index of the string descriptor that describes the vendor.
+
+
+### iProduct
+
+
+```
+uint8_t UsbDeviceDescriptor::iProduct
+```
+
+**Description**
+
+Index of the string descriptor that describes the product.
+
+
+### iSerialNumber
+
+
+```
+uint8_t UsbDeviceDescriptor::iSerialNumber
+```
+
+**Description**
+
+Index of the string descriptor that describes the device SN.
diff --git a/en/application-dev/reference/native-apis/_usb_device_mem_map.md b/en/application-dev/reference/native-apis/_usb_device_mem_map.md
new file mode 100644
index 0000000000000000000000000000000000000000..1b26f2631efe02cedfc4281b86bda8a09fac8c22
--- /dev/null
+++ b/en/application-dev/reference/native-apis/_usb_device_mem_map.md
@@ -0,0 +1,91 @@
+# UsbDeviceMemMap
+
+
+## Overview
+
+Device memory map created by calling [OH_Usb_CreateDeviceMemMap()](_usb_ddk.md#oh_usb_createdevicememmap). A buffer using the device memory map can provide better performance.
+
+**Since**
+
+10
+
+**Related Modules**
+
+[UsbDdk](_usb_ddk.md)
+
+
+## Summary
+
+
+### Member Variables
+
+| Name| Description|
+| -------- | -------- |
+| [address](#address) | Buffer address.|
+| [size](#size) | Buffer size.|
+| [offset](#offset) | Offset of the used buffer. The default value is 0, indicating that there is no offset and the buffer starts from the specified address.|
+| [bufferLength](#bufferlength) | Length of the used buffer. By default, the value is equal to the size, indicating that the entire buffer is used.|
+| [transferedLength](#transferedlength) | Length of the transferred data.|
+
+
+## Member Variable Description
+
+
+### address
+
+
+```
+uint8_t* const UsbDeviceMemMap::address
+```
+
+**Description**
+
+ Buffer address.
+
+
+### bufferLength
+
+
+```
+uint32_t UsbDeviceMemMap::bufferLength
+```
+
+**Description**
+
+Length of the used buffer. By default, the value is equal to the size, indicating that the entire buffer is used.
+
+
+### offset
+
+
+```
+uint32_t UsbDeviceMemMap::offset
+```
+
+**Description**
+
+Offset of the used buffer. The default value is 0, indicating that there is no offset and the buffer starts from the specified address.
+
+
+### size
+
+
+```
+const size_t UsbDeviceMemMap::size
+```
+
+**Description**
+
+Buffer size.
+
+
+### transferedLength
+
+
+```
+uint32_t UsbDeviceMemMap::transferedLength
+```
+
+**Description**
+
+Length of the transferred data.
diff --git a/en/application-dev/reference/native-apis/_usb_endpoint_descriptor.md b/en/application-dev/reference/native-apis/_usb_endpoint_descriptor.md
new file mode 100644
index 0000000000000000000000000000000000000000..30171e2038fe3b7539dd7582a157670055f51071
--- /dev/null
+++ b/en/application-dev/reference/native-apis/_usb_endpoint_descriptor.md
@@ -0,0 +1,130 @@
+# UsbEndpointDescriptor
+
+
+## Overview
+
+Defines standard endpoint descriptors, which correspond to **Standard Endpoint Descriptor** in the USB protocol.
+
+**Since**
+
+10
+
+**Related Modules**
+
+[UsbDdk](_usb_ddk.md)
+
+
+## Summary
+
+
+### Member Variables
+
+| Name| Description|
+| -------- | -------- |
+| [bLength](#blength) | Size of the descriptor, in bytes.|
+| [bDescriptorType](#bdescriptortype) | Descriptor type.|
+| [bEndpointAddress](#bendpointaddress) | Endpoint address, including the endpoint number and endpoint direction.|
+| [bmAttributes](#bmattributes) | Endpoint attributes, including the transfer type, synchronization type, and usage type.|
+| [wMaxPacketSize](#wmaxpacketsize) | Maximum packet size supported by an endpoint.|
+| [bInterval](#binterval) | Interval for polling endpoints for data transfer.|
+| [bRefresh](#brefresh) | Refresh rate for audio devices.|
+| [bSynchAddress](#bsynchaddress) | Endpoint synchronization address for audio devices.|
+
+
+## Member Variable Description
+
+
+### bDescriptorType
+
+
+```
+uint8_t UsbEndpointDescriptor::bDescriptorType
+```
+
+**Description**
+
+Descriptor type.
+
+
+### bEndpointAddress
+
+
+```
+uint8_t UsbEndpointDescriptor::bEndpointAddress
+```
+
+**Description**
+
+Endpoint address, including the endpoint number and endpoint direction.
+
+
+### bInterval
+
+
+```
+uint8_t UsbEndpointDescriptor::bInterval
+```
+
+**Description**
+
+Interval for polling endpoints for data transfer.
+
+
+### bLength
+
+
+```
+uint8_t UsbEndpointDescriptor::bLength
+```
+
+**Description**
+
+Size of the descriptor, in bytes.
+
+
+### bmAttributes
+
+
+```
+uint8_t UsbEndpointDescriptor::bmAttributes
+```
+
+**Description**
+
+Endpoint attributes, including the transfer type, synchronization type, and usage type.
+
+
+### bRefresh
+
+
+```
+uint8_t UsbEndpointDescriptor::bRefresh
+```
+
+**Description**
+
+Refresh rate for audio devices.
+
+
+### bSynchAddress
+
+
+```
+uint8_t UsbEndpointDescriptor::bSynchAddress
+```
+
+**Description**
+
+Endpoint synchronization address for audio devices.
+
+
+### wMaxPacketSize
+
+
+```
+uint16_t UsbEndpointDescriptor::wMaxPacketSize
+```
+
+**Description**
+
+Maximum packet size supported by an endpoint.
diff --git a/en/application-dev/reference/native-apis/_usb_interface_descriptor.md b/en/application-dev/reference/native-apis/_usb_interface_descriptor.md
new file mode 100644
index 0000000000000000000000000000000000000000..d960dba070b233f9b2fd0df0c3927a4e674bf08a
--- /dev/null
+++ b/en/application-dev/reference/native-apis/_usb_interface_descriptor.md
@@ -0,0 +1,143 @@
+# UsbInterfaceDescriptor
+
+
+## Overview
+
+Defines standard interface descriptors, which correspond to **Standard Interface Descriptor** in the USB protocol.
+
+**Since**
+
+10
+
+**Related Modules**
+
+[UsbDdk](_usb_ddk.md)
+
+
+## Summary
+
+
+### Member Variables
+
+| Name| Description|
+| -------- | -------- |
+| [bLength](#blength) | Size of the descriptor, in bytes.|
+| [bDescriptorType](#bdescriptortype) | Descriptor type.|
+| [bInterfaceNumber](#binterfacenumber) | Interface ID.|
+| [bAlternateSetting](#balternatesetting) | Value used to select the alternate setting of the interface.|
+| [bNumEndpoints](#bnumendpoints) | Number of endpoints (excluding endpoint 0) used by the interface.|
+| [bInterfaceClass](#binterfaceclass) | Interface class code allocated by the USB-IF.|
+| [bInterfaceSubClass](#binterfacesubclass) | Device subclass code allocated by USB-IF. The value is limited by that of [bInterfaceClass](#binterfaceclass).|
+| [bInterfaceProtocol](#binterfaceprotocol) | Protocol code allocated by USB-IF. The value is limited by that of [bInterfaceClass](#binterfaceclass) and [bInterfaceSubClass](#binterfacesubclass).|
+| [iInterface](#iinterface) | Index of the string descriptor that describes the interface.|
+
+
+## Member Variable Description
+
+
+### bAlternateSetting
+
+
+```
+uint8_t UsbInterfaceDescriptor::bAlternateSetting
+```
+
+**Description**
+
+Value used to select the alternate setting of the interface.
+
+
+### bDescriptorType
+
+
+```
+uint8_t UsbInterfaceDescriptor::bDescriptorType
+```
+
+**Description**
+
+Descriptor type.
+
+
+### bInterfaceClass
+
+
+```
+uint8_t UsbInterfaceDescriptor::bInterfaceClass
+```
+
+**Description**
+
+Interface class code allocated by the USB-IF.
+
+
+### bInterfaceNumber
+
+
+```
+uint8_t UsbInterfaceDescriptor::bInterfaceNumber
+```
+
+**Description**
+
+Interface ID.
+
+
+### bInterfaceProtocol
+
+
+```
+uint8_t UsbInterfaceDescriptor::bInterfaceProtocol
+```
+
+**Description**
+
+Protocol code allocated by USB-IF. The value is limited by that of [bInterfaceClass](#binterfaceclass) and [bInterfaceSubClass](#binterfacesubclass).
+
+
+### bInterfaceSubClass
+
+
+```
+uint8_t UsbInterfaceDescriptor::bInterfaceSubClass
+```
+
+**Description**
+
+Device subclass code allocated by USB-IF. The value is limited by that of [bInterfaceClass](#binterfaceclass).
+
+
+### bLength
+
+
+```
+uint8_t UsbInterfaceDescriptor::bLength
+```
+
+**Description**
+
+Size of the descriptor, in bytes.
+
+
+### bNumEndpoints
+
+
+```
+uint8_t UsbInterfaceDescriptor::bNumEndpoints
+```
+
+**Description**
+
+Number of endpoints (excluding endpoint 0) used by the interface.
+
+
+### iInterface
+
+
+```
+uint8_t UsbInterfaceDescriptor::iInterface
+```
+
+**Description**
+
+Index of the string descriptor that describes the interface.
diff --git a/en/application-dev/reference/native-apis/_usb_request_pipe.md b/en/application-dev/reference/native-apis/_usb_request_pipe.md
new file mode 100644
index 0000000000000000000000000000000000000000..636e9d2c3c7cdc7f8eee7b3e00c40692974df80c
--- /dev/null
+++ b/en/application-dev/reference/native-apis/_usb_request_pipe.md
@@ -0,0 +1,65 @@
+# UsbRequestPipe
+
+
+## Overview
+
+Defines a request pipe.
+
+**Since**
+
+10
+
+**Related Modules**
+
+[UsbDdk](_usb_ddk.md)
+
+
+## Summary
+
+
+### Member Variables
+
+| Name| Description|
+| -------- | -------- |
+| [interfaceHandle](#interfacehandle) | Interface operation handle.|
+| [endpoint](#endpoint) | Endpoint address.|
+| [timeout](#timeout) | Timeout duration, in milliseconds.|
+
+
+## Member Variable Description
+
+
+### endpoint
+
+
+```
+uint8_t UsbRequestPipe::endpoint
+```
+
+**Description**
+
+Endpoint address.
+
+
+### interfaceHandle
+
+
+```
+uint64_t UsbRequestPipe::interfaceHandle
+```
+
+**Description**
+
+Interface operation handle.
+
+
+### timeout
+
+
+```
+uint32_t UsbRequestPipe::timeout
+```
+
+**Description**
+
+Timeout duration, in milliseconds.
diff --git a/en/application-dev/reference/native-apis/trace_8h.md b/en/application-dev/reference/native-apis/trace_8h.md
new file mode 100644
index 0000000000000000000000000000000000000000..56f88fea16ea387e36b917a89e63fe7034809812
--- /dev/null
+++ b/en/application-dev/reference/native-apis/trace_8h.md
@@ -0,0 +1,76 @@
+# trace.h
+
+
+## Overview
+
+Defines APIs of the HiTraceMeter module for performance trace.
+
+Example
+
+Synchronous time slice trace event:
+
+
+```
+OH_HiTrace_StartTrace("hitraceTest");
+OH_HiTrace_FinishTrace();
+```
+
+Output:
+
+
+```
+<...>-1668 (----—) [003] .... 135.059377: tracing_mark_write: B|1668|H:hitraceTest
+<...>-1668 (----—) [003] .... 135.059415: tracing_mark_write: E|1668|
+```
+
+Asynchronous time slice trace event:
+
+
+```
+OH_HiTrace_StartAsyncTrace("hitraceTest", 123);
+OH_HiTrace_FinishAsyncTrace("hitraceTest", 123);
+```
+
+Output:
+
+
+```
+<...>-2477 (----—) [001] .... 396.427165: tracing_mark_write: S|2477|H:hitraceTest 123
+<...>-2477 (----—) [001] .... 396.427196: tracing_mark_write: F|2477|H:hitraceTest 123
+```
+
+Integer value trace event:
+
+
+```
+OH_HiTrace_CountTrace("hitraceTest", 500);
+```
+
+Output:
+
+
+```
+<...>-2638 (----—) [002] .... 458.904382: tracing_mark_write: C|2638|H:hitraceTest 500
+```
+
+**Since**
+
+10
+
+**Related Modules**
+
+[Hitrace](_hitrace.md)
+
+
+## Summary
+
+
+### Functions
+
+| Name| Description|
+| -------- | -------- |
+| [OH_HiTrace_StartTrace](_hitrace.md#oh_hitrace_starttrace) (const char \*name) | Marks the start of a synchronous trace.|
+| [OH_HiTrace_FinishTrace](_hitrace.md#oh_hitrace_finishtrace) (void) | Marks the end of a synchronous trace.|
+| [OH_HiTrace_StartAsyncTrace](_hitrace.md#oh_hitrace_startasynctrace) (const char \*name, int32_t taskId) | Marks the start of an asynchronous trace.|
+| [OH_HiTrace_FinishAsyncTrace](_hitrace.md#oh_hitrace_finishasynctrace) (const char \*name, int32_t taskId) | Marks the end of an asynchronous trace.|
+| [OH_HiTrace_CountTrace](_hitrace.md#oh_hitrace_counttrace) (const char \*name, int64_t count) | Traces the value change of an integer variable based on its name.|
diff --git a/en/application-dev/reference/native-apis/usb__ddk__api_8h.md b/en/application-dev/reference/native-apis/usb__ddk__api_8h.md
new file mode 100644
index 0000000000000000000000000000000000000000..65e6e9ae039ef08ec18cf49141acc19f9eaa048f
--- /dev/null
+++ b/en/application-dev/reference/native-apis/usb__ddk__api_8h.md
@@ -0,0 +1,37 @@
+# usb_ddk_api.h
+
+
+## Overview
+
+Declares the USB DDK APIs used by the USB host to access USB devices.
+
+**Since**
+
+10
+
+**Related Modules**
+
+[UsbDdk](_usb_ddk.md)
+
+
+## Summary
+
+
+### Functions
+
+| Name| Description|
+| -------- | -------- |
+| [OH_Usb_Init](_usb_ddk.md#oh_usb_init) (void) | Initializes the DDK.|
+| [OH_Usb_Release](_usb_ddk.md#oh_usb_release) (void) | Releases the DDK.|
+| [OH_Usb_GetDeviceDescriptor](_usb_ddk.md#oh_usb_getdevicedescriptor) (uint64_t deviceId, struct [UsbDeviceDescriptor](_usb_device_descriptor.md) \*desc) | Obtains the device descriptor.|
+| [OH_Usb_GetConfigDescriptor](_usb_ddk.md#oh_usb_getconfigdescriptor) (uint64_t deviceId, uint8_t configIndex, struct [UsbDdkConfigDescriptor](_usb_ddk_config_descriptor.md) \*\*const config) | Obtains the configuration descriptor. To avoid memory leakage, use [OH_Usb_FreeConfigDescriptor()](_usb_ddk.md#oh_usb_freeconfigdescriptor) to release a descriptor after use.|
+| [OH_Usb_FreeConfigDescriptor](_usb_ddk.md#oh_usb_freeconfigdescriptor) (const struct [UsbDdkConfigDescriptor](_usb_ddk_config_descriptor.md) \*const config) | Releases the configuration descriptor. To avoid memory leakage, release a descriptor after use.|
+| [OH_Usb_ClaimInterface](_usb_ddk.md#oh_usb_claiminterface) (uint64_t deviceId, uint8_t interfaceIndex, uint64_t \*[interfaceHandle](usb__ddk__types_8h.md#interfacehandle)) | Declares a USB interface.|
+| [OH_Usb_ReleaseInterface](_usb_ddk.md#oh_usb_releaseinterface) (uint64_t [interfaceHandle](usb__ddk__types_8h.md#interfacehandle)) | Releases a USB interface.|
+| [OH_Usb_SelectInterfaceSetting](_usb_ddk.md#oh_usb_selectinterfacesetting) (uint64_t [interfaceHandle](usb__ddk__types_8h.md#interfacehandle), uint8_t settingIndex) | Activates the alternate setting of a USB interface.|
+| [OH_Usb_GetCurrentInterfaceSetting](_usb_ddk.md#oh_usb_getcurrentinterfacesetting) (uint64_t [interfaceHandle](usb__ddk__types_8h.md#interfacehandle), uint8_t \*settingIndex) | Obtains the activated alternate setting of a USB interface.|
+| [OH_Usb_SendControlReadRequest](_usb_ddk.md#oh_usb_sendcontrolreadrequest) (uint64_t [interfaceHandle](usb__ddk__types_8h.md#interfacehandle), const struct [UsbControlRequestSetup](_usb_control_request_setup.md) \*setup, uint32_t [timeout](usb__ddk__types_8h.md#timeout), uint8_t \*data, uint32_t \*dataLen) | Sends a control read transfer request. This API works in a synchronous manner.|
+| [OH_Usb_SendControlWriteRequest](_usb_ddk.md#oh_usb_sendcontrolwriterequest) (uint64_t [interfaceHandle](usb__ddk__types_8h.md#interfacehandle), const struct [UsbControlRequestSetup](_usb_control_request_setup.md) \*setup, uint32_t [timeout](usb__ddk__types_8h.md#timeout), const uint8_t \*data, uint32_t dataLen) | Sends a control write transfer request. This API works in a synchronous manner.|
+| [OH_Usb_SendPipeRequest](_usb_ddk.md#oh_usb_sendpiperequest) (const struct [UsbRequestPipe](_usb_request_pipe.md) \*pipe, [UsbDeviceMemMap](_usb_device_mem_map.md) \*devMmap) | Sends a pipe request. This API works in a synchronous manner. It applies to interrupt transfer and bulk transfer.|
+| [OH_Usb_CreateDeviceMemMap](_usb_ddk.md#oh_usb_createdevicememmap) (uint64_t deviceId, size_t size, [UsbDeviceMemMap](_usb_device_mem_map.md) \*\*devMmap) | Creates a buffer. To avoid memory leakage, use [OH_Usb_DestroyDeviceMemMap()](_usb_ddk.md#oh_usb_destroydevicememmap) to destroy a buffer after use.|
+| [OH_Usb_DestroyDeviceMemMap](_usb_ddk.md#oh_usb_destroydevicememmap) ([UsbDeviceMemMap](_usb_device_mem_map.md) \*devMmap) | Destroys a buffer. To avoid resource leakage, destroy a buffer in time after use.|
diff --git a/en/application-dev/reference/native-apis/usb__ddk__types_8h.md b/en/application-dev/reference/native-apis/usb__ddk__types_8h.md
new file mode 100644
index 0000000000000000000000000000000000000000..94e43e22e6e65267f7c8e7f08a6789372ffa9dcf
--- /dev/null
+++ b/en/application-dev/reference/native-apis/usb__ddk__types_8h.md
@@ -0,0 +1,594 @@
+# usb_ddk_types.h
+
+
+## Overview
+
+Provides the enumerated variables, structures, and macros used in USB DDK APIs.
+
+**Since**
+
+10
+
+**Related Modules**
+
+[UsbDdk](_usb_ddk.md)
+
+
+## Summary
+
+
+### Structs
+
+| Name| Description|
+| -------- | -------- |
+| [UsbControlRequestSetup](_usb_control_request_setup.md) | Setup data for control transfer, corresponding to **Setup Data** in the USB protocol.|
+| [UsbDeviceDescriptor](_usb_device_descriptor.md) | Standard device descriptor, corresponding to **Standard Device Descriptor** in the USB protocol.|
+| [UsbConfigDescriptor](_usb_config_descriptor.md) | Standard configuration descriptor, corresponding to **Standard Configuration Descriptor** in the USB protocol.|
+| [UsbInterfaceDescriptor](_usb_interface_descriptor.md) | Standard interface descriptor, corresponding to **Standard Interface Descriptor** in the USB protocol.|
+| [UsbEndpointDescriptor](_usb_endpoint_descriptor.md) | Standard endpoint descriptor, corresponding to **Standard Endpoint Descriptor** in the USB protocol.|
+| [UsbDdkEndpointDescriptor](_usb_ddk_endpoint_descriptor.md) | Endpoint descriptor.|
+| [UsbDdkInterfaceDescriptor](_usb_ddk_interface_descriptor.md) | Interface descriptor.|
+| [UsbDdkInterface](_usb_ddk_interface.md) | USB DDK interface, which is a collection of alternate settings for a particular USB interface.|
+| [UsbDdkConfigDescriptor](_usb_ddk_config_descriptor.md) | Configuration descriptor.|
+| [UsbRequestPipe](_usb_request_pipe.md) | Request pipe.|
+| [UsbDeviceMemMap](_usb_device_mem_map.md) | Device memory map created by calling [OH_Usb_CreateDeviceMemMap()](_usb_ddk.md#oh_usb_createdevicememmap). A buffer using the device memory map can provide better performance.|
+
+
+### Types
+
+| Name| Description|
+| -------- | -------- |
+| [UsbDdkEndpointDescriptor](_usb_ddk.md#usbddkendpointdescriptor) | Endpoint descriptor.|
+| [UsbDdkInterfaceDescriptor](_usb_ddk.md#usbddkinterfacedescriptor) | Interface descriptor.|
+| [UsbDdkInterface](_usb_ddk.md#usbddkinterface) | USB interface.|
+| [UsbDdkConfigDescriptor](_usb_ddk.md#usbddkconfigdescriptor) | Configuration descriptor.|
+| [UsbDeviceMemMap](_usb_ddk.md#usbdevicememmap) | Device memory map created by calling [OH_Usb_CreateDeviceMemMap()](_usb_ddk.md#oh_usb_createdevicememmap). A buffer using the device memory map can provide better performance.|
+
+
+### Enums
+
+| Name| Description|
+| -------- | -------- |
+| [UsbDdkErrCode](_usb_ddk.md#usbddkerrcode) {
USB_DDK_SUCCESS = 0, USB_DDK_FAILED = -1, USB_DDK_INVALID_PARAMETER = -2, USB_DDK_MEMORY_ERROR = -3,
USB_DDK_INVALID_OPERATION = -4, USB_DDK_NULL_PTR = -5, USB_DDK_DEVICE_BUSY = -6, USB_DDK_TIMEOUT = -7
} | USB DDK error code definition.|
+
+
+### Variables
+
+| Name| Description|
+| -------- | -------- |
+| [bmRequestType](#bmrequesttype) | Request type.|
+| [bRequest](#brequest) | Specific request.|
+| [wValue](#wvalue) | Value corresponding to **wValue** in the USB protocol. Its meaning varies according to the request.|
+| [wIndex](#windex) | Index corresponding to **wIndex** in the USB protocol. It is usually used to transfer the index or offset. Its meaning varies according to the request. |
+| [wLength](#wlength) | Data length corresponding to **wLength** in the USB protocol. If data is transferred, this field indicates the number of transferred bytes.|
+| [bLength](#blength) | Size of the descriptor, in bytes.|
+| [bDescriptorType](#bdescriptortype) | Descriptor type.|
+| [bcdUSB](#bcdusb) | USB protocol release number.|
+| [bDeviceClass](#bdeviceclass) | Interface class code allocated by the USB-IF.|
+| [bDeviceSubClass](#bdevicesubclass) | Device subclass code allocated by USB-IF. The value is limited by that of bDeviceClass.|
+| [bDeviceProtocol](#bdeviceprotocol) | Protocol code allocated by USB-IF. The value is limited by that of [bDeviceClass](#bdeviceclass) and [bDeviceSubClass](#bdevicesubclass).|
+| [bMaxPacketSize0](#bmaxpacketsize0) | Maximum packet size of endpoint 0. Only values 8, 16, 32, and 64 are valid.|
+| [idVendor](#idvendor) | Vendor ID allocated by USB-IF.|
+| [idProduct](#idproduct) | Product ID allocated by the vendor.|
+| [bcdDevice](#bcddevice) | Device release number.|
+| [iManufacturer](#imanufacturer) | Index of the string descriptor that describes the vendor.|
+| [iProduct](#iproduct) | Index of the string descriptor that describes the product.|
+| [iSerialNumber](#iserialnumber) | Index of the string descriptor that describes the device SN.|
+| [bNumConfigurations](#bnumconfigurations) | Configuration quantity.|
+| [wTotalLength](#wtotallength) | Total length of the configuration descriptor, including the configuration, interface, endpoint, and class- or vendor-specific descriptors.|
+| [bNumInterfaces](#bnuminterfaces) | Number of interfaces supported by the configuration.|
+| [bConfigurationValue](#bconfigurationvalue) | Configuration index, which is used to select the configuration.|
+| [iConfiguration](#iconfiguration) | Index of the string descriptor that describes the configuration.|
+| [bmAttributes](#bmattributes) | Configuration attributes, including the power mode and remote wakeup.|
+| [bMaxPower](#bmaxpower) | Maximum power consumption of the bus-powered USB device, in 2 mA.|
+| [bInterfaceNumber](#binterfacenumber) | Interface ID.|
+| [bAlternateSetting](#balternatesetting) | Value used to select the alternate setting of the interface.|
+| [bNumEndpoints](#bnumendpoints) | Number of endpoints (excluding endpoint 0) used by the interface.|
+| [bInterfaceClass](#binterfaceclass) | Interface class code allocated by the USB-IF.|
+| [bInterfaceSubClass](#binterfacesubclass) | Device subclass code allocated by USB-IF. The value is limited by that of [bInterfaceClass](#binterfaceclass).|
+| [bInterfaceProtocol](#binterfaceprotocol) | Protocol code allocated by USB-IF. The value is limited by that of [bInterfaceClass](#binterfaceclass) and [bInterfaceSubClass](#binterfacesubclass).|
+| [iInterface](#iinterface) | Index of the string descriptor that describes the interface.|
+| [bEndpointAddress](#bendpointaddress) | Endpoint address, including the endpoint number and endpoint direction.|
+| [bmAttributes](#bmattributes) | Endpoint attributes, including the transfer type, synchronization type, and usage type.|
+| [wMaxPacketSize](#wmaxpacketsize) | Maximum packet size supported by an endpoint.|
+| [bInterval](#binterval) | Interval for polling endpoints for data transfer.|
+| [bRefresh](#brefresh) | Refresh rate for audio devices.|
+| [bSynchAddress](#bsynchaddress) | Endpoint synchronization address for audio devices.|
+| [interfaceHandle](#interfacehandle) | Interface operation handle.|
+| [endpoint](#endpoint) | Endpoint address.|
+| [timeout](#timeout) | Timeout duration, in milliseconds.|
+
+
+## Variable Description
+
+
+### bAlternateSetting
+
+
+```
+uint8_t bAlternateSetting
+```
+
+**Description**
+
+Value used to select the alternate setting of the interface.
+
+
+### bcdDevice
+
+
+```
+uint16_t bcdDevice
+```
+
+**Description**
+
+Device release number.
+
+
+### bcdUSB
+
+
+```
+uint16_t bcdUSB
+```
+
+**Description**
+
+USB protocol release number.
+
+
+### bConfigurationValue
+
+
+```
+uint8_t bConfigurationValue
+```
+
+**Description**
+
+Configuration index, which is used to select the configuration.
+
+
+### bDescriptorType
+
+
+```
+uint8_t bDescriptorType
+```
+
+**Description**
+
+Descriptor type.
+
+
+### bDeviceClass
+
+
+```
+uint8_t bDeviceClass
+```
+
+**Description**
+
+Interface class code allocated by the USB-IF.
+
+
+### bDeviceProtocol
+
+
+```
+uint8_t bDeviceProtocol
+```
+
+**Description**
+
+Protocol code allocated by USB-IF. The value is limited by that of [bDeviceClass](#bdeviceclass) and [bDeviceSubClass](#bdevicesubclass).
+
+
+### bDeviceSubClass
+
+
+```
+uint8_t bDeviceSubClass
+```
+
+**Description**
+
+Device subclass code allocated by USB-IF. The value is limited by that of bDeviceClass.
+
+
+### bEndpointAddress
+
+
+```
+uint8_t bEndpointAddress
+```
+
+**Description**
+
+Endpoint address, including the endpoint number and endpoint direction.
+
+
+### bmAttributes
+
+
+```
+uint8_t bmAttributes
+```
+
+**Description**
+
+Endpoint attributes, including the transfer type, synchronization type, and usage type.
+
+
+### bInterfaceClass
+
+
+```
+uint8_t bInterfaceClass
+```
+
+**Description**
+
+Interface class code allocated by the USB-IF.
+
+
+### bInterfaceNumber
+
+
+```
+uint8_t bInterfaceNumber
+```
+
+**Description**
+
+Interface ID.
+
+
+### bInterfaceProtocol
+
+
+```
+uint8_t bInterfaceProtocol
+```
+
+**Description**
+
+Protocol code allocated by USB-IF. The value is limited by that of [bInterfaceClass](#binterfaceclass) and [bInterfaceSubClass](#binterfacesubclass).
+
+
+### bInterfaceSubClass
+
+
+```
+uint8_t bInterfaceSubClass
+```
+
+**Description**
+
+Device subclass code allocated by USB-IF. The value is limited by that of [bInterfaceClass](#binterfaceclass).
+
+
+### bInterval
+
+
+```
+uint8_t bInterval
+```
+
+**Description**
+
+Interval for polling endpoints for data transfer.
+
+
+### bLength
+
+
+```
+uint8_t bLength
+```
+
+**Description**
+
+Size of the descriptor, in bytes.
+
+
+### bmAttributes
+
+
+```
+uint8_t bmAttributes
+```
+
+**Description**
+
+Configuration attributes, including the power mode and remote wakeup.
+
+
+### bMaxPacketSize0
+
+
+```
+uint8_t bMaxPacketSize0
+```
+
+**Description**
+
+Maximum packet size of endpoint 0. Only values 8, 16, 32, and 64 are valid.
+
+
+### bMaxPower
+
+
+```
+uint8_t bMaxPower
+```
+
+**Description**
+
+Maximum power consumption of the bus-powered USB device, in 2 mA.
+
+
+### bNumConfigurations
+
+
+```
+uint8_t bNumConfigurations
+```
+
+**Description**
+
+Configuration quantity.
+
+
+### bNumEndpoints
+
+
+```
+uint8_t bNumEndpoints
+```
+
+**Description**
+
+Number of endpoints (excluding endpoint 0) used by the interface.
+
+
+### bNumInterfaces
+
+
+```
+uint8_t bNumInterfaces
+```
+
+**Description**
+
+Number of interfaces supported by the configuration.
+
+
+### bRefresh
+
+
+```
+uint8_t bRefresh
+```
+
+**Description**
+
+Refresh rate for audio devices.
+
+
+### bSynchAddress
+
+
+```
+uint8_t bSynchAddress
+```
+
+**Description**
+
+Endpoint synchronization address for audio devices.
+
+
+### endpoint
+
+
+```
+uint8_t endpoint
+```
+
+**Description**
+
+Endpoint address.
+
+
+### iConfiguration
+
+
+```
+uint8_t iConfiguration
+```
+
+**Description**
+
+Index of the string descriptor that describes the configuration.
+
+
+### idProduct
+
+
+```
+uint16_t idProduct
+```
+
+**Description**
+
+Product ID allocated by the vendor.
+
+
+### idVendor
+
+
+```
+uint16_t idVendor
+```
+
+**Description**
+
+Vendor ID allocated by USB-IF.
+
+
+### iInterface
+
+
+```
+uint8_t iInterface
+```
+
+**Description**
+
+Index of the string descriptor that describes the interface.
+
+
+### iManufacturer
+
+
+```
+uint8_t iManufacturer
+```
+
+**Description**
+
+Index of the string descriptor that describes the vendor.
+
+
+### wIndex
+
+
+```
+uint16_t wIndex
+```
+
+**Description**
+
+Index corresponding to **wIndex** in the USB protocol. It is usually used to transfer the index or offset. Its meaning varies according to the request.
+
+
+### interfaceHandle
+
+
+```
+uint64_t interfaceHandle
+```
+
+**Description**
+
+Interface operation handle.
+
+
+### iProduct
+
+
+```
+uint8_t iProduct
+```
+
+**Description**
+
+Index of the string descriptor that describes the product.
+
+
+### iSerialNumber
+
+
+```
+uint8_t iSerialNumber
+```
+
+**Description**
+
+Index of the string descriptor that describes the device SN.
+
+
+### wLength
+
+
+```
+uint16_t wLength
+```
+
+**Description**
+
+Data length corresponding to **wLength** in the USB protocol. If data is transferred, this field indicates the number of transferred bytes.
+
+
+### bRequest
+
+
+```
+uint8_t bRequest
+```
+
+**Description**
+
+Specific request.
+
+
+### bmRequestType
+
+
+```
+uint8_t bmRequestType
+```
+
+**Description**
+
+Request type.
+
+
+### timeout
+
+
+```
+uint32_t timeout
+```
+
+**Description**
+
+Timeout duration, in milliseconds.
+
+
+### wValue
+
+
+```
+uint16_t wValue
+```
+
+**Description**
+
+Value corresponding to **wValue** in the USB protocol. Its meaning varies according to the request.
+
+
+### wMaxPacketSize
+
+
+```
+uint16_t wMaxPacketSize
+```
+
+**Description**
+
+Maximum packet size supported by an endpoint.
+
+
+### wTotalLength
+
+
+```
+uint16_t wTotalLength
+```
+
+**Description**
+
+Total length of the configuration descriptor, including the configuration, interface, endpoint, and class- or vendor-specific descriptors.