Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12618 Discussions

example how to use a ISR at a UART?

Altera_Forum
Honored Contributor II
1,226 Views

Can some show me code where a ISR is used? 

 

I want to go to a ISR when i recieved a char or more from a UART. 

I can not find example's.
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
461 Views

Did you check the isr routine rs_interrupt in drivers/serial/NIOSserial.c? 

 

/* * This is the serial driver's generic interrupt routine */ irqreturn_t rs_interrupt(int irq, void *dev_id, struct pt_regs * regs) {     struct NIOS_serial * info = (struct NIOS_serial *) dev_id;     np_uart *    uart= (np_uart *)(info->port);     unsigned short stat = uart->np_uartstatus;     uart->np_uartstatus = 0;  /* clear any error status */     if (stat & np_uartstatus_rrdy_mask) receive_chars(info, regs, stat);     if (stat & np_uartstatus_trdy_mask) transmit_chars(info);     return IRQ_HANDLED; }
0 Kudos
Reply