request_irq
来源:互联网 发布:c语言零基础入门书籍 编辑:程序博客网 时间:2024/05/06 09:26
分类: 零碎 2012-02-22 14:29 157人阅读 评论(0)收藏 举报
#include <linux/sched.h>
int request_irq(unsigned int irq,
void (*handler)(int irq,void dev_id,struct pt_regs *regs),
unsigned long flags,
const char *device,
void *dev_id);
void free_irq(unsigned int irq, void *dev_id);
参数说明:
int request_irq(unsigned int irq,
void (*handler)(int irq,void dev_id,struct pt_regs *regs),
unsigned long flags,
const char *device,
void *dev_id);
void free_irq(unsigned int irq, void *dev_id);
参数说明:
参数irq表示所要申请的硬件中断号。
handler为向系统登记的中断处理子程序,中 断产生时由系统来调用,调用时所带参数irq为中断号,dev_id为申请时告诉系统的设备标识,regs为中断发生时寄存器内容。
device为设备名,将会出现在/proc/interrupts文件里。
flag是申请时的选项,它决定中断处理程序的一些特性,其中最重要的是中断 处理程序是快速处理程序(flag里设置了SA_INTERRUPT)还是慢速处理程序(不设置SA_INTERRUPT),快速处理程序运行时,所有中断都被屏蔽,而慢速处理程序运行时,除了正在处理的中断外,其它中断都没有被屏蔽。在LINUX系统中,中断可以被不同的中断处理程序共享,这要求每一个共享此中断的处理程序在申请中断时在flags里设置SA_SHIRQ,这些处理程序之间以dev_id来区分。如果中断由某个处理程序独占,则dev_id可以 为NULL。
request_irq返回0表示成功,返回
- request_irq()
- request_irq
- request_irq
- request_irq
- request_irq()
- request_irq()、free_irq()
- request_irq()、free_irq()
- request_irq()、free_irq()
- request_irq()、free_irq()
- request_irq()、free_irq()
- request_irq函数
- request_irq函数
- request_irq()、free_irq()
- request_irq() | 注册中断服务
- request_irq() | 注册中断服务
- request_irq() | 注册中断服务
- request_irq() | 注册中断服务
- request_irq() | 注册中断服务
- String字符串操作的实例化:
- 完美卸载oracle数据库
- 在android中用 Intent 传递 List类型的数据(转)
- 通过Intent传递一些二进制数据的方法有哪些?
- Quartz 2D编程指南(1) - 概览
- request_irq
- js事件冒泡问题
- 生活随笔:即将回归
- 到达目标位置最少平方移动次数
- 【PB】献给PowerBuilder初学者
- SQLite3 API编程手册
- 深入分析request_irq的dev_id参数作用
- JSP页面中的菜单 选中后的菜单 样式修改 如何判断选中的菜单
- 【PB】数据窗口的错误提示不显示(item '' does not pass validation test!)