diff --git a/zh-cn/device-dev/driver/driver-hdf-development.md b/zh-cn/device-dev/driver/driver-hdf-development.md index 2e3ede3610b03571e56066ceda96075f0a9a0968..4afade3a32591e2a89737f374dc2cdd9ef693509 100755 --- a/zh-cn/device-dev/driver/driver-hdf-development.md +++ b/zh-cn/device-dev/driver/driver-hdf-development.md @@ -7,7 +7,7 @@ HDF框架以组件化的驱动模型作为核心设计思路,为开发者提 **图1** HDF驱动模型 - ![zh-cn_image_0000001153947412](figures/zh-cn_image_0000001153947412.png) + ![HDF驱动模型](figures/HDF驱动模型.png) ## 驱动开发步骤 @@ -15,6 +15,7 @@ HDF框架以组件化的驱动模型作为核心设计思路,为开发者提 基于HDF框架进行驱动的开发主要分为两个部分,驱动实现和驱动配置,详细开发流程如下所示: 1. 驱动实现 + 驱动实现包含驱动业务代码和驱动入口注册,具体写法如下: - 驱动业务代码 @@ -64,10 +65,12 @@ HDF框架以组件化的驱动模型作为核心设计思路,为开发者提 2. 驱动编译 - liteos + 涉及makefile和BUILD.gn修改: - makefile部分: - 驱动代码的编译必须要使用HDF框架提供的Makefile模板进行编译。 + + 驱动代码的编译必须要使用HDF框架提供的Makefile模板进行编译。 ``` @@ -79,7 +82,7 @@ HDF框架以组件化的驱动模型作为核心设计思路,为开发者提 include $(HDF_DRIVER) #导入模板makefile完成编译 ``` - 编译结果文件链接到内核镜像,添加到drivers/adapter/khdf/liteos目录下的hdf_lite.mk里面,示例如下: + 编译结果文件链接到内核镜像,添加到drivers/adapter/khdf/liteos目录下的hdf_lite.mk里面,示例如下: ``` @@ -88,7 +91,8 @@ HDF框架以组件化的驱动模型作为核心设计思路,为开发者提 ``` - BUILD.gn部分: - 添加模块BUILD.gn参考定义如下内容: + + 添加模块BUILD.gn参考定义如下内容: ``` @@ -121,6 +125,7 @@ HDF框架以组件化的驱动模型作为核心设计思路,为开发者提 } ``` - linux + 如果需要定义模块控制宏,需要在模块目录xxx里面添加Kconfig文件,并把Kconfig文件路径添加到drivers/adapter/khdf/linux/Kconfig里面: @@ -143,12 +148,14 @@ HDF框架以组件化的驱动模型作为核心设计思路,为开发者提 ``` 3. 驱动配置 + HDF使用HCS作为配置描述源码,HCS详细介绍参考[配置管理](../driver/driver-hdf-manage.md)介绍。 驱动配置包含两部分,HDF框架定义的驱动设备描述和驱动的私有配置信息,具体写法如下: - 驱动设备描述(必选) - HDF框架加载驱动所需要的信息来源于HDF框架定义的驱动设备描述,因此基于HDF框架开发的驱动必须要在HDF框架定义的device_info.hcs配置文件中添加对应的设备描述,驱动的设备描述填写如下所示: + + HDF框架加载驱动所需要的信息来源于HDF框架定义的驱动设备描述,因此基于HDF框架开发的驱动必须要在HDF框架定义的device_info.hcs配置文件中添加对应的设备描述,驱动的设备描述填写如下所示: ``` @@ -205,7 +212,8 @@ HDF框架以组件化的驱动模型作为核心设计思路,为开发者提 caps值:比如业务模块要配置CAP_DAC_OVERRIDE,此处需要填写 caps = ["DAC_OVERRIDE"],不能填写为caps = ["CAP_DAC_OVERRIDE"]。 - 驱动私有配置信息(可选) - 如果驱动有私有配置,则可以添加一个驱动的配置文件,用来填写一些驱动的默认配置信息,HDF框架在加载驱动的时候,会将对应的配置信息获取并保存在HdfDeviceObject 中的property里面,通过Bind和Init(参考步骤1)传递给驱动,驱动的配置信息示例如下: + + 如果驱动有私有配置,则可以添加一个驱动的配置文件,用来填写一些驱动的默认配置信息,HDF框架在加载驱动的时候,会将对应的配置信息获取并保存在HdfDeviceObject 中的property里面,通过Bind和Init(参考步骤1)传递给驱动,驱动的配置信息示例如下: ``` diff --git a/zh-cn/device-dev/driver/driver-hdf-manage.md b/zh-cn/device-dev/driver/driver-hdf-manage.md index ffc6f115a4f1f787125410ee355c662d72a29fbf..c3562a4c86b20e0e7fb58373f1e3c474de79cbe3 100644 --- a/zh-cn/device-dev/driver/driver-hdf-manage.md +++ b/zh-cn/device-dev/driver/driver-hdf-manage.md @@ -15,7 +15,7 @@ HC-GEN(HDF Configuration Generator)是HCS配置转换工具,可以将HDF **图1** 配置使用流程图 - ![zh-cn_image_0000001154105768](figures/zh-cn_image_0000001154105768.png) + ![配置使用流程](figures/配置使用流程图.png) HCS经过HC-GEN编译生成HCB文件,HDF驱动框架中的HCS Parser模块会从HCB文件中重建配置树,HDF驱动模块使用HCS Parser提供的配置读取接口获取配置内容。 @@ -394,6 +394,7 @@ options: -a hcb align with four bytes -b output binary output, default enable -t output config in C language source file style + -m output config in macro source file style -i output binary hex dump in C language source file style -p prefix of generated symbol name -d decompile hcb to hcs diff --git a/zh-cn/device-dev/driver/driver-peripherals-external-des.md b/zh-cn/device-dev/driver/driver-peripherals-external-des.md index 96df86199815852f167db9457f73db69c5e9796f..d20139cfac8525bad4b7185302b3f83cbc9d7212 100644 --- a/zh-cn/device-dev/driver/driver-peripherals-external-des.md +++ b/zh-cn/device-dev/driver/driver-peripherals-external-des.md @@ -6,7 +6,8 @@ WLAN是基于HDF(Hardware Driver Foundation)驱动框架开发的模块,该模块可实现跨操作系统迁移,自适应器件差异,模块化拼装编译等功能。各WLAN厂商驱动开发人员可根据WLAN模块提供的向下统一接口适配各自的驱动代码,实现如下能力:建立/关闭WLAN热点、扫描、关联WLAN热点等;对HDI层向上提供能力如下:设置MAC地址、设置发射功率、获取设备的MAC地址等。WLAN模块框架图如下: **图1** WLAN框架 - ![zh-cn_image_0000001200092359](figures/zh-cn_image_0000001200092359.png) + + ![image](figures/WLAN框架.png "WLAN框架") **图2** WLAN Driver框架 ![zh-cn_image_0000001300092359](figures/zh-cn_image_0000001300092359.png) @@ -33,7 +34,8 @@ WLAN模块有三部分对外开放的API接口,如下图所示: 3. 提供给各厂商实现的能力接口。 **图2** WLAN模块开放能力分布图 - ![zh-cn_image_0000001197807387](figures/zh-cn_image_0000001197807387.png) + + ![image](figures/WLAN模块开放能力分布图.png "WLAN模块开放能力分布图") ## 接口说明 diff --git a/zh-cn/device-dev/driver/driver-peripherals-lcd-des.md b/zh-cn/device-dev/driver/driver-peripherals-lcd-des.md index b0dc6ea6e86d05f1f03e013a4b442c039576bab9..72170c08d1ae053469dc9f3cc47184c6a6d8719d 100644 --- a/zh-cn/device-dev/driver/driver-peripherals-lcd-des.md +++ b/zh-cn/device-dev/driver/driver-peripherals-lcd-des.md @@ -7,8 +7,7 @@ LCD(Liquid Crystal Display)液晶显示驱动,对LCD进行上电,并通 **图1** 基于HDF驱动框架的Display驱动模型 - ![zh-cn_image_0000001170262223](figures/zh-cn_image_0000001170262223.png) - + ![image](figures/基于HDF驱动框架的Display驱动模型.png "基于HDF驱动框架的Display驱动模型") Display驱动模型主要由平台驱动层、芯片平台适配层、LCD器件驱动层三部分组成。驱动模型基于HDF驱动框架开发,通过Platform层和OSAL层提供的接口,屏蔽内核形态的差异,使得器件驱动可以便利的迁移到不同OS及芯片平台。模型向上对接Display公共HAL层,支撑HDI(Hardware Display Interface)接口的实现,通过Display-HDI对图形服务提供各类驱动能力接口。 @@ -30,7 +29,7 @@ LCD接口通常可分为MIPI DSI接口、TTL接口和LVDS接口,常用的是MI **图2** MIPI DSI接口 - ![zh-cn_image_0000001147040198](figures/zh-cn_image_0000001147040198.png) + ![image](figures/MIPI-DSI接口.png "MIPI-DSI接口") MIPI DSI接口是MIPI(Mobile Industry Processor Interface)联盟定义的显示接口,主要用于移动终端显示屏接口,接口数据传输遵循MIPI协议,MIPI DSI接口为数据接口,传输图像数据,通常情况下MIPI DSI接口的控制信息以MIPI包形式通过MIPI DSI接口发送到对端IC,不需要额外的外设接口。 @@ -38,7 +37,7 @@ LCD接口通常可分为MIPI DSI接口、TTL接口和LVDS接口,常用的是MI **图3** TTL接口 - ![zh-cn_image_0000001192960023](figures/zh-cn_image_0000001192960023.png) + ![image](figures/TTL接口.png "TTL接口") TTL(Transistor Transistor Logic)即晶体管-晶体管逻辑,TTL电平信号由TTL器件产生,TTL器件是数字集成电路的一大门类,它采用双极型工艺制造,具有高速度、低功耗和品种多等特点。 diff --git a/zh-cn/device-dev/driver/driver-peripherals-touch-des.md b/zh-cn/device-dev/driver/driver-peripherals-touch-des.md index e97781d375b54707c2414beb4d198091801c7a05..e81e479bd340dec1f2e5f4442f49f8196f97e699 100644 --- a/zh-cn/device-dev/driver/driver-peripherals-touch-des.md +++ b/zh-cn/device-dev/driver/driver-peripherals-touch-des.md @@ -4,16 +4,18 @@ ## 概述 - **Touchscreen驱动主要任务** + Touchscreen驱动用于驱动触摸屏使其正常工作,该驱动主要完成如下工作:对触摸屏驱动IC进行上电、配置硬件管脚并初始化其状态、注册中断、配置通信接口(I2C或SPI)、设定Input相关配置、下载及更新固件等操作。 - **Touchscreen驱动模型说明** + 本节主要介绍基于Input驱动模型开发Touchscreen器件驱动,Input模型整体的框架如下图所示。 Input驱动模型基于HDF驱动框架、Platform接口、OSAL接口进行开发,向上对接规范化的驱动接口HDI(Hardware Driver Interface)层,通过Input-HDI层对外提供硬件能力,即上层Input Service可以通过HDI接口层获取相应的驱动能力,进而操控Touchscreen等输入设备。 **图1** 基于HDF驱动框架的Input驱动模型 - ![zh-cn_image_0000001123742904](figures/zh-cn_image_0000001123742904.png) + ![image](figures/基于HDF驱动框架的input驱动模型.png "基于HDF驱动框架的input驱动模型") - **Input驱动模型介绍** @@ -42,20 +44,24 @@ Touchscreen器件的硬件接口相对简单,根据PIN脚的属性,可以简 **图2** Touchscreen器件常用管脚 - ![zh-cn_image_0000001192846991](figures/zh-cn_image_0000001192846991.png) + ![image](figures/Touchscreen器件常用管脚.png "Touchscreen器件常用管脚") 如上图所示的三类接口,分别做简要说明如下: 1. **电源接口** + - LDO_1P8:1.8V数字电路 - LDO_3P3:3.3V模拟电路 - 通常情况下,Touchscreenreen驱动IC和LCD驱动IC是相互分离的,这种情况下,Touchscreen驱动IC一般同时需要1.8V和3.3V两路供电。随着芯片演进,业内已有Touchscreen驱动IC和LCD驱动IC集成在一颗IC中的芯片案例,对Touchscreen而言,只需要关注1.8V供电即可,其内部需要的3.3V电源,会在驱动IC内部从LCD的VSP电源(典型值5.5V)中分出来。 + + 通常情况下,Touchscreenreen驱动IC和LCD驱动IC是相互分离的,这种情况下,Touchscreen驱动IC一般同时需要1.8V和3.3V两路供电。随着芯片演进,业内已有Touchscreen驱动IC和LCD驱动IC集成在一颗IC中的芯片案例,对Touchscreen而言,只需要关注1.8V供电即可,其内部需要的3.3V电源,会在驱动IC内部从LCD的VSP电源(典型值5.5V)中分出来。 2. **IO控制接口** + - Reset:reset管脚,用于在系统休眠、唤醒时,由主机侧对驱动IC进行复位操作。 - INT:中断管脚,需要在驱动初始化时,配置为输入上拉状态。在驱动IC检测到外部触摸信号后,通过操作中断管脚来触发中断,器件驱动则会在中断处理函数中进行报点数据读取等操作。 3. **通信接口** + - I2C:由于Touchscreen的报点数据量相对较少,所以一般选用I2C方式传输数据。I2C的具体协议及对应操作接口,可以参考Platform接口层中的[“I2C”使用指南](../driver/driver-platform-i2c-des.md#概述)。 - SPI:部分厂商,由于需要传递的数据不止报点坐标,而是需要获取基础容值,数据量较大,所以会选用SPI通信方式。SPI的具体协议及对应操作接口,可以参考Platform接口层中的[“SPI” 使用指南](../driver/driver-platform-spi-des.md#概述)。 diff --git a/zh-cn/device-dev/driver/driver-peripherals-usb-des.md b/zh-cn/device-dev/driver/driver-peripherals-usb-des.md index b46eb8401db605fccb59c1b751b74c8eff22e45f..4aa4e22adc6a2a85dae16f82536185391945e7cc 100644 --- a/zh-cn/device-dev/driver/driver-peripherals-usb-des.md +++ b/zh-cn/device-dev/driver/driver-peripherals-usb-des.md @@ -11,12 +11,12 @@ USB Device部分,支持USB功能设备的开发,提供USB设备相关功能 **图1** USB Host驱动模型图 - ![zh-cn_image_0000001183058868](figures/zh-cn_image_0000001183058868.png) + ![image](figures/USB-Host驱动模型图.png "USB-Host驱动模型图") **图2** USB Device驱动模型图 - ![zh-cn_image_0000001183218992](figures/zh-cn_image_0000001183218992.png) + ![image](figures/USB-Device驱动模型图.png "USB-Device驱动模型图") USB驱动模型对外开放的API接口能力如下: 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 bbbf280282bc618ae7ee76a8ecda686af55ac5c2..39f71ec672528a7d6ef2b67162baf8f8b52b791e 100755 --- a/zh-cn/device-dev/driver/driver-platform-adc-develop.md +++ b/zh-cn/device-dev/driver/driver-platform-adc-develop.md @@ -6,7 +6,8 @@ ADC(Analog to Digital Converter),即模拟-数字转换器,是一种将模拟信号转换成对应数字信号的设备,在HDF框架中,ADC模块接口适配模式采用统一服务模式,这需要一个设备服务来作为ADC模块的管理器,统一处理外部访问,这会在配置文件中有所体现。统一服务模式适合于同类型设备对象较多的情况,如ADC可能同时具备十几个控制器,采用独立服务模式需要配置更多的设备节点,且服务会占据内存资源。 **图1** ADC统一服务 - ![zh-cn_image_0000001177082414](figures/zh-cn_image_0000001177082414.png) + + ![image](figures/统一服务模式结构图.png "ADC统一服务模式结构图") ## 接口说明 diff --git a/zh-cn/device-dev/driver/driver-platform-gpio-des.md b/zh-cn/device-dev/driver/driver-platform-gpio-des.md index 18da1fa126642838b1c1fe87ec038fdbb0d48ed7..8f3969e84029a9a9b48207ef1439b08192bf6cc9 100644 --- a/zh-cn/device-dev/driver/driver-platform-gpio-des.md +++ b/zh-cn/device-dev/driver/driver-platform-gpio-des.md @@ -39,7 +39,7 @@ GPIO标准API通过GPIO管脚号来操作指定管脚,使用GPIO的一般流 **图1** GPIO使用流程图 - ![zh-cn_image_0000001206291109](figures/zh-cn_image_0000001206291109.png) + ![image](figures/GPIO使用流程图.png "GPIO使用流程图") ### 确定GPIO管脚号 diff --git a/zh-cn/device-dev/driver/driver-platform-gpio-develop.md b/zh-cn/device-dev/driver/driver-platform-gpio-develop.md index a7c7c0ce06971278329faabc630b7ef74c38d605..30bf8d1935e7c1c5de4b5d66bdcf0f9944bc03c4 100755 --- a/zh-cn/device-dev/driver/driver-platform-gpio-develop.md +++ b/zh-cn/device-dev/driver/driver-platform-gpio-develop.md @@ -8,7 +8,8 @@ GPIO(General-purpose input/output)即通用型输入输出,在HDF框架中 GPIO的接口适配模式采用无服务模式,用于不需要在用户态提供API的设备类型,或者没有用户态和内核区分的OS系统,其关联方式是DevHandle直接指向设备对象内核态地址(DevHandle是一个void类型指针)。 **图1** GPIO无服务模式结构图 - ![zh-cn_image_0000001176603952](figures/zh-cn_image_0000001176603952.png) + + ![](figures/无服务模式结构图.png "GPIO无服务模式结构图") ## 接口说明 diff --git a/zh-cn/device-dev/driver/driver-platform-i2c-des.md b/zh-cn/device-dev/driver/driver-platform-i2c-des.md index c451e820fe94935c2b14c3701d09c612d1c9d5cb..aba92f09c9ae63f41bba4391baa8e0f890f31ee4 100644 --- a/zh-cn/device-dev/driver/driver-platform-i2c-des.md +++ b/zh-cn/device-dev/driver/driver-platform-i2c-des.md @@ -17,7 +17,7 @@ **图1** I2C物理连线示意图 - ![zh-cn_image_0000001160653004](figures/zh-cn_image_0000001160653004.png) + ![image](figures/I2C物理连线示意图.png "I2C物理连线示意图") ## 接口说明 @@ -42,7 +42,7 @@ **图2** I2C设备使用流程图 - ![zh-cn_image_0000001206291495](figures/zh-cn_image_0000001206291495.png) + ![image](figures/I2C设备使用流程图.png "I2C设备使用流程图") ### 打开I2C控制器 diff --git a/zh-cn/device-dev/driver/driver-platform-i2c-develop.md b/zh-cn/device-dev/driver/driver-platform-i2c-develop.md index 1b1be694f21ef8647389fef40deb997007aebe82..514cbcdd0d062cbaf88e8d40c7a706dca89d7200 100755 --- a/zh-cn/device-dev/driver/driver-platform-i2c-develop.md +++ b/zh-cn/device-dev/driver/driver-platform-i2c-develop.md @@ -7,7 +7,7 @@ I2C(Inter Integrated Circuit)总线是由Philips公司开发的一种简单 **图1** I2C统一服务模式结构图 - ![zh-cn_image_0000001177082394](figures/zh-cn_image_0000001177082394.png) + ![image](figures/统一服务模式结构图.png "I2C统一服务模式结构图") ## 接口说明 diff --git a/zh-cn/device-dev/driver/driver-platform-mipidsi-des.md b/zh-cn/device-dev/driver/driver-platform-mipidsi-des.md index 43b17777b21088e4b2a6058f065ac08fd2b13bed..44ca06b5bb1bdd1a2c393e60d8ca3d2db4df0d56 100644 --- a/zh-cn/device-dev/driver/driver-platform-mipidsi-des.md +++ b/zh-cn/device-dev/driver/driver-platform-mipidsi-des.md @@ -11,7 +11,7 @@ **图1** DSI发送、接收接口 - ![zh-cn_image_0000001243192721](figures/zh-cn_image_0000001243192721.png) + ![image](figures/DSI发送-接收接口.png "DSI发送-接收接口") ## 接口说明 @@ -38,7 +38,7 @@ **图2** MIPI DSI使用流程图 - ![zh-cn_image_0000001198152838](figures/zh-cn_image_0000001198152838.png) + ![image](figures/MIPI-DSI使用流程图.png "MIPI-DSI使用流程图") ### 获取MIPI DSI操作句柄 diff --git a/zh-cn/device-dev/driver/driver-platform-mipidsi-develop.md b/zh-cn/device-dev/driver/driver-platform-mipidsi-develop.md index 854bca3dbe060e181f0c7bb33e9cda7484f8fb7b..6a626d65cd519abfc44bdec31d5efe72b43280da 100755 --- a/zh-cn/device-dev/driver/driver-platform-mipidsi-develop.md +++ b/zh-cn/device-dev/driver/driver-platform-mipidsi-develop.md @@ -7,7 +7,7 @@ DSI(Display Serial Interface)是由移动行业处理器接口联盟(Mobil **图1** DSI无服务模式结构图 - ![zh-cn_image_0000001176603960](figures/zh-cn_image_0000001176603960.png) + ![image](figures/无服务模式结构图.png "DSI无服务模式结构图") ## 接口说明 diff --git a/zh-cn/device-dev/driver/driver-platform-mmc-develop.md b/zh-cn/device-dev/driver/driver-platform-mmc-develop.md index 0c0cf18b3b079b8fd6c2be05dc7c2d5e93540832..2b586b8eeb6cd242db69a05d389166c566008cd7 100755 --- a/zh-cn/device-dev/driver/driver-platform-mmc-develop.md +++ b/zh-cn/device-dev/driver/driver-platform-mmc-develop.md @@ -6,7 +6,8 @@ MMC(MultiMedia Card),即多媒体卡,在HDF框架中,MMC的接口适配模式采用独立服务模式,在这种模式下,每一个设备对象会独立发布一个设备服务来处理外部访问,设备管理器收到API的访问请求之后,通过提取该请求的参数,达到调用实际设备对象的相应内部方法的目的。独立服务模式可以直接借助HDFDeviceManager的服务管理能力,但需要为每个设备单独配置设备节点,增加内存占用。 **图1** MMC独立服务模式结构图 - ![zh-cn_image_0000001176603968](figures/zh-cn_image_0000001176603968.png) + + ![zh-cn_image_0000001176603968](figures/独立服务模式结构图.png "MMC独立服务模式结构图") ## 接口说明 diff --git a/zh-cn/device-dev/driver/driver-platform-pwm-des.md b/zh-cn/device-dev/driver/driver-platform-pwm-des.md index 00c326f44ebf1cc30c0ba2e43ead82743876df1d..de7ace71bbffa39929fdb92ab622c4d0ed6f8e7d 100644 --- a/zh-cn/device-dev/driver/driver-platform-pwm-des.md +++ b/zh-cn/device-dev/driver/driver-platform-pwm-des.md @@ -52,7 +52,7 @@ PWM是脉冲宽度调制(Pulse Width Modulation)的缩写,是一种对模 **图1** PWM使用流程图 -![zh-cn_image_0000001206372673](figures/zh-cn_image_0000001206372673.png) +![image](figures/PWM设备使用流程图.png "PWM设备使用流程图") ### 获取PWM设备句柄 diff --git a/zh-cn/device-dev/driver/driver-platform-pwm-develop.md b/zh-cn/device-dev/driver/driver-platform-pwm-develop.md index a08df5d68d61c27fe37615b26acdd2ee965a8335..d555d54b08a7a7a7cebd439c9acb1fb0bcc379e3 100755 --- a/zh-cn/device-dev/driver/driver-platform-pwm-develop.md +++ b/zh-cn/device-dev/driver/driver-platform-pwm-develop.md @@ -6,7 +6,8 @@ PWM(Pulse Width Modulator)即脉冲宽度调节器,在HDF框架中,PWM的接口适配模式采用独立服务模式,在这种模式下,每一个设备对象会独立发布一个设备服务来处理外部访问,设备管理器收到API的访问请求之后,通过提取该请求的参数,达到调用实际设备对象的相应内部方法的目的。独立服务模式可以直接借助HDFDeviceManager的服务管理能力,但需要为每个设备单独配置设备节点,增加内存占用。 **图1** PWM独立服务模式结构图 - ![zh-cn_image_0000001176603944](figures/zh-cn_image_0000001176603944.png) + + ![image](figures/独立服务模式结构图.png "PWM独立服务模式结构图") ## 接口说明 diff --git a/zh-cn/device-dev/driver/driver-platform-rtc-des.md b/zh-cn/device-dev/driver/driver-platform-rtc-des.md index faaff11de42bb4bcb149eea939a2e4b7c37bd6d6..fedf6251cab33b9cfd744d3807c29db819edbad6 100644 --- a/zh-cn/device-dev/driver/driver-platform-rtc-des.md +++ b/zh-cn/device-dev/driver/driver-platform-rtc-des.md @@ -39,7 +39,8 @@ RTC(real-time clock)为操作系统中的实时时钟设备,为操作系统提 使用RTC设备的一般流程如下图所示。 **图1** RTC设备使用流程图 - ![zh-cn_image_0000001160971552](figures/zh-cn_image_0000001160971552.png) + + ![image](figures/RTC设备使用流程图.png "RTC设备使用流程图") ### 创建RTC设备句柄 diff --git a/zh-cn/device-dev/driver/driver-platform-rtc-develop.md b/zh-cn/device-dev/driver/driver-platform-rtc-develop.md index 07c0df5ac1dc3b49787983d9dfcd7c17d53d937a..bb3cba8e5240ee903d145c77c610a9d323f1d7a4 100755 --- a/zh-cn/device-dev/driver/driver-platform-rtc-develop.md +++ b/zh-cn/device-dev/driver/driver-platform-rtc-develop.md @@ -7,7 +7,7 @@ RTC(real-time clock)为操作系统中的实时时钟设备,在HDF框架中, **图1** RTC独立服务模式结构图 - ![zh-cn_image_0000001177082386](figures/zh-cn_image_0000001177082386.png) + ![image](figures/独立服务模式结构图.png "RTC独立服务模式结构图") ## 接口说明 diff --git a/zh-cn/device-dev/driver/driver-platform-sdio-des.md b/zh-cn/device-dev/driver/driver-platform-sdio-des.md index 8d29167692a7f06520fd40efeec71ddb51849d90..0dc22ba2741775c843f34e465883eaa2e80e833c 100644 --- a/zh-cn/device-dev/driver/driver-platform-sdio-des.md +++ b/zh-cn/device-dev/driver/driver-platform-sdio-des.md @@ -16,7 +16,7 @@ **图1** SDIO的HOST-DEVICE连接示意图 - ![zh-cn_image_0000001206092987](figures/zh-cn_image_0000001206092987.png) + ![image](figures/SDIO的HOST-DEVICE连接示意图.png "SDIO的HOST-DEVICE连接示意图") - SDIO接口定义了操作SDIO的通用方法集合,包括打开/关闭SDIO控制器、独占/释放HOST、使能/去使能设备、申请/释放中断、读写、获取/设置公共信息等。 @@ -49,7 +49,7 @@ **图2** SDIO使用流程图 - ![zh-cn_image_0000001206171539](figures/zh-cn_image_0000001206171539.png) + ![image](figures/SDIO使用流程图.png "SDIO使用流程图") ### 打开SDIO控制器 diff --git a/zh-cn/device-dev/driver/driver-platform-sdio-develop.md b/zh-cn/device-dev/driver/driver-platform-sdio-develop.md index 81b8701d9de1ce42adae3123bf865bd72147bc44..39e64c863bd6a3aff937b3e3b519fa3394734968 100755 --- a/zh-cn/device-dev/driver/driver-platform-sdio-develop.md +++ b/zh-cn/device-dev/driver/driver-platform-sdio-develop.md @@ -6,7 +6,8 @@ SDIO由SD卡发展而来,被统称为mmc(MultiMediaCard),相关技术差别不大,在HDF框架中,SDIO的接口适配模式采用独立服务模式,在这种模式下,每一个设备对象会独立发布一个设备服务来处理外部访问,设备管理器收到API的访问请求之后,通过提取该请求的参数,达到调用实际设备对象的相应内部方法的目的。独立服务模式可以直接借助HDFDeviceManager的服务管理能力,但需要为每个设备单独配置设备节点,增加内存占用。 **图1** SDIO独立服务模式结构图 - ![zh-cn_image_0000001177082420](figures/zh-cn_image_0000001177082420.png) + + ![image](figures/独立服务模式结构图.png "SDIO独立服务模式结构图") ## 接口说明 diff --git a/zh-cn/device-dev/driver/driver-platform-spi-des.md b/zh-cn/device-dev/driver/driver-platform-spi-des.md index 9ba3a752524162e32f23aa07d47fdf439007a9b2..98166b5694c727cc1417ff415d567e79e620d706 100644 --- a/zh-cn/device-dev/driver/driver-platform-spi-des.md +++ b/zh-cn/device-dev/driver/driver-platform-spi-des.md @@ -17,7 +17,7 @@ **图1** SPI主从设备连接示意图 - ![zh-cn_image_0000001160971308](figures/zh-cn_image_0000001160971308.png) + ![image](figures/SPI主从设备连接示意图.png "SPI主从设备连接示意图") - SPI通信通常由主设备发起,通过以下步骤完成一次通信: 1. 通过CS选中要通信的从设备,在任意时刻,一个主设备上最多只能有一个从设备被选中。 @@ -63,7 +63,7 @@ **图2** SPI使用流程图 - ![zh-cn_image_0000001206291275](figures/zh-cn_image_0000001206291275.png) + ![image](figures/SPI使用流程图.png "SPI使用流程图") ### 获取SPI设备句柄 diff --git a/zh-cn/device-dev/driver/driver-platform-spi-develop.md b/zh-cn/device-dev/driver/driver-platform-spi-develop.md index ec8226d368b81ad72fe68dee0bc2fa0bc4d4d55a..7df7d94506671cd43e0f050970f05d7a38f4139e 100755 --- a/zh-cn/device-dev/driver/driver-platform-spi-develop.md +++ b/zh-cn/device-dev/driver/driver-platform-spi-develop.md @@ -7,8 +7,7 @@ SPI即串行外设接口(Serial Peripheral Interface),在HDF框架中,SP **图1** SPI独立服务模式结构图 - ![zh-cn_image_0000001176603992](figures/zh-cn_image_0000001176603992.png) - + ![image](figures/独立服务模式结构图.png "SPI独立服务模式结构图") ## 接口说明 diff --git a/zh-cn/device-dev/driver/driver-platform-uart-des.md b/zh-cn/device-dev/driver/driver-platform-uart-des.md index 3c4ecf3466a2a34a13f7bb2783f45d15334b4dc7..be33150dc5d01581eea65402867f7fedd3468165 100644 --- a/zh-cn/device-dev/driver/driver-platform-uart-des.md +++ b/zh-cn/device-dev/driver/driver-platform-uart-des.md @@ -15,11 +15,11 @@ **图1** 2线UART设备连接示意图 - ![zh-cn_image_0000001160812804](figures/zh-cn_image_0000001160812804.png) + ![image](figures/2线UART设备连接示意图.png "2线UART设备连接示意图") **图2** 4线UART设备连接示意图 - ![zh-cn_image_0000001206372789](figures/zh-cn_image_0000001206372789.png) + ![image](figures/4线UART设备连接示意图.png "4线UART设备连接示意图") - UART通信之前,收发双方需要约定好一些参数:波特率、数据格式(起始位、数据位、校验位、停止位)等。通信过程中,UART通过TX发送给对端数据,通过RX接收对端发送的数据。当UART接收缓存达到预定的门限值时,RTS变为不可发送数据,对端的CTS检测到不可发送数据,则停止发送数据。 @@ -51,7 +51,7 @@ **图3** UART使用流程图 - ![zh-cn_image_0000001206092753](figures/zh-cn_image_0000001206092753.png) + ![image](figures/UART使用流程图.png "UART使用流程图") ### 获取UART设备句柄 diff --git a/zh-cn/device-dev/driver/driver-platform-uart-develop.md b/zh-cn/device-dev/driver/driver-platform-uart-develop.md index 100c1eca835b7f1026a5f96edc9ca1b7366c45a4..2bfb9b6b5d470098454bd2da11d569b6a07cb4c9 100755 --- a/zh-cn/device-dev/driver/driver-platform-uart-develop.md +++ b/zh-cn/device-dev/driver/driver-platform-uart-develop.md @@ -7,7 +7,7 @@ UART是通用异步收发传输器(Universal Asynchronous Receiver/Transmitter **图1** UART独立服务模式结构图 - ![zh-cn_image_0000001176603980](figures/zh-cn_image_0000001176603980.png) + ![image](figures/独立服务模式结构图.png "UART独立服务模式结构图") ## 接口说明 diff --git a/zh-cn/device-dev/driver/driver-platform-watchdog-des.md b/zh-cn/device-dev/driver/driver-platform-watchdog-des.md index 8afe4197992d7c6fb44364ba17f6b1944e60675f..29457de37e855ce2355554f8640b271c8d85f009 100644 --- a/zh-cn/device-dev/driver/driver-platform-watchdog-des.md +++ b/zh-cn/device-dev/driver/driver-platform-watchdog-des.md @@ -30,7 +30,8 @@ 使用看门狗的一般流程如下图所示。 **图1** 看门狗使用流程图 - ![zh-cn_image_0000001160652842](figures/zh-cn_image_0000001160652842.png) + + ![image](figures/看门狗使用流程图.png "看门狗使用流程图") ### 打开看门狗设备 diff --git a/zh-cn/device-dev/driver/driver-platform-watchdog-develop.md b/zh-cn/device-dev/driver/driver-platform-watchdog-develop.md index 9a8b1645cc3baf5ceafdb9ec2d885d9657d932da..d8d49c2b74a2442873e8974b8c45552b9de67c27 100755 --- a/zh-cn/device-dev/driver/driver-platform-watchdog-develop.md +++ b/zh-cn/device-dev/driver/driver-platform-watchdog-develop.md @@ -7,7 +7,7 @@ **图1** Watchdog独立服务模式结构图 - ![zh-cn_image_0000001177082396](figures/zh-cn_image_0000001177082396.png) + ![image](figures/独立服务模式结构图.png "Watchdog独立服务模式结构图") ## 接口说明