embeddedsw/XilinxProcessorIPLib/drivers/cpu/doc/html/api/xio_8c.html

314 lines
13 KiB
HTML
Raw Normal View History

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>
xio.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 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>xio.c File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
Contains I/O functions for memory-mapped or non-memory-mapped I/O architectures. These functions encapsulate generic CPU I/O requirements.<p>
<pre>
MODIFICATION HISTORY:</pre><p>
<pre> Ver Who Date Changes
----- ---- -------- -------------------------------------------------------
1.00a rpm 11/07/03 Added InSwap/OutSwap routines for endian conversion
1.01a ecm 02/24/06 CR225908 corrected the extra curly braces in macros
and bumped version to 1.01.a.
2.11a mta 03/21/07 Updated to new coding style.</pre><p>
<pre> </pre><p>
<dl compact><dt><b>Note:</b></dt><dd></dd></dl>
This file may contain architecture-dependent code.
<p>
<code>#include &quot;xio.h&quot;</code><br>
<code>#include &quot;xil_types.h&quot;</code><br>
<code>#include &quot;xil_assert.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">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xio_8c.html#bd2885dba32189d1f85e7ec060c76eb8">XIo_EndianSwap16</a> (u16 Source, u16 *DestPtr)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xio_8c.html#3c3ecc0419e4e9e5600a22e603adf2bc">XIo_EndianSwap32</a> (u32 Source, u32 *DestPtr)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">u16&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xio_8c.html#81f441ae984d2f30fdd018dd6bc56caa">XIo_InSwap16</a> (XIo_Address InAddress)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">u32&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xio_8c.html#ec7bdb809b6d5871c5e0ab83d5aed2e8">XIo_InSwap32</a> (XIo_Address InAddress)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xio_8c.html#f7738a3bea0afd4b4a0f1366ea4a565e">XIo_OutSwap16</a> (XIo_Address OutAddress, u16 Value)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xio_8c.html#532a5642e81b988de97028728033ef53">XIo_OutSwap32</a> (XIo_Address OutAddress, u32 Value)</td></tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="bd2885dba32189d1f85e7ec060c76eb8"></a><!-- doxytag: member="xio.c::XIo_EndianSwap16" ref="bd2885dba32189d1f85e7ec060c76eb8" args="(u16 Source, u16 *DestPtr)" --><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 XIo_EndianSwap16 </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">u16&nbsp;</td>
<td class="mdname" nowrap> <em>Source</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>u16 *&nbsp;</td>
<td class="mdname" nowrap> <em>DestPtr</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>
Performs a 16-bit endian converion.<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>Source</em>&nbsp;</td><td>contains the value to be converted. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>DestPtr</em>&nbsp;</td><td>contains a pointer to the location to put the converted value.</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="3c3ecc0419e4e9e5600a22e603adf2bc"></a><!-- doxytag: member="xio.c::XIo_EndianSwap32" ref="3c3ecc0419e4e9e5600a22e603adf2bc" args="(u32 Source, u32 *DestPtr)" --><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 XIo_EndianSwap32 </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">u32&nbsp;</td>
<td class="mdname" nowrap> <em>Source</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>DestPtr</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>
Performs a 32-bit endian converion.<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>Source</em>&nbsp;</td><td>contains the value to be converted. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>DestPtr</em>&nbsp;</td><td>contains a pointer to the location to put the converted value.</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="81f441ae984d2f30fdd018dd6bc56caa"></a><!-- doxytag: member="xio.c::XIo_InSwap16" ref="81f441ae984d2f30fdd018dd6bc56caa" args="(XIo_Address InAddress)" --><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">u16 XIo_InSwap16 </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">XIo_Address&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>InAddress</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>
Performs an input operation for a 16-bit memory location by reading from the specified address and returning the byte-swapped value read from that address.<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>InAddress</em>&nbsp;</td><td>contains the address to perform the input operation at.</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The byte-swapped value read from the specified input address.</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ec7bdb809b6d5871c5e0ab83d5aed2e8"></a><!-- doxytag: member="xio.c::XIo_InSwap32" ref="ec7bdb809b6d5871c5e0ab83d5aed2e8" args="(XIo_Address InAddress)" --><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">u32 XIo_InSwap32 </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">XIo_Address&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>InAddress</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>
Performs an input operation for a 32-bit memory location by reading from the specified address and returning the byte-swapped value read from that address.<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>InAddress</em>&nbsp;</td><td>contains the address to perform the input operation at.</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The byte-swapped value read from the specified input address.</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="f7738a3bea0afd4b4a0f1366ea4a565e"></a><!-- doxytag: member="xio.c::XIo_OutSwap16" ref="f7738a3bea0afd4b4a0f1366ea4a565e" args="(XIo_Address OutAddress, u16 Value)" --><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 XIo_OutSwap16 </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">XIo_Address&nbsp;</td>
<td class="mdname" nowrap> <em>OutAddress</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>u16&nbsp;</td>
<td class="mdname" nowrap> <em>Value</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>
Performs an output operation for a 16-bit memory location by writing the specified value to the the specified address. The value is byte-swapped before being written.<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>OutAddress</em>&nbsp;</td><td>contains the address to perform the output operation at. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Value</em>&nbsp;</td><td>contains the value to be output at the specified address.</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="532a5642e81b988de97028728033ef53"></a><!-- doxytag: member="xio.c::XIo_OutSwap32" ref="532a5642e81b988de97028728033ef53" args="(XIo_Address OutAddress, u32 Value)" --><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 XIo_OutSwap32 </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">XIo_Address&nbsp;</td>
<td class="mdname" nowrap> <em>OutAddress</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>Value</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>
Performs an output operation for a 32-bit memory location by writing the specified value to the the specified address. The value is byte-swapped before being written.<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>OutAddress</em>&nbsp;</td><td>contains the address at which the output operation has to be done. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Value</em>&nbsp;</td><td>contains the value to be output at the specified address.</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.