Embedded Systems Building Blocks, Second Edition

11.08: Configuration

11.08 Configuration

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.

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Digital Signal Processors (DSP)
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.