@toc
驱动子系统开发
GPIO
API介绍
![梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区 梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区](https://dl-harmonyos.51cto.com/images/202208/55b7ceb21ccc76c68cb594e60515d9a0400d61.png?x-oss-process=image/resize,w_820,h_508)
点亮LED灯
![梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区 梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区](https://dl-harmonyos.51cto.com/images/202208/95545cc0319a282247072816d722eeab2463ce.png?x-oss-process=image/resize,w_820,h_465)
![梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区 梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区](https://dl-harmonyos.51cto.com/images/202208/e8795d376b3b3f3a39d276c826178536e9ab38.png?x-oss-process=image/resize,w_820,h_516)
代码实现
前提引用头文件:#include “wifiiot_gpio.h” 和#include “wifiiot_gpio_ex.h”
可以看到led灯在闪烁
![梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区 梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区](https://dl-harmonyos.51cto.com/images/202208/581ab9390d19bc1019659455d66d02f05e1993.png?x-oss-process=image/resize,w_820,h_994)
扩展实验
读取GPIO当前的设置
读取结果为1
![梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区 梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区](https://dl-harmonyos.51cto.com/images/202208/e7f92ee331f34ea27943021a31c920aaecb905.png?x-oss-process=image/resize,w_773,h_386)
读取结果为0
![梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区 梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区](https://dl-harmonyos.51cto.com/images/202208/01ef94791a37cf0b11e49365530879bb494085.png?x-oss-process=image/resize,w_711,h_179)
GPIO中断开发
API介绍
![梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区 梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区](https://dl-harmonyos.51cto.com/images/202208/f66c18e5990d07c5edf866268e0e84ed1de1a4.png?x-oss-process=image/resize,w_562,h_513)
对应引脚
![梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区 梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区](https://dl-harmonyos.51cto.com/images/202208/a3cbb1c091bd509e6d754247181481b53df4b0.png?x-oss-process=image/resize,w_820,h_542)
代码相关
![梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区 梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区](https://dl-harmonyos.51cto.com/images/202208/5561001759f6a252c180755994712142a4bdbe.png?x-oss-process=image/resize,w_820,h_530)
代码实现
F1点亮LED,F2熄灭LED
![梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区 梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区](https://dl-harmonyos.51cto.com/images/202208/f814daf86d9784e0b6a882f1a6e9819dbb8551.png?x-oss-process=image/resize,w_820,h_749)
PWM波输出开发
API介绍
![梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区 梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区](https://dl-harmonyos.51cto.com/images/202208/a568931736b59c2ca90978b34c1016a48f5570.png?x-oss-process=image/resize,w_820,h_476)
对应引脚
![梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区 梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区](https://dl-harmonyos.51cto.com/images/202208/62caf2a0425d21e2f20826b7476e8aa60e958c.png?x-oss-process=image/resize,w_820,h_516)
代码部分
![梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区 梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区](https://dl-harmonyos.51cto.com/images/202208/d27130f10b72dd400fb8068450c49da93a8ed6.png?x-oss-process=image/resize,w_820,h_548)
ADC开发
API介绍
![梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区 梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区](https://dl-harmonyos.51cto.com/images/202208/65ceef008fa9ef407e65187cd8f20487852047.png?x-oss-process=image/resize,w_820,h_560)
对应GPIO引脚
![梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区 梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区](https://dl-harmonyos.51cto.com/images/202208/96f719856b2a09841b9615c8580441ed8bd340.png?x-oss-process=image/resize,w_820,h_562)
对应代码
![梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区 梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区](https://dl-harmonyos.51cto.com/images/202208/b1a677494cec2fc6a0b3107d36012784998027.png?x-oss-process=image/resize,w_820,h_556)
I2C开发
API介绍
![梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区 梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区](https://dl-harmonyos.51cto.com/images/202208/52df073260ff3bb6e51324dfc198da092ffd9e.png?x-oss-process=image/resize,w_820,h_474)
![梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区 梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区](https://dl-harmonyos.51cto.com/images/202208/7773c7524ce406bec92982fc333fb412eee9cd.png?x-oss-process=image/resize,w_820,h_421)
对应GPIO引脚
![梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区 梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区](https://dl-harmonyos.51cto.com/images/202208/c6a5284736c433e907a1155e804355664cb598.png?x-oss-process=image/resize,w_820,h_991)
对应代码
![梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区 梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区](https://dl-harmonyos.51cto.com/images/202208/a2e5c29129877848da27872eeb1d607456feed.png?x-oss-process=image/resize,w_820,h_536)
UART读写
API介绍
![梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区 梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区](https://dl-harmonyos.51cto.com/images/202208/83241b6706e3c35d3a8659b382aad4784b47cc.png?x-oss-process=image/resize,w_820,h_475)
对应引脚
![梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区 梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区](https://dl-harmonyos.51cto.com/images/202208/769945d60960726b9777323c8879247bf7ded8.png?x-oss-process=image/resize,w_820,h_461)
对应代码
![梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区 梅科尔工作室OpenHarmony设备开发培训笔记-第四章学习笔记-鸿蒙开发者社区](https://dl-harmonyos.51cto.com/images/202208/86526346576666ce26806384cbf1b05e65a5d5.png?x-oss-process=image/resize,w_820,h_540)