X5之LED驱动
来源:互联网 发布:mysql认证考试费用 编辑:程序博客网 时间:2024/04/28 07:28
1、程序调用
1) 位于src\drivers\boards\px4fmu-v1\px4fmu_init.c 中 _EXPORT int nsh_archinitialize(void) ()
{
int result;
。。。。。。。。。。。。。。。。。。
hrt_call_every(&serial_dma_call,
ts_to_abstime(&ts),
ts_to_abstime(&ts),
(hrt_callout)stm32_serial_dma_poll,
NULL);
/* initial LED state */
drv_led_start();
led_off(LED_AMBER);
led_off(LED_BBLUE);
。。。。。。。。。。。。。。。。。。。。。。。。。。
}
2)\src\drivers\led\led.cpp中
void drv_led_start(void)
{
if (gLED == nullptr) {
gLED = new LED;
if (gLED != nullptr)
gLED->init();
}
}
CDev::init()
{
// base class init first
int ret = Device::init();
if (ret != OK)
goto out;
// now register the driver
if (_devname != nullptr) {
ret = register_driver(_devname, &fops, 0666, (void *)this);
if (ret != OK)
goto out;
_registered = true;
}
out:
return ret;
}
由此可见调用CDev::init()会注册设备。
0 0
- X5之LED驱动
- ARM之LED驱动
- linux驱动之--led驱动
- 字符驱动之LED驱动
- mini2440驱动分析之LED
- 字符设备驱动之LED
- linux驱动分析之LED
- linux驱动编程实践之LED驱动
- LINUX驱动编程之LED驱动
- Linux内核模块驱动之---led驱动
- Linux驱动开发之LED驱动
- linux驱动之LED驱动_1
- linux驱动之LED驱动_2
- Linux字符设备驱动之LED驱动
- linux驱动之LED驱动体验
- linux驱动开发之LED驱动
- linux设备驱动之LED驱动测试
- mini2440 led驱动代码 基于kernel2.6.32.2 之led
- [总结]UML类图几种关系
- Sequence
- 面试资料准备(1)
- 跟小博老师一起学习数据库 ——order by
- Linux常用命令总结
- X5之LED驱动
- HDU1241 Oil Deposits 【DFS】
- lua元表
- Leetcode 232. Implement Queue using Stacks
- AVL树的实现
- Leetcode-131. Palindrome Partitioning
- BeanUtils组件使用小指南
- 你想要的线程池知识,都在这里
- 认识敏捷开发