BSP and Device Driver Development Guide
The InterruptHandler
is responsible for processing asynchronous
interrupts from the UART. There may be multiple interrupt handlers for
a single UART. Some UARTs can generate a unique interrupt vector for
each interrupt source such as a character has been received or the
transmitter is ready for another character.
In the simplest case, the InterruptHandler
will have to check
the status of the UART and determine what caused the interrupt.
The following describes the operation of an InterruptHandler
which has to do this:
rtems_isr InterruptHandler (rtems_vector_number v) { check whether there was an error if some characters were received: Ask Termios to put them on his input buffer if some characters have been transmitted (i.e. the UART output buffer is empty) Tell TERMIOS that the characters have been transmitted. The TERMIOS routine will call the InterruptWrite function with the number of characters not transmitted yet if it is not zero. }
BSP and Device Driver Development Guide
Copyright © 1988-2000 OAR Corporation