815 lines
44 KiB
HTML
815 lines
44 KiB
HTML
![]() |
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||
|
<title>
|
||
|
Xilinx Driver tmrctr v3_0: xtmrctr.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>xtmrctr.h File Reference</h1><code>#include "xil_types.h"</code><br/>
|
||
|
<code>#include "xil_assert.h"</code><br/>
|
||
|
<code>#include "xstatus.h"</code><br/>
|
||
|
<code>#include "<a class="el" href="xtmrctr__l_8h.html">xtmrctr_l.h</a>"</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_tmr_ctr___config.html">XTmrCtr_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_tmr_ctr_stats.html">XTmrCtrStats</a></td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</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="xtmrctr_8h.html#afc4684a3912a1169c7516b7dad56a20a">XTMRCTR_H</a></td></tr>
|
||
|
<tr><td colspan="2"><div class="groupHeader">Configuration options</div></td></tr>
|
||
|
<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp50f33d14f129e4548c1c270fd6725a78"></a> These options are used in <a class="el" href="xtmrctr_8h.html#a93d796cf55144d6adb3c51fedf6c3b76">XTmrCtr_SetOptions()</a> and <a class="el" href="xtmrctr_8h.html#aaff209dc01c2946c239c6e5c1bdc1a5b">XTmrCtr_GetOptions()</a> </p>
|
||
|
<br/><br/></div></td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="xtmrctr_8h.html#a4fb085742ee50628791c81ff9a14bc2c">XTC_CASCADE_MODE_OPTION</a> 0x00000080UL</td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="xtmrctr_8h.html#ac50df31e95b1a82441de09ff360eca48">XTC_ENABLE_ALL_OPTION</a> 0x00000040UL</td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="xtmrctr_8h.html#a9cc7b106e2e846ec41fd983da0772dc8">XTC_DOWN_COUNT_OPTION</a> 0x00000020UL</td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="xtmrctr_8h.html#af93c62016d132546b5ee99789b4e48c1">XTC_CAPTURE_MODE_OPTION</a> 0x00000010UL</td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="xtmrctr_8h.html#aad72f141ec429ad4b782868c33b32c1b">XTC_INT_MODE_OPTION</a> 0x00000008UL</td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="xtmrctr_8h.html#ace3deb2a423d72960864a46eacd11fdc">XTC_AUTO_RELOAD_OPTION</a> 0x00000004UL</td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="xtmrctr_8h.html#a3d33636409ed76e99828909edcff0d4a">XTC_EXT_COMPARE_OPTION</a> 0x00000002UL</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="xtmrctr_8h.html#a2d96523ba7b80814a9f6c769619564cf">XTmrCtr_Handler</a> )(void *CallBackRef, u8 TmrCtrNumber)</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="xtmrctr_8h.html#ad5f9b6172f448d2dd13d1c200ca37928">XTmrCtr_Initialize</a> (<a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</a> *InstancePtr, u16 DeviceId)</td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xtmrctr_8h.html#a009c17ab4fcedf73279638dd97b6edd4">XTmrCtr_Start</a> (<a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</a> *InstancePtr, u8 TmrCtrNumber)</td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xtmrctr_8h.html#ab8156ff2a16b8efc0fcd3ed2b7ecf91a">XTmrCtr_Stop</a> (<a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</a> *InstancePtr, u8 TmrCtrNumber)</td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">u32 </td><td class="memItemRight" valign="bottom"><a class="el" href="xtmrctr_8h.html#a325269055bb6f9f7a0c7f703bd2f2174">XTmrCtr_GetValue</a> (<a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</a> *InstancePtr, u8 TmrCtrNumber)</td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xtmrctr_8h.html#a74b790866611a3ab1e96700feb48f6ea">XTmrCtr_SetResetValue</a> (<a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</a> *InstancePtr, u8 TmrCtrNumber, u32 ResetValue)</td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">u32 </td><td class="memItemRight" valign="bottom"><a class="el" href="xtmrctr_8h.html#ad8f339bdf71ed11fa92f08720c9ce663">XTmrCtr_GetCaptureValue</a> (<a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</a> *InstancePtr, u8 TmrCtrNumber)</td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xtmrctr_8h.html#a44d19561a31682753e4996c7b57d6982">XTmrCtr_IsExpired</a> (<a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</a> *InstancePtr, u8 TmrCtrNumber)</td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xtmrctr_8h.html#aa7b4ca5a0ac2199ee5341fddd8056500">XTmrCtr_Reset</a> (<a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</a> *InstancePtr, u8 TmrCtrNumber)</td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_x_tmr_ctr___config.html">XTmrCtr_Config</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="xtmrctr_8h.html#ae711199e786bb0a072a34f81558e4893">XTmrCtr_LookupConfig</a> (u16 DeviceId)</td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xtmrctr_8h.html#a93d796cf55144d6adb3c51fedf6c3b76">XTmrCtr_SetOptions</a> (<a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</a> *InstancePtr, u8 TmrCtrNumber, u32 Options)</td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">u32 </td><td class="memItemRight" valign="bottom"><a class="el" href="xtmrctr_8h.html#aaff209dc01c2946c239c6e5c1bdc1a5b">XTmrCtr_GetOptions</a> (<a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</a> *InstancePtr, u8 TmrCtrNumber)</td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xtmrctr_8h.html#a3c99744f99aef2a019616e712206f1b0">XTmrCtr_GetStats</a> (<a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</a> *InstancePtr, <a class="el" href="struct_x_tmr_ctr_stats.html">XTmrCtrStats</a> *StatsPtr)</td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xtmrctr_8h.html#a6f51d8030e9d1a4edc588b0846e22e49">XTmrCtr_ClearStats</a> (<a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</a> *InstancePtr)</td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xtmrctr_8h.html#a42b972b6d7ae5d18a9bb2ca99446b1e7">XTmrCtr_SelfTest</a> (<a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</a> *InstancePtr, u8 TmrCtrNumber)</td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xtmrctr_8h.html#a9eb7b372c13b5e3493fec7370858309f">XTmrCtr_SetHandler</a> (<a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</a> *InstancePtr, <a class="el" href="xtmrctr_8h.html#a2d96523ba7b80814a9f6c769619564cf">XTmrCtr_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="xtmrctr_8h.html#a2c00e99b19f58b5821c5541069ffb20b">XTmrCtr_InterruptHandler</a> (void *InstancePtr)</td></tr>
|
||
|
</table>
|
||
|
<hr/><a name="_details"></a><h2>Detailed Description</h2>
|
||
|
<hr/><h2>Define Documentation</h2>
|
||
|
<a class="anchor" id="ace3deb2a423d72960864a46eacd11fdc"></a><!-- doxytag: member="xtmrctr.h::XTC_AUTO_RELOAD_OPTION" ref="ace3deb2a423d72960864a46eacd11fdc" args="" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">#define XTC_AUTO_RELOAD_OPTION 0x00000004UL</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="af93c62016d132546b5ee99789b4e48c1"></a><!-- doxytag: member="xtmrctr.h::XTC_CAPTURE_MODE_OPTION" ref="af93c62016d132546b5ee99789b4e48c1" args="" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">#define XTC_CAPTURE_MODE_OPTION 0x00000010UL</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="a4fb085742ee50628791c81ff9a14bc2c"></a><!-- doxytag: member="xtmrctr.h::XTC_CASCADE_MODE_OPTION" ref="a4fb085742ee50628791c81ff9a14bc2c" args="" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">#define XTC_CASCADE_MODE_OPTION 0x00000080UL</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
<p>Used to configure the timer counter device. </p>
|
||
|
<pre>
|
||
|
XTC_CASCADE_MODE_OPTION Enables the Cascade Mode only valid for TCSRO.
|
||
|
XTC_ENABLE_ALL_OPTION Enables all timer counters at once.
|
||
|
XTC_DOWN_COUNT_OPTION Configures the timer counter to count down from
|
||
|
start value, the default is to count up.
|
||
|
XTC_CAPTURE_MODE_OPTION Configures the timer to capture the timer
|
||
|
counter value when the external capture line is
|
||
|
asserted. The default mode is compare mode.
|
||
|
XTC_INT_MODE_OPTION Enables the timer counter interrupt output.
|
||
|
XTC_AUTO_RELOAD_OPTION In compare mode, configures the timer counter to
|
||
|
reload from the compare value. The default mode
|
||
|
causes the timer counter to hold when the
|
||
|
compare value is hit.
|
||
|
In capture mode, configures the timer counter to
|
||
|
not hold the previous capture value if a new
|
||
|
event occurs. The default mode cause the timer
|
||
|
counter to hold the capture value until
|
||
|
recognized.
|
||
|
XTC_EXT_COMPARE_OPTION Enables the external compare output signal.
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="a9cc7b106e2e846ec41fd983da0772dc8"></a><!-- doxytag: member="xtmrctr.h::XTC_DOWN_COUNT_OPTION" ref="a9cc7b106e2e846ec41fd983da0772dc8" args="" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">#define XTC_DOWN_COUNT_OPTION 0x00000020UL</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ac50df31e95b1a82441de09ff360eca48"></a><!-- doxytag: member="xtmrctr.h::XTC_ENABLE_ALL_OPTION" ref="ac50df31e95b1a82441de09ff360eca48" args="" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">#define XTC_ENABLE_ALL_OPTION 0x00000040UL</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="a3d33636409ed76e99828909edcff0d4a"></a><!-- doxytag: member="xtmrctr.h::XTC_EXT_COMPARE_OPTION" ref="a3d33636409ed76e99828909edcff0d4a" args="" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">#define XTC_EXT_COMPARE_OPTION 0x00000002UL</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="aad72f141ec429ad4b782868c33b32c1b"></a><!-- doxytag: member="xtmrctr.h::XTC_INT_MODE_OPTION" ref="aad72f141ec429ad4b782868c33b32c1b" args="" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">#define XTC_INT_MODE_OPTION 0x00000008UL</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="afc4684a3912a1169c7516b7dad56a20a"></a><!-- doxytag: member="xtmrctr.h::XTMRCTR_H" ref="afc4684a3912a1169c7516b7dad56a20a" args="" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">#define XTMRCTR_H</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<hr/><h2>Typedef Documentation</h2>
|
||
|
<a class="anchor" id="a2d96523ba7b80814a9f6c769619564cf"></a><!-- doxytag: member="xtmrctr.h::XTmrCtr_Handler" ref="a2d96523ba7b80814a9f6c769619564cf" args=")(void *CallBackRef, u8 TmrCtrNumber)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">typedef void(* <a class="el" href="xtmrctr_8h.html#a2d96523ba7b80814a9f6c769619564cf">XTmrCtr_Handler</a>)(void *CallBackRef, u8 TmrCtrNumber)</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
<p>Signature for the callback 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>CallBackRef</em> </td><td>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. Its type is unimportant to the driver, so it is a void pointer. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>TmrCtrNumber</em> </td><td>is the number of the timer/counter within the device. The device typically contains at least two timer/counters. The timer number is a zero based number with a range of 0 to (XTC_DEVICE_TIMER_COUNT - 1). </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<hr/><h2>Function Documentation</h2>
|
||
|
<a class="anchor" id="a6f51d8030e9d1a4edc588b0846e22e49"></a><!-- doxytag: member="xtmrctr.h::XTmrCtr_ClearStats" ref="a6f51d8030e9d1a4edc588b0846e22e49" args="(XTmrCtr *InstancePtr)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void XTmrCtr_ClearStats </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</a> * </td>
|
||
|
<td class="paramname"> <em>InstancePtr</em></td>
|
||
|
<td> ) </td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
<p>Clear the <a class="el" href="struct_x_tmr_ctr_stats.html">XTmrCtrStats</a> structure for this driver.</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_tmr_ctr.html">XTmrCtr</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="ad8f339bdf71ed11fa92f08720c9ce663"></a><!-- doxytag: member="xtmrctr.h::XTmrCtr_GetCaptureValue" ref="ad8f339bdf71ed11fa92f08720c9ce663" args="(XTmrCtr *InstancePtr, u8 TmrCtrNumber)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">u32 XTmrCtr_GetCaptureValue </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</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>TmrCtrNumber</em></td><td> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
<p>Returns the timer counter value that was captured the last time the external capture input was asserted.</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_tmr_ctr.html">XTmrCtr</a> instance. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>TmrCtrNumber</em> </td><td>is the timer counter of the device to operate on. Each device may contain multiple timer counters. The timer number is a zero based number with a range of 0 - (XTC_DEVICE_TIMER_COUNT - 1).</td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="return"><dt><b>Returns:</b></dt><dd>The current capture value for the indicated timer counter.</dd></dl>
|
||
|
<dl class="note"><dt><b>Note:</b></dt><dd>None. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="aaff209dc01c2946c239c6e5c1bdc1a5b"></a><!-- doxytag: member="xtmrctr.h::XTmrCtr_GetOptions" ref="aaff209dc01c2946c239c6e5c1bdc1a5b" args="(XTmrCtr *InstancePtr, u8 TmrCtrNumber)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">u32 XTmrCtr_GetOptions </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</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>TmrCtrNumber</em></td><td> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
<p>Get the options for the specified timer counter.</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_tmr_ctr.html">XTmrCtr</a> instance. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>TmrCtrNumber</em> </td><td>is the timer counter of the device to operate on Each device may contain multiple timer counters. The timer number is a zero based number with a range of 0 - (XTC_DEVICE_TIMER_COUNT - 1).</td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="return"><dt><b>Returns:</b></dt><dd></dd></dl>
|
||
|
<p>The currently set options. An option which is set to a '1' is enabled and set to a '0' is disabled. The options are bit masks such that multiple options may be set or cleared. The options are described in <a class="el" href="xtmrctr_8h.html">xtmrctr.h</a>.</p>
|
||
|
<dl class="note"><dt><b>Note:</b></dt><dd>None. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="a3c99744f99aef2a019616e712206f1b0"></a><!-- doxytag: member="xtmrctr.h::XTmrCtr_GetStats" ref="a3c99744f99aef2a019616e712206f1b0" args="(XTmrCtr *InstancePtr, XTmrCtrStats *StatsPtr)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void XTmrCtr_GetStats </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</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_tmr_ctr_stats.html">XTmrCtrStats</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>Get a copy of the <a class="el" href="struct_x_tmr_ctr_stats.html">XTmrCtrStats</a> structure, which contains the current statistics for this driver.</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_tmr_ctr.html">XTmrCtr</a> instance. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>StatsPtr</em> </td><td>is a pointer to a <a class="el" href="struct_x_tmr_ctr_stats.html">XTmrCtrStats</a> structure which will get a copy of current statistics.</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="a325269055bb6f9f7a0c7f703bd2f2174"></a><!-- doxytag: member="xtmrctr.h::XTmrCtr_GetValue" ref="a325269055bb6f9f7a0c7f703bd2f2174" args="(XTmrCtr *InstancePtr, u8 TmrCtrNumber)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">u32 XTmrCtr_GetValue </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</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>TmrCtrNumber</em></td><td> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
<p>Get the current value of the specified timer counter. The timer counter may be either incrementing or decrementing based upon the current mode of operation.</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_tmr_ctr.html">XTmrCtr</a> instance. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>TmrCtrNumber</em> </td><td>is the timer counter of the device to operate on. Each device may contain multiple timer counters. The timer number is a zero based number with a range of 0 - (XTC_DEVICE_TIMER_COUNT - 1).</td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="return"><dt><b>Returns:</b></dt><dd>The current value for the timer counter.</dd></dl>
|
||
|
<dl class="note"><dt><b>Note:</b></dt><dd>None. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ad5f9b6172f448d2dd13d1c200ca37928"></a><!-- doxytag: member="xtmrctr.h::XTmrCtr_Initialize" ref="ad5f9b6172f448d2dd13d1c200ca37928" args="(XTmrCtr *InstancePtr, u16 DeviceId)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">int XTmrCtr_Initialize </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</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>Initializes a specific timer/counter instance/driver. Initialize fields of the <a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</a> structure, then reset the timer/counter.If a timer is already running then it is not initialized.</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_tmr_ctr.html">XTmrCtr</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_tmr_ctr.html">XTmrCtr</a> component. Passing in a device id associates the generic <a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</a> component 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 device doesn't exist</li>
|
||
|
</ul>
|
||
|
</dd></dl>
|
||
|
<dl class="note"><dt><b>Note:</b></dt><dd>None. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="a2c00e99b19f58b5821c5541069ffb20b"></a><!-- doxytag: member="xtmrctr.h::XTmrCtr_InterruptHandler" ref="a2c00e99b19f58b5821c5541069ffb20b" args="(void *InstancePtr)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void XTmrCtr_InterruptHandler </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">void * </td>
|
||
|
<td class="paramname"> <em>InstancePtr</em></td>
|
||
|
<td> ) </td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
<p>Interrupt Service Routine (ISR) for the driver. This function only performs processing for the device and does not save and restore the interrupt context.</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 timer/counter instance for the interrupt.</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="a44d19561a31682753e4996c7b57d6982"></a><!-- doxytag: member="xtmrctr.h::XTmrCtr_IsExpired" ref="a44d19561a31682753e4996c7b57d6982" args="(XTmrCtr *InstancePtr, u8 TmrCtrNumber)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">int XTmrCtr_IsExpired </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</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>TmrCtrNumber</em></td><td> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
<p>Checks if the specified timer counter of the device has expired. In capture mode, expired is defined as a capture occurred. In compare mode, expired is defined as the timer counter rolled over/under for up/down counting.</p>
|
||
|
<p>When interrupts are enabled, the expiration causes an interrupt. This function is typically used to poll a timer counter to determine when it has expired.</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_tmr_ctr.html">XTmrCtr</a> instance. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>TmrCtrNumber</em> </td><td>is the timer counter of the device to operate on. Each device may contain multiple timer counters. The timer number is a zero based number with a range of 0 - (XTC_DEVICE_TIMER_COUNT - 1).</td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE if the timer 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="ae711199e786bb0a072a34f81558e4893"></a><!-- doxytag: member="xtmrctr.h::XTmrCtr_LookupConfig" ref="ae711199e786bb0a072a34f81558e4893" args="(u16 DeviceId)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname"><a class="el" href="struct_x_tmr_ctr___config.html">XTmrCtr_Config</a>* XTmrCtr_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="aa7b4ca5a0ac2199ee5341fddd8056500"></a><!-- doxytag: member="xtmrctr.h::XTmrCtr_Reset" ref="aa7b4ca5a0ac2199ee5341fddd8056500" args="(XTmrCtr *InstancePtr, u8 TmrCtrNumber)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void XTmrCtr_Reset </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</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>TmrCtrNumber</em></td><td> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
<p>Resets the specified timer counter of the device. A reset causes the timer counter to set it's value to the reset value.</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_tmr_ctr.html">XTmrCtr</a> instance. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>TmrCtrNumber</em> </td><td>is the timer counter of the device to operate on. Each device may contain multiple timer counters. The timer number is a zero based number with a range of 0 - (XTC_DEVICE_TIMER_COUNT - 1).</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="a42b972b6d7ae5d18a9bb2ca99446b1e7"></a><!-- doxytag: member="xtmrctr.h::XTmrCtr_SelfTest" ref="a42b972b6d7ae5d18a9bb2ca99446b1e7" args="(XTmrCtr *InstancePtr, u8 TmrCtrNumber)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">int XTmrCtr_SelfTest </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</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>TmrCtrNumber</em></td><td> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
<p>Runs a self-test on the driver/device. This test verifies that the specified timer counter of the device can be enabled and increments.</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_tmr_ctr.html">XTmrCtr</a> instance. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>TmrCtrNumber</em> </td><td>is the timer counter of the device to operate on. Each device may contain multiple timer counters. The timer number is a zero based number with a range of 0 - (XTC_DEVICE_TIMER_COUNT - 1).</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_FAILURE if the timer is not incrementing.</li>
|
||
|
</ul>
|
||
|
</dd></dl>
|
||
|
<dl class="note"><dt><b>Note:</b></dt><dd></dd></dl>
|
||
|
<p>This is a destructive test using the provided timer. The current settings of the timer are returned to the initialized values and all settings at the time this function is called are overwritten. </p>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="a9eb7b372c13b5e3493fec7370858309f"></a><!-- doxytag: member="xtmrctr.h::XTmrCtr_SetHandler" ref="a9eb7b372c13b5e3493fec7370858309f" args="(XTmrCtr *InstancePtr, XTmrCtr_Handler FuncPtr, void *CallBackRef)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void XTmrCtr_SetHandler </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</a> * </td>
|
||
|
<td class="paramname"> <em>InstancePtr</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype"><a class="el" href="xtmrctr_8h.html#a2d96523ba7b80814a9f6c769619564cf">XTmrCtr_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>Sets the timer callback function, which the driver calls when the specified timer times out.</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_tmr_ctr.html">XTmrCtr</a> instance . </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>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>FuncPtr</em> </td><td>is the pointer to the callback function.</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></dd></dl>
|
||
|
<p>The handler is called within interrupt context so the function that is called should either be short or pass the more extensive processing off to another task to allow the interrupt to return and normal processing to continue. </p>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="a93d796cf55144d6adb3c51fedf6c3b76"></a><!-- doxytag: member="xtmrctr.h::XTmrCtr_SetOptions" ref="a93d796cf55144d6adb3c51fedf6c3b76" args="(XTmrCtr *InstancePtr, u8 TmrCtrNumber, u32 Options)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void XTmrCtr_SetOptions </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</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>TmrCtrNumber</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">u32 </td>
|
||
|
<td class="paramname"> <em>Options</em></td><td> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
<p>Enables the specified options for the specified timer counter. This function sets the options without regard to the current options of the driver. To prevent a loss of the current options, the user should call <a class="el" href="xtmrctr_8h.html#aaff209dc01c2946c239c6e5c1bdc1a5b">XTmrCtr_GetOptions()</a> prior to this function and modify the retrieved options to pass into this function to prevent loss of the current options.</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_tmr_ctr.html">XTmrCtr</a> instance. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>TmrCtrNumber</em> </td><td>is the timer counter of the device to operate on. Each device may contain multiple timer counters. The timer number is a zero based number with a range of 0 - (XTC_DEVICE_TIMER_COUNT - 1). </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>Options</em> </td><td>contains the desired options to be set or cleared. Setting the option to '1' enables the option, clearing the to '0' disables the option. The options are bit masks such that multiple options may be set or cleared. The options are described in <a class="el" href="xtmrctr_8h.html">xtmrctr.h</a>.</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="a74b790866611a3ab1e96700feb48f6ea"></a><!-- doxytag: member="xtmrctr.h::XTmrCtr_SetResetValue" ref="a74b790866611a3ab1e96700feb48f6ea" args="(XTmrCtr *InstancePtr, u8 TmrCtrNumber, u32 ResetValue)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void XTmrCtr_SetResetValue </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</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>TmrCtrNumber</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">u32 </td>
|
||
|
<td class="paramname"> <em>ResetValue</em></td><td> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
<p>Set the reset value for the specified timer counter. This is the value that is loaded into the timer counter when it is reset. This value is also loaded when the timer counter is started.</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_tmr_ctr.html">XTmrCtr</a> instance. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>TmrCtrNumber</em> </td><td>is the timer counter of the device to operate on. Each device may contain multiple timer counters. The timer number is a zero based number with a range of 0 - (XTC_DEVICE_TIMER_COUNT - 1). </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>ResetValue</em> </td><td>contains the value to be used to reset the timer counter.</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="a009c17ab4fcedf73279638dd97b6edd4"></a><!-- doxytag: member="xtmrctr.h::XTmrCtr_Start" ref="a009c17ab4fcedf73279638dd97b6edd4" args="(XTmrCtr *InstancePtr, u8 TmrCtrNumber)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void XTmrCtr_Start </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</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>TmrCtrNumber</em></td><td> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
<p>Starts the specified timer counter of the device such that it starts running. The timer counter is reset before it is started and the reset value is loaded into the timer counter.</p>
|
||
|
<p>If interrupt mode is specified in the options, it is necessary for the caller to connect the interrupt handler of the timer/counter to the interrupt source, typically an interrupt controller, and enable the interrupt within 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> </td><td>is a pointer to the <a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</a> instance. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>TmrCtrNumber</em> </td><td>is the timer counter of the device to operate on. Each device may contain multiple timer counters. The timer number is a zero based number with a range of 0 - (XTC_DEVICE_TIMER_COUNT - 1).</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="ab8156ff2a16b8efc0fcd3ed2b7ecf91a"></a><!-- doxytag: member="xtmrctr.h::XTmrCtr_Stop" ref="ab8156ff2a16b8efc0fcd3ed2b7ecf91a" args="(XTmrCtr *InstancePtr, u8 TmrCtrNumber)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void XTmrCtr_Stop </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</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>TmrCtrNumber</em></td><td> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
<p>Stops the timer counter by disabling it.</p>
|
||
|
<p>It is the callers' responsibility to disconnect the interrupt handler of the timer_counter from the interrupt source, typically an interrupt controller, and disable the interrupt within 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> </td><td>is a pointer to the <a class="el" href="struct_x_tmr_ctr.html">XTmrCtr</a> instance. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>TmrCtrNumber</em> </td><td>is the timer counter of the device to operate on. Each device may contain multiple timer counters. The timer number is a zero based number with a range of 0 - (XTC_DEVICE_TIMER_COUNT - 1).</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>
|
||
|
</div>
|
||
|
<p class="Copyright">
|
||
|
Copyright © 1995-2014 Xilinx, Inc. All rights reserved.
|
||
|
</p>
|
||
|
</body>
|
||
|
</html>
|