Michael Barabanov wrote:
>
> For RT-interrupts, the low-level irq handling code works as follows
>
> handler:
> mask_interrupt_line
> ack_irq_controller
> call RT-handler
> return_from_interrupt
>
> So if it's needed to receive further interrupts from the device,
> one has to explicitely re-enable the interrupt line in the handler.
>
> Michael.
That's the way i understand it. What i didn't quite understand is
this
code where he installs the interrupt handler
rtl_no_interrupts(f);
status = rtl_request_irq(7, intr_handler);
/* enbable parallel port interrupt */
outb_p(inb_p(0x37A) | 0x10, 0x37A);
outb_p(inb_p(0x21) & (~0x80), 0x21); //confusing
outb_p(0x20, 0x20); //confusing
rtl_hard_enable_irq(7);
rtl_restore_interrupts(f);
I added comments where i am confused. He directly
manipulates the irq controller in those lines. My understanding of
rtl is
that you don't have to do that, so i took those two lines out, but it
didn't
work always. Then i took out the lines where he says rtl_no_interrupt
and
rtl_restore_interrupt and then it works again.
Now my code looks like this:
status = rtl_request_irq(7, intr_handler);
/* enable parallel port interrupt */
outb_p(inb_p(0x37A) | 0x10, 0x37A);
rtl_hard_enable_irq(7);
This should install the interrupt 7 handler and enable interrupt 7,
right?
thanks,
eric
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/