- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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;
}
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page