
linux-驱动-gpio
chinseeker
这个作者很懒,什么都没留下…
展开
-
container_of()宏
在学习Linux驱动的过程中,遇到一个宏叫做container_of。 该宏定义在include/linux/kernel.h中,首先来贴出它的代码: /** * container_of - cast a member of a structure out to the containing structure * @ptr: the pointer to the转载 2012-08-16 10:39:01 · 349 阅读 · 0 评论 -
request_irq() | 注册中断服务
在 2.4 内核和 2.6内核中都使用 request_irq() 函数来注册中断服务函数。在 2.4 内核中,需要包含的头文件是 #include ,2.6 内核中需要包含的头文件则是 #include 。函数原型如下: · 2.4 内核 int request_irq (unsigned int irq, void (*handler)(int, void *, struct pt转载 2012-08-16 10:26:29 · 422 阅读 · 0 评论