embeddedsw/XilinxProcessorIPLib/drivers/scutimer/doc/html/api/xscutimer_8c.html
Jagannadha Sutradharudu Teki 2c8f92039d embeddesw: Add initial code support
Added initial support Xilinx Embedded Software.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
2014-06-24 16:45:01 +05:30

258 lines
12 KiB
HTML
Executable file

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>
xscutimer.c File Reference
</title>
<link href="$DriverApiDocsCssPath" 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.4.5 -->
<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 id="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>
<h1>xscutimer.c File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
Contains the implementation of interface functions of the SCU Timer driver. See xscutimer.h for a description of the driver.<p>
<pre>
MODIFICATION HISTORY:</pre><p>
<pre> Ver Who Date Changes
----- --- -------- ---------------------------------------------
1.00a nm 03/10/10 First release
</pre>
<p>
<code>#include &quot;xscutimer.h&quot;</code><br>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xscutimer_8c.html#e07fcd40f2b6a398fa271cefc6fc6860">XScuTimer_CfgInitialize</a> (<a class="el" href="struct_x_scu_timer.html">XScuTimer</a> *InstancePtr, <a class="el" href="struct_x_scu_timer___config.html">XScuTimer_Config</a> *ConfigPtr, u32 EffectiveAddress)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xscutimer_8c.html#fbcbdd7a4dc1b76c439fc1727d853d7c">XScuTimer_Start</a> (<a class="el" href="struct_x_scu_timer.html">XScuTimer</a> *InstancePtr)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xscutimer_8c.html#42899541fdb070b9c0cdfb2b77f262c5">XScuTimer_Stop</a> (<a class="el" href="struct_x_scu_timer.html">XScuTimer</a> *InstancePtr)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xscutimer_8c.html#5934d18e525110e91e6251e2d58322ed">XScuTimer_SetPrescaler</a> (<a class="el" href="struct_x_scu_timer.html">XScuTimer</a> *InstancePtr, u8 PrescalerValue)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">u8&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xscutimer_8c.html#7425f95cbe5a2d3bb0ab0cb41814fd13">XScuTimer_GetPrescaler</a> (<a class="el" href="struct_x_scu_timer.html">XScuTimer</a> *InstancePtr)</td></tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="e07fcd40f2b6a398fa271cefc6fc6860"></a><!-- doxytag: member="xscutimer.c::XScuTimer_CfgInitialize" ref="e07fcd40f2b6a398fa271cefc6fc6860" args="(XScuTimer *InstancePtr, XScuTimer_Config *ConfigPtr, u32 EffectiveAddress)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int XScuTimer_CfgInitialize </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_scu_timer.html">XScuTimer</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="struct_x_scu_timer___config.html">XScuTimer_Config</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>ConfigPtr</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>u32&nbsp;</td>
<td class="mdname" nowrap> <em>EffectiveAddress</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Initialize a specific timer instance/driver. This function must be called before other functions of the driver are called.<p>
<dl compact><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_scu_timer.html">XScuTimer</a> instance. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>ConfigPtr</em>&nbsp;</td><td>points to the <a class="el" href="struct_x_scu_timer.html">XScuTimer</a> configuration structure. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>EffectiveAddress</em>&nbsp;</td><td>is the base address for the device. It could be a virtual address if address translation is supported in the system, otherwise it is the physical address.</td></tr>
</table>
</dl>
<dl compact><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></ul>
</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="7425f95cbe5a2d3bb0ab0cb41814fd13"></a><!-- doxytag: member="xscutimer.c::XScuTimer_GetPrescaler" ref="7425f95cbe5a2d3bb0ab0cb41814fd13" args="(XScuTimer *InstancePtr)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">u8 XScuTimer_GetPrescaler </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_scu_timer.html">XScuTimer</a> *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>InstancePtr</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
This function returns the current prescaler value.<p>
<dl compact><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_scu_timer.html">XScuTimer</a> instance.</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The prescaler value.</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="5934d18e525110e91e6251e2d58322ed"></a><!-- doxytag: member="xscutimer.c::XScuTimer_SetPrescaler" ref="5934d18e525110e91e6251e2d58322ed" args="(XScuTimer *InstancePtr, u8 PrescalerValue)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void XScuTimer_SetPrescaler </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_scu_timer.html">XScuTimer</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>u8&nbsp;</td>
<td class="mdname" nowrap> <em>PrescalerValue</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
This function sets the prescaler bits in the timer control register.<p>
<dl compact><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_scu_timer.html">XScuTimer</a> instance. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>PrescalerValue</em>&nbsp;</td><td>is a 8 bit value that sets the prescaler to use.</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>None</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>None </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="fbcbdd7a4dc1b76c439fc1727d853d7c"></a><!-- doxytag: member="xscutimer.c::XScuTimer_Start" ref="fbcbdd7a4dc1b76c439fc1727d853d7c" args="(XScuTimer *InstancePtr)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void XScuTimer_Start </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_scu_timer.html">XScuTimer</a> *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>InstancePtr</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Start the timer.<p>
<dl compact><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_scu_timer.html">XScuTimer</a> instance.</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>None.</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="42899541fdb070b9c0cdfb2b77f262c5"></a><!-- doxytag: member="xscutimer.c::XScuTimer_Stop" ref="42899541fdb070b9c0cdfb2b77f262c5" args="(XScuTimer *InstancePtr)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void XScuTimer_Stop </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="struct_x_scu_timer.html">XScuTimer</a> *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>InstancePtr</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Stop the timer.<p>
<dl compact><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_scu_timer.html">XScuTimer</a> instance.</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>None.</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
</td>
</tr>
</table>
Copyright @ 1995-2014 Xilinx, Inc. All rights reserved.