MAX3140
SPI/MICROWIRE-Compatible UART with Integrated
True Fail-Safe RS-485/RS-422 Transceivers
32 ______________________________________________________________________________________
Listing 1. Outline for a MAX3140 Software Driver
Software Driver
Listing 1 is a C-language outline of an interrupt-driven
software driver that interfaces to a MAX3140, providing
an intermediate layer between the bit-manipulation sub-
routine and the familiar PutChar/GetChar subroutines.
The user must supply code for managing the transmit
and receive queues, as well as the low-level hardware
interface itself. The interrupt control hardware must be
initialized before this driver is called.