<li>Dynamic data format (baud rate, data bits, stop bits, parity)</li>
<li>Polled mode</li>
<li>Interrupt driven mode</li>
<li>Transmit and receive FIFOs (16 bytes each for the 16550)</li>
<li>Access to the external modem control lines and the two discrete outputs</li>
</ul>
<p>The only difference between the 16450 and the 16550 is the addition of transmit and receive FIFOs in the 16550.</p>
<p><b>Initialization & Configuration</b></p>
<p>The <aclass="el"href="struct_x_uart_ns550___config.html">XUartNs550_Config</a> structure is used by the driver to configure itself. This configuration structure is typically created by the tool-chain based on HW build properties.</p>
<p>To support multiple runtime loading and initialization strategies employed by various operating systems, the driver instance can be initialized in one of the following ways:</p>
<li>XUartNs550_Initialize(InstancePtr, DeviceId) - The driver looks up its own configuration structure created by the tool-chain based on an ID provided by the tool-chain.</li>
<li>XUartNs550_CfgInitialize(InstancePtr, CfgPtr, EffectiveAddr) - Uses a configuration structure provided by the caller. If running in a system with address translation, the provided virtual memory base address replaces the physical address present in the configuration structure.</li>
</ul>
<p><b>Baud Rate</b></p>
<p>The UART has an internal baud rate generator that is clocked at a specified input clock frequency. Not all baud rates can be generated from some clock frequencies. The requested baud rate is checked using the provided clock for the system, and checked against the acceptable error range. An error may be returned from some functions indicating the baud rate was in error because it could not be generated.</p>
<p><b>Interrupts</b></p>
<p>The device does not have any way to disable the receiver such that the receive FIFO may contain unwanted data. The FIFOs are not flushed when the driver is initialized, but a function is provided to allow the user to reset the FIFOs if desired.</p>
<p>The driver defaults to no interrupts at initialization such that interrupts must be enabled if desired. An interrupt is generated for any of the following conditions.</p>
<ul>
<li>Transmit FIFO is empty</li>
<li>Data in the receive FIFO equal to the receive threshold</li>
<li>Data in the receiver when FIFOs are disabled</li>
<li>Any receive status error or break condition detected</li>
<li>Data in the receive FIFO for 4 character times without receiver activity</li>
<li>A change of a modem signal</li>
</ul>
<p>The application can control which interrupts are enabled using the SetOptions function.</p>
<p>In order to use interrupts, it is necessary for the user to connect the driver interrupt handler, <aclass="el"href="xuartns550_8h.html#a6e8579fcf317e1f30d61b4fb7fe60434">XUartNs550_InterruptHandler()</a>, to the interrupt system of the application. This function does not save and restore the processor context such that the user must provide it. A handler must be set for the driver such that the handler is called when interrupt events occur. The handler is called from interrupt context and is designed to allow application specific processing to be performed.</p>
<p>The functions, <aclass="el"href="xuartns550_8c.html#a421921af6a8df7c51ddbfa5d2301ad1b">XUartNs550_Send()</a> and <aclass="el"href="xuartns550_8c.html#a35fc171801e394fce29cbcb09dc1ff99">XUartNs550_Recv()</a>, are provided in the driver to allow data to be sent and received. They are designed to be used in polled or interrupt modes.</p>