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

RE: Interrupt handling


I assume that you need to write a device driver to control
your device. Generally instructions for writing a device
driver for elinux can be found in:


You also need the following additions in the driver to enable
and handle the interrupt:

  /* Request the interrupt */
  if(request_irq(10, driver_interrupt, 0, "myDevice", NULL))
    panic("Can't alloc irq");

  /* Enable the interrupt */
  *R_IRQ_MASK0_SET = IO_STATE(R_IRQ_MASK0_SET, irq_int_vector_nr, set);

  /* Here you need to clear the interrupt in the external unit */
  /* You can also set up a bottom half handler to handle the rest of */
  /* the interrupt (if you need to do a lot off stuff for each IRQ) */

Note that the code examples above have not been tested by us.

Best Regards,

-----Original Message-----
From: owner-dev-etrax@xxxxxxx.com]On">mailto:owner-dev-etrax@xxxxxxx.com]On
Behalf Of Stijn Decneut
Sent: Tuesday, November 28, 2000 5:07 PM
To: dev-etrax
Subject: Interrupt handling


I'm trying to use the external IRQ-pin of the ETRAX-100, but despite
quite some digging in the code, I'm not able to find a way to program
the ISR. Where do I enable the IRQ with internal vector number? And
where do I write the code for that specific ISR?

Maybe this fits in a chapter of the 'Designers Reference', if so, could
I get a <possibly preliminary> version of that chapter, or a small

thank you in advance,

Stijn Decneut