当前位置:网站首页>STM32MP157A驱动开发 | 01- 板载LED作为系统心跳指示灯
STM32MP157A驱动开发 | 01- 板载LED作为系统心跳指示灯
2022-08-04 21:00:00 【Mculover666】
一、板载LED

此用户LED连接到PA13。
二、作为用户LED
1. 设备树描述
添加pinctrl描述,将PA13作为普通gpio:
&pinctrl {
led_pins_a: led-0 {
pins {
pinmux = <STM32_PINMUX('A', 13, GPIO)>; /* USER_LED */
};
};
};
添加led节点描述:
led {
compatible = "gpio-leds";
pinctrl-0 = <&led_pins_a>;
blue {
label = "blue";
gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
default-state = "off";
};
};
2. 测试
重新编译设备树,启动。
三、作为系统心跳LED
led {
compatible = "gpio-leds";
pinctrl-0 = <&led_pins_a>;
heartled {
label = "heartled";
gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
linux,default-trigger = "heartbeat";
default-state = "off";
};
};
边栏推荐
猜你喜欢

Spss-系统聚类手算实操

proe和creo的区别有哪些

【2022牛客多校5 A题 Don‘t Starve】DP

使用百度EasyDL实现森林火灾预警识别
![[2022 Nioke Duo School 5 A Question Don't Starve] DP](/img/fa/f1d11297cc5f58919bcc579f0a82e9.png)
[2022 Nioke Duo School 5 A Question Don't Starve] DP

伺服电机矢量控制原理与仿真(1)控制系统的建立

无代码平台字段设置:基础设置入门教程

Zero-knowledge proof notes - private transaction, pederson, interval proof, proof of ownership

经验分享|盘点企业进行知识管理时的困惑类型

How to carry out AI business diagnosis and quickly identify growth points for cost reduction and efficiency improvement?
随机推荐
LayaBox---知识点
Five Minutes Introductory Text Processing Three Musketeers grep awk sed
QT(41)-多线程-QTThread-同步QSemaphore-互斥QMutex
C语言小笔记+题
dotnet 使用 lz4net 压缩 Stream 或文件
Spss-系统聚类软件实操
3、IO流之字节流和字符流
bracket matching
Dotnet using WMI software acquisition system installation
经验分享|盘点企业进行知识管理时的困惑类型
顺序队列
Win10 uwp use ScaleTransform magnify an element
QT(42)-QT线程-线程调用槽函数
moke、动态图片资源打包显示
Debug locally and start the local server in vs code
MATLAB中readtimetable函数用法
How to carry out AI business diagnosis and quickly identify growth points for cost reduction and efficiency improvement?
零知识证明笔记——私密交易,pederson,区间证明,所有权证明
win10 uwp 修改图片质量压缩图片
LINQ to SQL (Group By/Having/Count/Sum/Min/Max/Avg操作符)