当前位置:网站首页>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";
};
};
边栏推荐
- ADB 安装 + 打驱动全教程
- IPV6地址
- [2022 Hangzhou Electric Multi-School 5 1003 Slipper] Multiple Super Source Points + Shortest Path
- Zero-knowledge proof notes - private transaction, pederson, interval proof, proof of ownership
- adb控制常用命令
- QT(42)-QT线程-线程调用槽函数
- 1、File对象学习
- 88. (the home of cesium) cesium polymerization figure
- How to train a deep learning model?
- for 循环中的 ++i 与 i++
猜你喜欢
随机推荐
模拟对抗之红队免杀开发实践
dotnet delete read-only files
格密码入门
Configure laravel queue method using fort app manager
零知识证明笔记——私密交易,pederson,区间证明,所有权证明
Debug locally and start the local server in vs code
【学术相关】清华教授发文劝退读博:我见过太多博士生精神崩溃、心态失衡、身体垮掉、一事无成!...
链栈的应用
推荐系统_刘老师
【AGC】构建服务1-云函数示例
How to carry out AI business diagnosis and quickly identify growth points for cost reduction and efficiency improvement?
composition-api
用 Excel 爬取网络数据的四个小案例
Spss-系统聚类手算实操
STP基本配置及802.1D生成树协议的改进
某男子因用本地虚拟机做压测,惨遭字节面试官当场嘲笑
for 循环中的 ++i 与 i++
Spss-一元回归实操
简述@RequestParam与@RequestBody参数注解
mdk5.14 cannot be burned