[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
[rtl] (Un)masking hardware interrupts
I have been trying to use a custom-built timing card which uses IRQ5. I
cannot enable IRQ5 interrupts, though I can see the timing pulses on the
bus. This is a fragment of the code I use:
-------------------------------
#define MASTER 0x20
#define IRQ5 0xd
static int output = 0xffff ;
/* Test interrupt handler toggles all LPT ports */
void handler(void)
{
while ( 1 ) {
outb(output, LPT_PORT) ;
output = ~output ;
}
}
int init_module(void)
{
unsigned char int_mask ;
.....
/* Replace IRQ5 vector with intrp() */
free_RTirq(IRQ5) ;
request_RTirq(IRQ5, handler ) ;
....
/* Unmask IRQ5 interrupts */
int_mask = inb ( MASTER+1 ) ; /* Read the current interrupt mask */
outb ( int_mask & 0xdf, MASTER+1 ) ; /* Unmask IRQ5 */
.....
}
Does anyone have any ideas why this doesn't work? I tried masking and
unmasking interrupts on the example "rtc_toggle.c" (in /parallel), with
inconsistent results. Is it forbidden to mask/unmask interrupts in RTLinux?
Many thanks
Luis Balona lab@saao.ac.za
South African Astronomical Observatory
Cape Town
South Africa
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail majordomo@rtlinux.cs.nmt.edu OR
echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.cs.nmt.edu
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/