Chinaunix首页 | 论坛 | 博客
  • 博客访问: 426237
  • 博文数量: 37
  • 博客积分: 1989
  • 博客等级: 上尉
  • 技术积分: 390
  • 用 户 组: 普通用户
  • 注册时间: 2008-06-13 10:30
文章分类

全部博文(37)

文章存档

2013年(2)

2012年(1)

2011年(31)

2010年(1)

2009年(2)

分类: LINUX

2011-04-15 16:26:51

/*linux-2.6.29/include/linux/interrupt.h*/
29 #define IRQF_TRIGGER_NONE 0x00000000
30 #define IRQF_TRIGGER_RISING 0x00000001 //上升沿触发中断
31 #define IRQF_TRIGGER_FALLING 0x00000002 //下降沿触发中断
32 #define IRQF_TRIGGER_HIGH 0x00000004 //高电平触发中断
33 #define IRQF_TRIGGER_LOW 0x00000008 //低电平触发中断
34 #define IRQF_TRIGGER_MASK (IRQF_TRIGGER_HIGH | IRQF_TRIGGER_LOW | \
35 IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)
36 #define IRQF_TRIGGER_PROBE 0x00000010


/* * These correspond to the IORESOURCE_IRQ_* defines in
 * linux/ioport.h to select the interrupt line behaviour.  When
 * requesting an interrupt without specifying a IRQF_TRIGGER, the
 * setting should be assumed to be "as already configured", which
 * may be as per machine or firmware initialisation.*/
#define IRQF_TRIGGER_NONE 0x00000000
#define IRQF_TRIGGER_RISING 0x00000001
#define IRQF_TRIGGER_FALLING 0x00000002
#define IRQF_TRIGGER_HIGH 0x00000004
#define IRQF_TRIGGER_LOW 0x00000008
#define IRQF_TRIGGER_MASK (IRQF_TRIGGER_HIGH | IRQF_TRIGGER_LOW | \ IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)
#define IRQF_TRIGGER_PROBE 0x00000010
/* * These flags used only by the kernel as part of the 
* irq handling routines. *
 * IRQF_DISABLED - keep irqs disabled when calling the action handler
 * IRQF_SAMPLE_RANDOM - irq is used to feed the random generator
 * IRQF_SHARED - allow sharing the irq among several devices 
* IRQF_PROBE_SHARED - set by callers when they expect sharing mismatches to occur 
* IRQF_TIMER - Flag to mark this interrupt as timer interrupt 
* IRQF_PERCPU - Interrupt is per cpu 
* IRQF_NOBALANCING - Flag to exclude this interrupt from irq balancing
 * IRQF_IRQPOLL - Interrupt is used for polling (only the interrupt that is 
*                registered first in an shared interrupt is considered for
 *                performance reasons) * IRQF_ONESHOT - Interrupt is not reenabled after the hardirq handler finished. 
*                Used by threaded interrupts which need to keep the
 *                irq line disabled until the threaded handler has been run. */
#define IRQF_DISABLED 0x00000020
#define IRQF_SAMPLE_RANDOM 0x00000040
#define IRQF_SHARED 0x00000080
#define IRQF_PROBE_SHARED 0x00000100
#define IRQF_TIMER 0x00000200
#define IRQF_PERCPU 0x00000400
#define IRQF_NOBALANCING 0x00000800
#define IRQF_IRQPOLL 0x00001000
#define IRQF_ONESHOT 0x00002000
阅读(9832) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~