embeddedsw/XilinxProcessorIPLib/drivers/wdttb/doc/html/api/xwdttb_8h.html

304 lines
15 KiB
HTML
Raw Normal View History

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>
Xilinx Driver wdttb v3_0: xwdttb.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&nbsp;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&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>xwdttb.h File Reference</h1><code>#include &quot;xil_types.h&quot;</code><br/>
<code>#include &quot;xil_assert.h&quot;</code><br/>
<code>#include &quot;xstatus.h&quot;</code><br/>
<code>#include &quot;<a class="el" href="xwdttb__l_8h.html">xwdttb_l.h</a>&quot;</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 &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_x_wdt_tb___config.html">XWdtTb_Config</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_x_wdt_tb.html">XWdtTb</a></td></tr>
<tr><td colspan="2"><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xwdttb_8h.html#aa6893b6ff733519d217debc3a198903f">XWDTTB_H</a></td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xwdttb_8h.html#a069965d73fae1f4b2b9a27e0212304c0">XWdtTb_Initialize</a> (<a class="el" href="struct_x_wdt_tb.html">XWdtTb</a> *InstancePtr, u16 DeviceId)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xwdttb_8h.html#aab195e280eca1e2985509d954c2e4e52">XWdtTb_Start</a> (<a class="el" href="struct_x_wdt_tb.html">XWdtTb</a> *InstancePtr)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xwdttb_8h.html#ad6010e9007dca3b7a1fe928e615b4475">XWdtTb_Stop</a> (<a class="el" href="struct_x_wdt_tb.html">XWdtTb</a> *InstancePtr)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xwdttb_8h.html#a9b349652da0f47eaac2b1766a1f237fc">XWdtTb_IsWdtExpired</a> (<a class="el" href="struct_x_wdt_tb.html">XWdtTb</a> *InstancePtr)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xwdttb_8h.html#ae1f036194a32943f4e058f51b8f64358">XWdtTb_RestartWdt</a> (<a class="el" href="struct_x_wdt_tb.html">XWdtTb</a> *InstancePtr)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">u32&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xwdttb_8h.html#a9cd1c306bdea0951ef54d3f854cc0c2c">XWdtTb_GetTbValue</a> (<a class="el" href="struct_x_wdt_tb.html">XWdtTb</a> *InstancePtr)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_x_wdt_tb___config.html">XWdtTb_Config</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xwdttb_8h.html#a14a07eb4184572676004f3d965ebb7fd">XWdtTb_LookupConfig</a> (u16 DeviceId)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xwdttb_8h.html#ad5426484dd69d1a287d1d71dbdda350c">XWdtTb_SelfTest</a> (<a class="el" href="struct_x_wdt_tb.html">XWdtTb</a> *InstancePtr)</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="aa6893b6ff733519d217debc3a198903f"></a><!-- doxytag: member="xwdttb.h::XWDTTB_H" ref="aa6893b6ff733519d217debc3a198903f" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define XWDTTB_H</td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a9cd1c306bdea0951ef54d3f854cc0c2c"></a><!-- doxytag: member="xwdttb.h::XWdtTb_GetTbValue" ref="a9cd1c306bdea0951ef54d3f854cc0c2c" args="(XWdtTb *InstancePtr)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">u32 XWdtTb_GetTbValue </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_x_wdt_tb.html">XWdtTb</a> *&nbsp;</td>
<td class="paramname"> <em>InstancePtr</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the current contents of the timebase.</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>&nbsp;</td><td>is a pointer to the <a class="el" href="struct_x_wdt_tb.html">XWdtTb</a> instance to be worked on.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The contents of the timebase.</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>None. </dd></dl>
</div>
</div>
<a class="anchor" id="a069965d73fae1f4b2b9a27e0212304c0"></a><!-- doxytag: member="xwdttb.h::XWdtTb_Initialize" ref="a069965d73fae1f4b2b9a27e0212304c0" args="(XWdtTb *InstancePtr, u16 DeviceId)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int XWdtTb_Initialize </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_x_wdt_tb.html">XWdtTb</a> *&nbsp;</td>
<td class="paramname"> <em>InstancePtr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">u16&nbsp;</td>
<td class="paramname"> <em>DeviceId</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Initialize a specific watchdog timer/timebase instance/driver. This function must be called before other functions of the driver are called.</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>&nbsp;</td><td>is a pointer to the <a class="el" href="struct_x_wdt_tb.html">XWdtTb</a> instance to be worked on. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>DeviceId</em>&nbsp;</td><td>is the unique id of the device controlled by this <a class="el" href="struct_x_wdt_tb.html">XWdtTb</a> instance. Passing in a device id associates the generic <a class="el" href="struct_x_wdt_tb.html">XWdtTb</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 initialization was successful</li>
<li>XST_DEVICE_IS_STARTED if the device has already been started</li>
<li>XST_DEVICE_NOT_FOUND if the configuration for device ID was not found</li>
</ul>
</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>None. </dd></dl>
</div>
</div>
<a class="anchor" id="a9b349652da0f47eaac2b1766a1f237fc"></a><!-- doxytag: member="xwdttb.h::XWdtTb_IsWdtExpired" ref="a9b349652da0f47eaac2b1766a1f237fc" args="(XWdtTb *InstancePtr)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int XWdtTb_IsWdtExpired </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_x_wdt_tb.html">XWdtTb</a> *&nbsp;</td>
<td class="paramname"> <em>InstancePtr</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Check if the watchdog timer has expired. This function is used for polled mode and it is also used to check if the last reset was caused by the watchdog timer.</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>&nbsp;</td><td>is a pointer to the <a class="el" href="struct_x_wdt_tb.html">XWdtTb</a> instance to be worked on.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE if the watchdog has expired, and FALSE otherwise.</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>None. </dd></dl>
</div>
</div>
<a class="anchor" id="a14a07eb4184572676004f3d965ebb7fd"></a><!-- doxytag: member="xwdttb.h::XWdtTb_LookupConfig" ref="a14a07eb4184572676004f3d965ebb7fd" args="(u16 DeviceId)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="struct_x_wdt_tb___config.html">XWdtTb_Config</a>* XWdtTb_LookupConfig </td>
<td>(</td>
<td class="paramtype">u16&nbsp;</td>
<td class="paramname"> <em>DeviceId</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<a class="anchor" id="ae1f036194a32943f4e058f51b8f64358"></a><!-- doxytag: member="xwdttb.h::XWdtTb_RestartWdt" ref="ae1f036194a32943f4e058f51b8f64358" args="(XWdtTb *InstancePtr)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void XWdtTb_RestartWdt </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_x_wdt_tb.html">XWdtTb</a> *&nbsp;</td>
<td class="paramname"> <em>InstancePtr</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Restart the watchdog timer. An application needs to call this function periodically to keep the timer from asserting the reset output.</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>&nbsp;</td><td>is a pointer to the <a class="el" href="struct_x_wdt_tb.html">XWdtTb</a> instance to be worked on.</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="ad5426484dd69d1a287d1d71dbdda350c"></a><!-- doxytag: member="xwdttb.h::XWdtTb_SelfTest" ref="ad5426484dd69d1a287d1d71dbdda350c" args="(XWdtTb *InstancePtr)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int XWdtTb_SelfTest </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_x_wdt_tb.html">XWdtTb</a> *&nbsp;</td>
<td class="paramname"> <em>InstancePtr</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Run a self-test on the timebase. This test verifies that the timebase is incrementing. The watchdog timer is not tested due to the time required to wait for the watchdog timer to expire. The time consumed by this test is dependant on the system clock and the configuration of the dividers in for the input clock of the timebase.</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>&nbsp;</td><td>is a pointer to the <a class="el" href="struct_x_wdt_tb.html">XWdtTb</a> instance to be worked on.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><ul>
<li>XST_SUCCESS if self-test was successful</li>
<li>XST_WDTTB_TIMER_FAILED if the timebase is not incrementing</li>
</ul>
</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>None. </dd></dl>
</div>
</div>
<a class="anchor" id="aab195e280eca1e2985509d954c2e4e52"></a><!-- doxytag: member="xwdttb.h::XWdtTb_Start" ref="aab195e280eca1e2985509d954c2e4e52" args="(XWdtTb *InstancePtr)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void XWdtTb_Start </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_x_wdt_tb.html">XWdtTb</a> *&nbsp;</td>
<td class="paramname"> <em>InstancePtr</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Start the watchdog timer of the device.</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>&nbsp;</td><td>is a pointer to the <a class="el" href="struct_x_wdt_tb.html">XWdtTb</a> instance to be worked on.</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>The Timebase is reset to 0 when the Watchdog Timer is started. The Timebase is always incrementing </dd></dl>
</div>
</div>
<a class="anchor" id="ad6010e9007dca3b7a1fe928e615b4475"></a><!-- doxytag: member="xwdttb.h::XWdtTb_Stop" ref="ad6010e9007dca3b7a1fe928e615b4475" args="(XWdtTb *InstancePtr)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int XWdtTb_Stop </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_x_wdt_tb.html">XWdtTb</a> *&nbsp;</td>
<td class="paramname"> <em>InstancePtr</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Disable the watchdog timer.</p>
<p>It is the caller's responsibility to disconnect the interrupt handler of the watchdog timer from the interrupt source, typically an interrupt controller, and disable the interrupt in the interrupt controller.</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>&nbsp;</td><td>is a pointer to the <a class="el" href="struct_x_wdt_tb.html">XWdtTb</a> instance to be worked on.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><ul>
<li>XST_SUCCESS if the watchdog was stopped successfully</li>
<li>XST_NO_FEATURE if the watchdog cannot be stopped</li>
</ul>
</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd></dd></dl>
<p>The hardware configuration controls this functionality. If it is not allowed by the hardware the failure will be returned and the timer will continue without interruption. </p>
</div>
</div>
</div>
<p class="Copyright">
Copyright &copy; 1995-2014 Xilinx, Inc. All rights reserved.
</p>
</body>
</html>