Embedded Systems Building Blocks, Second Edition

Configuration of the communications driver is very simple because all you have to do is change a few #defines to accomodate your environment.
COMM_PC.H (or CFG.H):
COMM1_BASE and COMM2_BASE are the base port address for the PC's COM1 and COM2. In most cases, you will not have to change these.
COMM_MAX_RX sets the number of bytes that the UART buffers internally. For the NS16550 UART, you should set this constant to 16 because the NS16550 can be receiving a byte while another byte is waiting to be processed by the CPU.
COMMBGND.H, COMMRTOS.H (or CFG.H):
COMM_RX_BUF_SIZE sets the size of the receive ring buffer for both serial ports. The size of the receive buffer can be as large as 65534 bytes.
COMM_TX_BUF_SIZE sets the size of the transmit ring buffer for both serial ports. As with the receive ring buffer, the size can be as large as 65534 bytes.