
This patch updates the doxygen for the drivers trafgen,ttcps,uartlite,uartns550,uartps to include .h files in the listof files provided in the index.html file. Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
612 lines
36 KiB
HTML
Executable file
612 lines
36 KiB
HTML
Executable file
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
|
<title>
|
|
Xilinx Driver uartlite v3_0: xuartlite.h File Reference
|
|
</title>
|
|
<link href="doxygen_kalyanidocs/doc/css/driver_api_doxygen.css" rel="stylesheet" type="text/css">
|
|
</head>
|
|
<h3 class="PageHeader">Xilinx Processor IP Library</h3>
|
|
<hl>Software Drivers</hl>
|
|
<hr class="whs1">
|
|
|
|
<!-- Generated by Doxygen 1.6.1 -->
|
|
<div class="navigation" id="top">
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="files.html"><span>File List</span></a></li>
|
|
<li><a href="globals.html"><span>File Members</span></a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="contents">
|
|
<h1>xuartlite.h File Reference</h1><code>#include "xil_types.h"</code><br/>
|
|
<code>#include "xil_assert.h"</code><br/>
|
|
<code>#include "xstatus.h"</code><br/>
|
|
<table border="0" cellpadding="0" cellspacing="0">
|
|
<tr><td colspan="2"><h2>Classes</h2></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_x_uart_lite___stats.html">XUartLite_Stats</a></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_x_uart_lite___buffer.html">XUartLite_Buffer</a></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_x_uart_lite___config.html">XUartLite_Config</a></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_x_uart_lite.html">XUartLite</a></td></tr>
|
|
<tr><td colspan="2"><h2>Defines</h2></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="xuartlite_8h.html#ad441178033a5726b8a743eaa61af9c85">XUARTLITE_H</a></td></tr>
|
|
<tr><td colspan="2"><h2>Typedefs</h2></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="xuartlite_8h.html#ab0f5a21f40b003c13e1fcde2ab036f75">XUartLite_Handler</a> )(void *CallBackRef, unsigned int ByteCount)</td></tr>
|
|
<tr><td colspan="2"><h2>Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xuartlite_8h.html#acf1026cbafbd78e1f3a7fd0ee433d001">XUartLite_Initialize</a> (<a class="el" href="struct_x_uart_lite.html">XUartLite</a> *InstancePtr, u16 DeviceId)</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_x_uart_lite___config.html">XUartLite_Config</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="xuartlite_8h.html#a2b247b94f9e866c41d3a8f2fde986fa7">XUartLite_LookupConfig</a> (u16 DeviceId)</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xuartlite_8h.html#ac8b83fd67305cebe15aba35b5b1b1e4d">XUartLite_CfgInitialize</a> (<a class="el" href="struct_x_uart_lite.html">XUartLite</a> *InstancePtr, <a class="el" href="struct_x_uart_lite___config.html">XUartLite_Config</a> *Config, u32 EffectiveAddr)</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xuartlite_8h.html#a7932155bf2bc603fc0a972f5aefec77e">XUartLite_ResetFifos</a> (<a class="el" href="struct_x_uart_lite.html">XUartLite</a> *InstancePtr)</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="xuartlite_8h.html#acd990348cf8483d47934d3263dc6fe90">XUartLite_Send</a> (<a class="el" href="struct_x_uart_lite.html">XUartLite</a> *InstancePtr, u8 *DataBufferPtr, unsigned int NumBytes)</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="xuartlite_8h.html#aa30ed8bfedba1acdc67dc94e77d5a41d">XUartLite_Recv</a> (<a class="el" href="struct_x_uart_lite.html">XUartLite</a> *InstancePtr, u8 *DataBufferPtr, unsigned int NumBytes)</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xuartlite_8h.html#a40bc490d296a7a929f1cc5d07bb29b3c">XUartLite_IsSending</a> (<a class="el" href="struct_x_uart_lite.html">XUartLite</a> *InstancePtr)</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xuartlite_8h.html#a081d00a44aeebe19ed77e195a063b4e1">XUartLite_GetStats</a> (<a class="el" href="struct_x_uart_lite.html">XUartLite</a> *InstancePtr, <a class="el" href="struct_x_uart_lite___stats.html">XUartLite_Stats</a> *StatsPtr)</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xuartlite_8h.html#a33651bc4c0c36496d86038d95f39f0cd">XUartLite_ClearStats</a> (<a class="el" href="struct_x_uart_lite.html">XUartLite</a> *InstancePtr)</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xuartlite_8h.html#abfbfaddf9ab531ff85a1c4f9036631aa">XUartLite_SelfTest</a> (<a class="el" href="struct_x_uart_lite.html">XUartLite</a> *InstancePtr)</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xuartlite_8h.html#aca08a21fa15779ce8dedd2ac9f25971e">XUartLite_EnableInterrupt</a> (<a class="el" href="struct_x_uart_lite.html">XUartLite</a> *InstancePtr)</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xuartlite_8h.html#aaa1b67ac0d2f5bf69ce6084ea49cef39">XUartLite_DisableInterrupt</a> (<a class="el" href="struct_x_uart_lite.html">XUartLite</a> *InstancePtr)</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xuartlite_8h.html#a312d1ce48b9e29e08ebb25d942b2ff51">XUartLite_SetRecvHandler</a> (<a class="el" href="struct_x_uart_lite.html">XUartLite</a> *InstancePtr, <a class="el" href="xuartlite_8h.html#ab0f5a21f40b003c13e1fcde2ab036f75">XUartLite_Handler</a> FuncPtr, void *CallBackRef)</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xuartlite_8h.html#a282cca48bbd4c1144c811681854fc780">XUartLite_SetSendHandler</a> (<a class="el" href="struct_x_uart_lite.html">XUartLite</a> *InstancePtr, <a class="el" href="xuartlite_8h.html#ab0f5a21f40b003c13e1fcde2ab036f75">XUartLite_Handler</a> FuncPtr, void *CallBackRef)</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xuartlite_8h.html#a399463f89d7b4e846a4a4089e9cd54fb">XUartLite_InterruptHandler</a> (<a class="el" href="struct_x_uart_lite.html">XUartLite</a> *InstancePtr)</td></tr>
|
|
</table>
|
|
<hr/><a name="_details"></a><h2>Detailed Description</h2>
|
|
<hr/><h2>Define Documentation</h2>
|
|
<a class="anchor" id="ad441178033a5726b8a743eaa61af9c85"></a><!-- doxytag: member="xuartlite.h::XUARTLITE_H" ref="ad441178033a5726b8a743eaa61af9c85" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define XUARTLITE_H</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
</div>
|
|
</div>
|
|
<hr/><h2>Typedef Documentation</h2>
|
|
<a class="anchor" id="ab0f5a21f40b003c13e1fcde2ab036f75"></a><!-- doxytag: member="xuartlite.h::XUartLite_Handler" ref="ab0f5a21f40b003c13e1fcde2ab036f75" args=")(void *CallBackRef, unsigned int ByteCount)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">typedef void(* <a class="el" href="xuartlite_8h.html#ab0f5a21f40b003c13e1fcde2ab036f75">XUartLite_Handler</a>)(void *CallBackRef, unsigned int ByteCount)</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>Callback function. The first argument is a callback reference passed in by the upper layer when setting the callback functions, and passed back to the upper layer when the callback is invoked. The second argument is the ByteCount which is the number of bytes that actually moved from/to the buffer provided in the _Send/_Receive call. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/><h2>Function Documentation</h2>
|
|
<a class="anchor" id="ac8b83fd67305cebe15aba35b5b1b1e4d"></a><!-- doxytag: member="xuartlite.h::XUartLite_CfgInitialize" ref="ac8b83fd67305cebe15aba35b5b1b1e4d" args="(XUartLite *InstancePtr, XUartLite_Config *Config, u32 EffectiveAddr)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int XUartLite_CfgInitialize </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="struct_x_uart_lite.html">XUartLite</a> * </td>
|
|
<td class="paramname"> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="struct_x_uart_lite___config.html">XUartLite_Config</a> * </td>
|
|
<td class="paramname"> <em>Config</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">u32 </td>
|
|
<td class="paramname"> <em>EffectiveAddr</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>Initialize a <a class="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>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_uart_lite.html">XUartLite</a> instance. </td></tr>
|
|
<tr><td valign="top"></td><td valign="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><td valign="top"></td><td valign="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>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd><ul>
|
|
<li>XST_SUCCESS if everything starts up as expected.</li>
|
|
</ul>
|
|
</dd></dl>
|
|
<dl class="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>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a33651bc4c0c36496d86038d95f39f0cd"></a><!-- doxytag: member="xuartlite.h::XUartLite_ClearStats" ref="a33651bc4c0c36496d86038d95f39f0cd" args="(XUartLite *InstancePtr)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void XUartLite_ClearStats </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="struct_x_uart_lite.html">XUartLite</a> * </td>
|
|
<td class="paramname"> <em>InstancePtr</em></td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>This function zeros the statistics for the given instance.</p>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_uart_lite.html">XUartLite</a> instance.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>None.</dd></dl>
|
|
<dl class="note"><dt><b>Note:</b></dt><dd>None. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aaa1b67ac0d2f5bf69ce6084ea49cef39"></a><!-- doxytag: member="xuartlite.h::XUartLite_DisableInterrupt" ref="aaa1b67ac0d2f5bf69ce6084ea49cef39" args="(XUartLite *InstancePtr)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void XUartLite_DisableInterrupt </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="struct_x_uart_lite.html">XUartLite</a> * </td>
|
|
<td class="paramname"> <em>InstancePtr</em></td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>This function disables the UART interrupt. After calling this function, data may still be received by the UART but no interrupt will be generated since the hardware device has no way to disable the receiver.</p>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_uart_lite.html">XUartLite</a> instance.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>None.</dd></dl>
|
|
<dl class="note"><dt><b>Note:</b></dt><dd>None. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aca08a21fa15779ce8dedd2ac9f25971e"></a><!-- doxytag: member="xuartlite.h::XUartLite_EnableInterrupt" ref="aca08a21fa15779ce8dedd2ac9f25971e" args="(XUartLite *InstancePtr)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void XUartLite_EnableInterrupt </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="struct_x_uart_lite.html">XUartLite</a> * </td>
|
|
<td class="paramname"> <em>InstancePtr</em></td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>This function enables the UART interrupt such that an interrupt will occur when data is received or data has been transmitted. The device contains 16 byte receive and transmit FIFOs such that an interrupt is generated anytime there is data in the receive FIFO and when the transmit FIFO transitions from not empty to empty.</p>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_uart_lite.html">XUartLite</a> instance.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>None.</dd></dl>
|
|
<dl class="note"><dt><b>Note:</b></dt><dd>None. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a081d00a44aeebe19ed77e195a063b4e1"></a><!-- doxytag: member="xuartlite.h::XUartLite_GetStats" ref="a081d00a44aeebe19ed77e195a063b4e1" args="(XUartLite *InstancePtr, XUartLite_Stats *StatsPtr)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void XUartLite_GetStats </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="struct_x_uart_lite.html">XUartLite</a> * </td>
|
|
<td class="paramname"> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="struct_x_uart_lite___stats.html">XUartLite_Stats</a> * </td>
|
|
<td class="paramname"> <em>StatsPtr</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>Returns a snapshot of the current statistics in the structure specified.</p>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_uart_lite.html">XUartLite</a> instance. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>StatsPtr</em> </td><td>is a pointer to a XUartLiteStats structure to where the statistics are to be copied.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>None.</dd></dl>
|
|
<dl class="note"><dt><b>Note:</b></dt><dd>None. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="acf1026cbafbd78e1f3a7fd0ee433d001"></a><!-- doxytag: member="xuartlite.h::XUartLite_Initialize" ref="acf1026cbafbd78e1f3a7fd0ee433d001" args="(XUartLite *InstancePtr, u16 DeviceId)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int XUartLite_Initialize </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="struct_x_uart_lite.html">XUartLite</a> * </td>
|
|
<td class="paramname"> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">u16 </td>
|
|
<td class="paramname"> <em>DeviceId</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>Initialize a <a class="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>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_uart_lite.html">XUartLite</a> instance. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>DeviceId</em> </td><td>is the unique id of the device controlled by this <a class="el" href="struct_x_uart_lite.html">XUartLite</a> instance. Passing in a device id associates the generic <a class="el" href="struct_x_uart_lite.html">XUartLite</a> instance to a specific device, as chosen by the caller or application developer.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd><ul>
|
|
<li>XST_SUCCESS if everything starts up as expected.</li>
|
|
<li>XST_DEVICE_NOT_FOUND if the device is not found in the configuration table.</li>
|
|
</ul>
|
|
</dd></dl>
|
|
<dl class="note"><dt><b>Note:</b></dt><dd>None. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a399463f89d7b4e846a4a4089e9cd54fb"></a><!-- doxytag: member="xuartlite.h::XUartLite_InterruptHandler" ref="a399463f89d7b4e846a4a4089e9cd54fb" args="(XUartLite *InstancePtr)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void XUartLite_InterruptHandler </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="struct_x_uart_lite.html">XUartLite</a> * </td>
|
|
<td class="paramname"> <em>InstancePtr</em></td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>This function is the interrupt handler for the UART lite driver. It must be connected to an interrupt system by the user such that it is called when an interrupt for any UART lite occurs. This function does not save or restore the processor context such that the user must ensure this occurs.</p>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>contains a pointer to the instance of the UART that the interrupt is for.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>None.</dd></dl>
|
|
<dl class="note"><dt><b>Note:</b></dt><dd>None. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a40bc490d296a7a929f1cc5d07bb29b3c"></a><!-- doxytag: member="xuartlite.h::XUartLite_IsSending" ref="a40bc490d296a7a929f1cc5d07bb29b3c" args="(XUartLite *InstancePtr)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int XUartLite_IsSending </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="struct_x_uart_lite.html">XUartLite</a> * </td>
|
|
<td class="paramname"> <em>InstancePtr</em></td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>This function determines if the specified UART is sending data. If the transmitter register is not empty, it is sending data.</p>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_uart_lite.html">XUartLite</a> instance.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>A value of TRUE if the UART is sending data, otherwise FALSE.</dd></dl>
|
|
<dl class="note"><dt><b>Note:</b></dt><dd>None. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a2b247b94f9e866c41d3a8f2fde986fa7"></a><!-- doxytag: member="xuartlite.h::XUartLite_LookupConfig" ref="a2b247b94f9e866c41d3a8f2fde986fa7" args="(u16 DeviceId)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="struct_x_uart_lite___config.html">XUartLite_Config</a>* XUartLite_LookupConfig </td>
|
|
<td>(</td>
|
|
<td class="paramtype">u16 </td>
|
|
<td class="paramname"> <em>DeviceId</em></td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aa30ed8bfedba1acdc67dc94e77d5a41d"></a><!-- doxytag: member="xuartlite.h::XUartLite_Recv" ref="aa30ed8bfedba1acdc67dc94e77d5a41d" args="(XUartLite *InstancePtr, u8 *DataBufferPtr, unsigned int NumBytes)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">unsigned int XUartLite_Recv </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="struct_x_uart_lite.html">XUartLite</a> * </td>
|
|
<td class="paramname"> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">u8 * </td>
|
|
<td class="paramname"> <em>DataBufferPtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">unsigned int </td>
|
|
<td class="paramname"> <em>NumBytes</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<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>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_uart_lite.html">XUartLite</a> instance. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>DataBufferPtr</em> </td><td>is pointer to buffer for data to be received into. </td></tr>
|
|
<tr><td valign="top"></td><td valign="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>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of bytes received.</dd></dl>
|
|
<dl class="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>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a7932155bf2bc603fc0a972f5aefec77e"></a><!-- doxytag: member="xuartlite.h::XUartLite_ResetFifos" ref="a7932155bf2bc603fc0a972f5aefec77e" args="(XUartLite *InstancePtr)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void XUartLite_ResetFifos </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="struct_x_uart_lite.html">XUartLite</a> * </td>
|
|
<td class="paramname"> <em>InstancePtr</em></td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<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>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_uart_lite.html">XUartLite</a> instance .</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>None.</dd></dl>
|
|
<dl class="note"><dt><b>Note:</b></dt><dd>None. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="abfbfaddf9ab531ff85a1c4f9036631aa"></a><!-- doxytag: member="xuartlite.h::XUartLite_SelfTest" ref="abfbfaddf9ab531ff85a1c4f9036631aa" args="(XUartLite *InstancePtr)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int XUartLite_SelfTest </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="struct_x_uart_lite.html">XUartLite</a> * </td>
|
|
<td class="paramname"> <em>InstancePtr</em></td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>Runs a self-test on the device hardware. Since there is no way to perform a loopback in the hardware, this test can only check the state of the status register to verify it is correct. This test assumes that the hardware device is still in its reset state, but has been initialized with the Initialize function.</p>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_uart_lite.html">XUartLite</a> instance.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd><ul>
|
|
<li>XST_SUCCESS if the self-test was successful.</li>
|
|
<li>XST_FAILURE if the self-test failed, the status register value was not correct</li>
|
|
</ul>
|
|
</dd></dl>
|
|
<dl class="note"><dt><b>Note:</b></dt><dd>None. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="acd990348cf8483d47934d3263dc6fe90"></a><!-- doxytag: member="xuartlite.h::XUartLite_Send" ref="acd990348cf8483d47934d3263dc6fe90" args="(XUartLite *InstancePtr, u8 *DataBufferPtr, unsigned int NumBytes)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">unsigned int XUartLite_Send </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="struct_x_uart_lite.html">XUartLite</a> * </td>
|
|
<td class="paramname"> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">u8 * </td>
|
|
<td class="paramname"> <em>DataBufferPtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">unsigned int </td>
|
|
<td class="paramname"> <em>NumBytes</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<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>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_uart_lite.html">XUartLite</a> instance. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>DataBufferPtr</em> </td><td>is pointer to a buffer of data to be sent. </td></tr>
|
|
<tr><td valign="top"></td><td valign="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>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of bytes actually sent.</dd></dl>
|
|
<dl class="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>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a312d1ce48b9e29e08ebb25d942b2ff51"></a><!-- doxytag: member="xuartlite.h::XUartLite_SetRecvHandler" ref="a312d1ce48b9e29e08ebb25d942b2ff51" args="(XUartLite *InstancePtr, XUartLite_Handler FuncPtr, void *CallBackRef)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void XUartLite_SetRecvHandler </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="struct_x_uart_lite.html">XUartLite</a> * </td>
|
|
<td class="paramname"> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="xuartlite_8h.html#ab0f5a21f40b003c13e1fcde2ab036f75">XUartLite_Handler</a> </td>
|
|
<td class="paramname"> <em>FuncPtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">void * </td>
|
|
<td class="paramname"> <em>CallBackRef</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>This function sets the handler that will be called when an event (interrupt) occurs in the driver. The purpose of the handler is to allow application specific processing to be performed.</p>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_uart_lite.html">XUartLite</a> instance. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>FuncPtr</em> </td><td>is the pointer to the callback function. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>CallBackRef</em> </td><td>is the upper layer callback reference passed back when the callback function is invoked.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>None.</dd></dl>
|
|
<dl class="note"><dt><b>Note:</b></dt><dd>There is no assert on the CallBackRef since the driver doesn't know what it is (nor should it) </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a282cca48bbd4c1144c811681854fc780"></a><!-- doxytag: member="xuartlite.h::XUartLite_SetSendHandler" ref="a282cca48bbd4c1144c811681854fc780" args="(XUartLite *InstancePtr, XUartLite_Handler FuncPtr, void *CallBackRef)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void XUartLite_SetSendHandler </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="struct_x_uart_lite.html">XUartLite</a> * </td>
|
|
<td class="paramname"> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="xuartlite_8h.html#ab0f5a21f40b003c13e1fcde2ab036f75">XUartLite_Handler</a> </td>
|
|
<td class="paramname"> <em>FuncPtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">void * </td>
|
|
<td class="paramname"> <em>CallBackRef</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>This function sets the handler that will be called when an event (interrupt) occurs in the driver. The purpose of the handler is to allow application specific processing to be performed.</p>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_uart_lite.html">XUartLite</a> instance . </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>FuncPtr</em> </td><td>is the pointer to the callback function. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>CallBackRef</em> </td><td>is the upper layer callback reference passed back when the callback function is invoked.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>None.</dd></dl>
|
|
<dl class="note"><dt><b>Note:</b></dt><dd>There is no assert on the CallBackRef since the driver doesn't know what it is (nor should it) </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<p class="Copyright">
|
|
Copyright © 1995-2014 Xilinx, Inc. All rights reserved.
|
|
</p>
|
|
</body>
|
|
</html>
|