From 6676d00f41c41f2b7485b8a65d7d7c132b25dd30 Mon Sep 17 00:00:00 2001 From: annie_wangli Date: Wed, 6 Apr 2022 21:19:34 +0800 Subject: [PATCH] update docs Signed-off-by: annie_wangli --- en/device-dev/driver/driver-peripherals-light-des.md | 2 +- en/device-dev/driver/driver-platform-pin-develop.md | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/en/device-dev/driver/driver-peripherals-light-des.md b/en/device-dev/driver/driver-peripherals-light-des.md index d5ef04a5f6..09fdb3d7f6 100644 --- a/en/device-dev/driver/driver-peripherals-light-des.md +++ b/en/device-dev/driver/driver-peripherals-light-des.md @@ -148,7 +148,7 @@ The light driver model provides APIs to obtain information about all the lights HdfWorkDestroy(&drvData->work); HdfWorkQueueDestroy(&drvData->workQueue); (void)OsalMutexDestroy(&drvData->mutex); - (void)OsalMemFree(drvData); + OsalMemFree(drvData); g_lightDrvData = NULL; } ``` diff --git a/en/device-dev/driver/driver-platform-pin-develop.md b/en/device-dev/driver/driver-platform-pin-develop.md index b17f40960a..76e2634ed9 100644 --- a/en/device-dev/driver/driver-platform-pin-develop.md +++ b/en/device-dev/driver/driver-platform-pin-develop.md @@ -23,10 +23,13 @@ Pin, as a software concept, provides APIs for uniformly managing the pins from d In the HDF, the pin module does not support the user mode and therefore does not need to publish services. It uses the service-free mode in interface adaptation. The service-free mode applies to the devices that do not provide user-mode APIs or the OS that does not distinguish the user mode and the kernel mode. The **DevHandle**, a void pointer, directly points to the kernel mode address of the device object. The pin module is divided into the following layers: + - Interface layer: provides APIs for obtaining a pin, setting or obtaining the pull type, pull strength, and functions of a pin, and releasing a pin. -- Core layer: provides the capabilities of matching pin resources and adding, removing, and managing pin controllers. The core layer interacts with the adaptation layer by using hooks. Adaptation layer: instantiates hooks to implement specific functions. +- Core layer: provides the capabilities of matching pin resources and adding, removing, and managing pin controllers. The core layer interacts with the adaptation layer by using hooks. +- Adaptation layer: instantiates hooks to implement specific functions. **Figure 1** Service-free mode + ![](figures/service-free-mode.png) ### Constraints -- GitLab