From 708a9406fd5bb32e21beb751e91bcb01b8cbae77 Mon Sep 17 00:00:00 2001 From: zhangyalei Date: Fri, 27 May 2022 23:57:56 -0700 Subject: [PATCH] fix: Solve the platform driver adc and dac document issue Signed-off-by: zhangyalei --- zh-cn/device-dev/driver/driver-platform-adc-develop.md | 2 +- zh-cn/device-dev/driver/driver-platform-dac-develop.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/zh-cn/device-dev/driver/driver-platform-adc-develop.md b/zh-cn/device-dev/driver/driver-platform-adc-develop.md index 0e4c0363d1..6fe6ee27a4 100755 --- a/zh-cn/device-dev/driver/driver-platform-adc-develop.md +++ b/zh-cn/device-dev/driver/driver-platform-adc-develop.md @@ -64,7 +64,7 @@ ADC模块适配的三个环节是配置属性文件,实例化驱动入口, ADC模块这种类型的控制器会出现很多个设备挂接的情况,因而在HDF框架中首先会为这类型的设备创建一个管理器对象。这样,需要打开某个设备时,管理器对象会根据指定参数查找到指定设备。 - ADC管理器的驱动由核心层实现,厂商不需要关注这部分内容的实现,这个但在实现Init函数的时候需要调用核心层的AdcDeviceAdd函数,它会实现相应功能。 + ADC管理器的驱动由核心层实现,厂商不需要关注这部分内容的实现,因为在驱动层的Init函数中会调用核心层的AdcDeviceAdd函数向ADC管理器添加设备。 ``` diff --git a/zh-cn/device-dev/driver/driver-platform-dac-develop.md b/zh-cn/device-dev/driver/driver-platform-dac-develop.md index 11a9961805..1b988188c6 100644 --- a/zh-cn/device-dev/driver/driver-platform-dac-develop.md +++ b/zh-cn/device-dev/driver/driver-platform-dac-develop.md @@ -77,7 +77,7 @@ struct DacMethod { | 函数成员 | 入参 | 出参 | 返回值 | 功能 | | -------- | ------------------------------------------------------------ | ---- | ------------------ | -------------- | -| write | device:结构体指针,核心层DAC控制器
channel:uint32_t,传入的通道号
val:uint32_t,要传入的数据 | 无 | HDF_STATUS相关状态 | 写入DA的目标值 | +| write | device:结构体指针,核心层DAC控制器
channel:uint32_t,传入的通道号
val:uint32_t,要传入的数据 | 无 | HDF_STATUS相关状态 | 写入DA的数模转换目标值 | | start | device:结构体指针,核心层DAC控制器 | 无 | HDF_STATUS相关状态 | 开启DAC设备 | | stop | device:结构体指针,核心层DAC控制器 | 无 | HDF_STATUS相关状态 | 关闭DAC设备 | @@ -415,7 +415,7 @@ DAC模块适配包含以下四个步骤: struct DeviceResourceIface *drsOps = NULL; // 通过实例入口获取设备资源 drsOps = DeviceResourceGetIfaceInstance(HDF_CONFIG_SOURCE); - // 入参指判空 + // 判断返回值和返回值的成员函数是否为空 if (drsOps == NULL || drsOps->GetUint32 == NULL) { // 指针为空 HDF_LOGE("%s: invalid drs ops fail!", __func__); -- GitLab