日期:2014-05-16  浏览次数:20767 次

set_irq_handler 和 set_irq_chained_handler
这2个函数都是用于注册中断处理程序,有什么区别?

------解决方案--------------------
C/C++ code

/*
 * Set a highlevel flow handler for a given IRQ:
 */
static inline void
set_irq_handler(unsigned int irq, irq_flow_handler_t handle)
{
    __set_irq_handler(irq, handle, 0, NULL);
}


/*
 * Set a highlevel chained flow handler for a given IRQ.
 * (a chained handler is automatically enabled and set to
 *  IRQ_NOREQUEST and IRQ_NOPROBE)
 */
static inline void
set_irq_chained_handler(unsigned int irq,
            irq_flow_handler_t handle)
{
    __set_irq_handler(irq, handle, 1, NULL);
}