<p>Contains required functions for the <aclass="el"href="struct_x_uart_lite.html">XUartLite</a> driver. See the <aclass="el"href="xuartlite_8h.html">xuartlite.h</a> header file for more details on this driver.</p>
<p>Initialize a <aclass="el"href="struct_x_uart_lite.html">XUartLite</a> instance. The receive and transmit FIFOs of the UART are not flushed, so the user may want to flush them. The hardware device does not have any way to disable the receiver such that any valid data may be present in the receive FIFO. This function disables the UART interrupt. The baudrate and format of the data are fixed in the hardware at hardware build time.</p>
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to the <aclass="el"href="struct_x_uart_lite.html">XUartLite</a> instance. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>Config</em> </td><td>is a reference to a structure containing information about a specific UART Lite device. This function initializes an InstancePtr object for a specific device specified by the contents of Config. This function can initialize multiple instance objects with the use of multiple calls giving different Config information on each call. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>EffectiveAddr</em> </td><td>is the device base address in the virtual memory address space. The caller is responsible for keeping the address mapping from EffectiveAddr to the device physical base address unchanged once this function is invoked. Unexpected errors may occur if the address mapping changes after this function is called. If address translation is not used, use Config->BaseAddress for this parameters, passing the physical address instead.</td></tr>
<dlclass="note"><dt><b>Note:</b></dt><dd>The Config pointer argument is not used by this function, but is provided to keep the function signature consistent with other drivers. </dd></dl>
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to the <aclass="el"href="struct_x_uart_lite.html">XUartLite</a> instance.</td></tr>
<p>This function receives a buffer that has been previously specified by setting up the instance variables of the instance. This function is designed to be an internal function for the <aclass="el"href="struct_x_uart_lite.html">XUartLite</a> component such that it may be called from a shell function that sets up the buffer or from an interrupt handler.</p>
<p>This function will attempt to receive a specified number of bytes of data from the UART and store it into the specified buffer. This function is designed for either polled or interrupt driven modes. It is non-blocking such that it will return if there is no data has already received by the UART.</p>
<p>In a polled mode, this function will only receive as much data as the UART can buffer, either in the receiver or in the FIFO if present and enabled. The application may need to call it repeatedly to receive a buffer. Polled mode is the default mode of operation for the driver.</p>
<p>In interrupt mode, this function will start receiving and then the interrupt handler of the driver will continue until the buffer has been received. A callback function, as specified by the application, will be called to indicate the completion of receiving the buffer or when any receive errors or timeouts occur.</p>
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to the <aclass="el"href="struct_x_uart_lite.html">XUartLite</a> instance.</td></tr>
<p>This function will attempt to receive a specified number of bytes of data from the UART and store it into the specified buffer. This function is designed for either polled or interrupt driven modes. It is non-blocking such that it will return if no data has already received by the UART.</p>
<p>In a polled mode, this function will only receive as much data as the UART can buffer in the FIFO. The application may need to call it repeatedly to receive a buffer. Polled mode is the default mode of operation for the driver.</p>
<p>In interrupt mode, this function will start receiving and then the interrupt handler of the driver will continue receiving data until the buffer has been received. A callback function, as specified by the application, will be called to indicate the completion of receiving the buffer or when any receive errors or timeouts occur.</p>
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to the <aclass="el"href="struct_x_uart_lite.html">XUartLite</a> instance. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>DataBufferPtr</em> </td><td>is pointer to buffer for data to be received into. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>NumBytes</em> </td><td>is the number of bytes to be received. A value of zero will stop a previous receive operation that is in progress in interrupt mode.</td></tr>
<dlclass="return"><dt><b>Returns:</b></dt><dd>The number of bytes received.</dd></dl>
<dlclass="note"><dt><b>Note:</b></dt><dd>The number of bytes is not asserted so that this function may be called with a value of zero to stop an operation that is already in progress. </dd></dl>
<p>This function resets the FIFOs, both transmit and receive, of the UART such that they are emptied. Since the UART does not have any way to disable it from receiving data, it may be necessary for the application to reset the FIFOs to get rid of any unwanted data.</p>
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to the <aclass="el"href="struct_x_uart_lite.html">XUartLite</a> instance .</td></tr>
<p>This functions sends the specified buffer of data using the UART in either polled or interrupt driven modes. This function is non-blocking such that it will return before the data has been sent by the UART. If the UART is busy sending data, it will return and indicate zero bytes were sent.</p>
<p>In a polled mode, this function will only send as much data as the UART can buffer in the FIFO. The application may need to call it repeatedly to send a buffer.</p>
<p>In interrupt mode, this function will start sending the specified buffer and then the interrupt handler of the driver will continue sending data until the buffer has been sent. A callback function, as specified by the application, will be called to indicate the completion of sending the buffer.</p>
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to the <aclass="el"href="struct_x_uart_lite.html">XUartLite</a> instance. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>DataBufferPtr</em> </td><td>is pointer to a buffer of data to be sent. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>NumBytes</em> </td><td>contains the number of bytes to be sent. A value of zero will stop a previous send operation that is in progress in interrupt mode. Any data that was already put into the transmit FIFO will be sent.</td></tr>
<dlclass="return"><dt><b>Returns:</b></dt><dd>The number of bytes actually sent.</dd></dl>
<dlclass="note"><dt><b>Note:</b></dt><dd>The number of bytes is not asserted so that this function may be called with a value of zero to stop an operation that is already in progress. </dd></dl>
<p>This function sends a buffer that has been previously specified by setting up the instance variables of the instance. This function is designed to be an internal function for the <aclass="el"href="struct_x_uart_lite.html">XUartLite</a> component such that it may be called from a shell function that sets up the buffer or from an interrupt handler.</p>
<p>This function sends the specified buffer of data to the UART in either polled or interrupt driven modes. This function is non-blocking such that it will return before the data has been sent by the UART.</p>
<p>In a polled mode, this function will only send as much data as the UART can buffer, either in the transmitter or in the FIFO if present and enabled. The application may need to call it repeatedly to send a buffer.</p>
<p>In interrupt mode, this function will start sending the specified buffer and then the interrupt handler of the driver will continue until the buffer has been sent. A callback function, as specified by the application, will be called to indicate the completion of sending the buffer.</p>
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to the <aclass="el"href="struct_x_uart_lite.html">XUartLite</a> instance.</td></tr>