diff --git a/en/device-dev/driver/driver-peripherals-light-des.md b/en/device-dev/driver/driver-peripherals-light-des.md index d5ef04a5f6ed548c6e9a576090c3612fed97cb4c..09fdb3d7f638f9c16b273345132b89c423a63e06 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 b17f40960a1ba3e410d87224322efb931902308e..76e2634ed9ac9e5da8012b9cec9a87c1c75b0b19 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