HOME       UP       PREV       FURTHER NOTES       NEXT (I/O Blocks, Common Interface Nets.)  

Programming for the UART using Interrupts

Click on this: »C Code For Device Driver


The code fragment illustrates the complete set of four software routines needed to manage a pair of circular buffers for input and output to the UART.

If the UART has a single interrupt output for both send and receive events, then two of the four routines are combined with a software dispatch between their bodies.


(C) 2008-10, DJ Greaves, University of Cambridge, Computer Laboratory.