Altera_Forum
Honored Contributor
16 years agoIRQs
hey everybody, is there an easy guide to use IP core's IRQ in uClinux? do I need an interrupt handler or read from a specific location? thanks :)
you're right, it's completly different now
I tried to write the simplest thing I could in the __init function: <div class='quotetop'>QUOTE </div> --- Quote Start --- /* register interrupt */ if (request_irq(UART_IRQ, uart_pio_isr, IRQF_DISABLED, "uart_pio", (void *)(uart_pio_isr))) { printk("uart_pio: unable to register interrupt %d\n", UART_IRQ); return -1; }[/b] --- Quote End --- above it: <div class='quotetop'>QUOTE </div> --- Quote Start --- static irqreturn_t uart_pio_isr(int irq, void *dev_id, struct pt_regs *regs) { int data; data = inb(UART); printk("<>Interrupt recieved, "); printk("data is %d<>\n",data); return IRQ_HANDLED; }[/b] --- Quote End --- but I still can't get interrupts... I know it's not a hw problem does this warning has something to do with it? <div class='quotetop'>quote </div>--- quote start ---
warning: passing argument 2 of 'request_irq' from incompatible pointer type --- Quote End --- [/b] thanks :huh: