linux中断入口函数的传入参数
我在网上找到2个中断入口函数static irqreturn_t hold_isr(int irq, void *dev_id)
{
int state;
mdelay(5);
state = gpio_get_value(HOLD_IRQ);
if (state == 1) {
disable_irq(irq);
schedule_work(&hold_wq);
}
return IRQ_HANDLED;
}
static irqreturn_t pxa_rtc_tickirq(int irq, void *dev_id, struct pt_regs *regs)
{
unsigned long num = 0, events = RTC_IRQF;
/*
* If we match for the first time, the periodic interrupt flag won't
* be set.If it is, then we did wrap around (very unlikely but
* still possible) and compute the amount of missed periods.
* The match reg is updated only when the data is actually retrieved
* to avoid unnecessary interrupts.
*/
OSSR = OSSR_M1; /* clear match on timer1 */
OSMR1 = TIMER_FREQ/rtc_freq + OSCR;
num++;
events |= RTC_PF;
/* update irq data & counter */
rtc_update(num, events);
return IRQ_HANDLED;
}
为什么这2个函数的中断传入参数不同呢?
页:
[1]