[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to get an Interruption in par0



Hi

I want to get an interruption from p0perror(pin 23) in par0 and I do this:

driver_open()

{

    ...

    request_irq(4,driver_interrupt,SA_INTERRUPT,"/dev/mydevice",NULL);

    *R_IRQ_MASK0_CLR = IO_STATE(R_IRQ_MASK0_CLR, par0_peri, clr);

    *R_IRQ_MASK0_SET = IO_STATE(R_IRQ_MASK0_SET, par0_peri, set);

    *R_VECT_MASK_CLR = IO_STATE(R_VECT_MASK_CLR, par0, clr);

    *R_VECT_MASK_SET = IO_STATE(R_VECT_MASK_SET, par0, set);

    ...

}

driver_interrupt()
{
	...
}

IS IT CORRECT???

Ion Cadierno

Thanks in advance