set_irq_type() -- 设置中断触发类型/方式

linux-2.6.21.7/kernel/irq/chip.c
------------------------------------------------
/**
*    set_irq_type - set the irq type for an irq
*    @irq:    irq number
*    @type:    interrupt type - see include/linux/interrupt.h
*/
int  set_irq_type(unsigned int irq, unsigned int type)




linux-2.6.21.7/include/linux/interrupt.h
------------------------------------------------
#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

你可能感兴趣的:(linux驱动)