From bb431fb86a7a200ee8247e0c65c1e132a6898474 Mon Sep 17 00:00:00 2001 From: Annie_wang Date: Thu, 17 Mar 2022 07:44:30 +0000 Subject: [PATCH] update en/device-dev/driver/driver-platform-rtc-develop.md. Signed-off-by: Annie_wang --- en/device-dev/driver/driver-platform-rtc-develop.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/en/device-dev/driver/driver-platform-rtc-develop.md b/en/device-dev/driver/driver-platform-rtc-develop.md index 19a635fa14..dcc774f2b6 100644 --- a/en/device-dev/driver/driver-platform-rtc-develop.md +++ b/en/device-dev/driver/driver-platform-rtc-develop.md @@ -190,7 +190,7 @@ The RTC module adaptation involves the following steps: 1. Instantiate the driver entry. - Instantiate the **HdfDriverEntry** structure. - - Call **HDF\_INIT** to register the **HdfDriverEntry** instance with the HDF framework. + - Call **HDF\_INIT** to register the **HdfDriverEntry** instance with the HDF. 2. Configure attribute files. - Add the **deviceNode** information to the **device\_info.hcs** file. @@ -200,8 +200,8 @@ The RTC module adaptation involves the following steps: - Initialize **RtcHost**. - Instantiate **RtcMethod** in the **RtcHost** object. - >![](../public_sys-resources/icon-note.gif) **NOTE:** - >For details, see [RtcMethod](#section13652132473017) and [Table 1](#table12929217311). + >![](../public_sys-resources/icon-note.gif) **NOTE** + >For details, see [Available APIs](#availableapis). 4. Debug the driver. @@ -212,7 +212,7 @@ The RTC module adaptation involves the following steps: The following uses **rtc\_hi35xx.c** as an example to present the contents that need to be provided by the vendor to implement device functions. -1. Instantiate the driver entry. The driver entry must be a global variable of the **HdfDriverEntry** type \(defined in **hdf\_device\_desc.h**\), and the value of **moduleName** must be the same as that in **device\_info.hcs**. In the HDF framework, the start address of each **HdfDriverEntry** object of all loaded drivers is collected to form a segment address space similar to an array for the upper layer to invoke. +1. Instantiate the driver entry. The driver entry must be a global variable of the **HdfDriverEntry** type \(defined in **hdf\_device\_desc.h**\), and the value of **moduleName** must be the same as that in **device\_info.hcs**. In the HDF, the start address of each **HdfDriverEntry** object of all loaded drivers is collected to form a segment address space similar to an array for the upper layer to invoke. Generally, HDF calls the **Bind** function and then the **Init** function to load a driver. If **Init** fails to be called, HDF calls **Release** to release driver resources and exit. @@ -226,7 +226,7 @@ The following uses **rtc\_hi35xx.c** as an example to present the contents tha .Release = HiRtcRelease, //See the Release function. .moduleName = "HDF_PLATFORM_RTC", // (Mandatory) This parameter must be the same as that in the .hcs file. }; - // Call HDF_INIT to register the driver entry with the HDF framework. + // Call HDF_INIT to register the driver entry with the HDF. HDF_INIT(g_rtcDriverEntry); ``` @@ -450,7 +450,7 @@ The following uses **rtc\_hi35xx.c** as an example to present the contents tha **Function description**: - Releases the memory and deletes the controller. This function assigns a value to the **Release** API in the driver entry structure. When the HDF framework fails to call the **Init** function to initialize the driver, the **Release** function can be called to release driver resources. All forced conversion operations for obtaining the corresponding object can be successful only when the **Init** or **Bind** function has the corresponding value assignment operations. + Releases the memory and deletes the controller. This function assigns a value to the **Release** API in the driver entry structure. When the HDF fails to call the **Init** function to initialize the driver, the **Release** function can be called to release driver resources. All forced conversion operations for obtaining the corresponding object can be successful only when the **Init** or **Bind** function has the corresponding value assignment operations. ``` static void HiRtcRelease(struct HdfDeviceObject *device) -- GitLab