embeddedsw/XilinxProcessorIPLib/drivers/gpiops/doc/html/api/xgpiops_8c.html
Kedareswara rao Appana 659fb81abd doxygen: Update doxygen for the drivers to include .h files in documentation.
This patch updates the doxygen for the drivers
emaclite,dmaps, emacps,gpio,gpiops to include .h files
in the listof files provided in the index.html file.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
2014-09-02 11:21:33 +05:30

690 lines
33 KiB
HTML
Executable file

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>
Xilinx Driver gpiops v2_1: xgpiops.c 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>xgpiops.c File Reference</h1><code>#include &quot;<a class="el" href="xgpiops_8h.html">xgpiops.h</a>&quot;</code><br/>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xgpiops_8c.html#a1e08a2eab17a71fe2ddfcaf5b752fcfa">StubHandler</a> (void *CallBackRef, int Bank, u32 Status)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xgpiops_8c.html#a52a97b2ee0e34f35a74f4efdd252e046">XGpioPs_CfgInitialize</a> (<a class="el" href="struct_x_gpio_ps.html">XGpioPs</a> *InstancePtr, <a class="el" href="struct_x_gpio_ps___config.html">XGpioPs_Config</a> *ConfigPtr, u32 EffectiveAddr)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">u32&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xgpiops_8c.html#a8e7bc106ec7c6108c26dfe835713d501">XGpioPs_Read</a> (<a class="el" href="struct_x_gpio_ps.html">XGpioPs</a> *InstancePtr, u8 Bank)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xgpiops_8c.html#aebedae64d77059711217f31abd7ba098">XGpioPs_ReadPin</a> (<a class="el" href="struct_x_gpio_ps.html">XGpioPs</a> *InstancePtr, int Pin)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xgpiops_8c.html#acda78d38a3b2dbf4398c5df2c88e0424">XGpioPs_Write</a> (<a class="el" href="struct_x_gpio_ps.html">XGpioPs</a> *InstancePtr, u8 Bank, u32 Data)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xgpiops_8c.html#aa3f73f12266c57bd138d6814ab24ba93">XGpioPs_WritePin</a> (<a class="el" href="struct_x_gpio_ps.html">XGpioPs</a> *InstancePtr, int Pin, int Data)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xgpiops_8c.html#a85638e14681720794efa7e55d69360fc">XGpioPs_SetDirection</a> (<a class="el" href="struct_x_gpio_ps.html">XGpioPs</a> *InstancePtr, u8 Bank, u32 Direction)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xgpiops_8c.html#a936aa50aa1b0d0be57a42fcfbdc79895">XGpioPs_SetDirectionPin</a> (<a class="el" href="struct_x_gpio_ps.html">XGpioPs</a> *InstancePtr, int Pin, int Direction)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">u32&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xgpiops_8c.html#a158c9afe847d2b5f6bab24d20926c359">XGpioPs_GetDirection</a> (<a class="el" href="struct_x_gpio_ps.html">XGpioPs</a> *InstancePtr, u8 Bank)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xgpiops_8c.html#a29e7e8fc2ff7a0b34e2f18cbcc099e54">XGpioPs_GetDirectionPin</a> (<a class="el" href="struct_x_gpio_ps.html">XGpioPs</a> *InstancePtr, int Pin)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xgpiops_8c.html#a867a6006d591516ed79727bb6392b9ac">XGpioPs_SetOutputEnable</a> (<a class="el" href="struct_x_gpio_ps.html">XGpioPs</a> *InstancePtr, u8 Bank, u32 OpEnable)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xgpiops_8c.html#a40f354039a1009e431674b8f8cb7be66">XGpioPs_SetOutputEnablePin</a> (<a class="el" href="struct_x_gpio_ps.html">XGpioPs</a> *InstancePtr, int Pin, int OpEnable)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">u32&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xgpiops_8c.html#ac182a9828e0ecfdc7a1cbe0c5a1a763f">XGpioPs_GetOutputEnable</a> (<a class="el" href="struct_x_gpio_ps.html">XGpioPs</a> *InstancePtr, u8 Bank)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xgpiops_8c.html#a8e2276e021fde606daa6d67454f8312c">XGpioPs_GetOutputEnablePin</a> (<a class="el" href="struct_x_gpio_ps.html">XGpioPs</a> *InstancePtr, int Pin)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xgpiops_8c.html#aefc766e08002c191864802d6e3a3434e">XGpioPs_GetBankPin</a> (u8 PinNumber, u8 *BankNumber, u8 *PinNumberInBank)</td></tr>
<tr><td colspan="2"><h2>Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xgpiops_8c.html#ad5ae9f57f16b7729b4a707583cd73392">XGpioPsPinTable</a> []</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>The <a class="el" href="struct_x_gpio_ps.html">XGpioPs</a> driver. Functions in this file are the minimum required functions for this driver. See <a class="el" href="xgpiops_8h.html">xgpiops.h</a> for a detailed description of the driver.</p>
<pre>
MODIFICATION HISTORY:</pre><pre> Ver Who Date Changes
----- ---- -------- -----------------------------------------------
1.00a sv 01/15/10 First Release
1.01a sv 04/15/12 Removed the APIs XGpioPs_SetMode, XGpioPs_SetModePin
XGpioPs_GetMode, XGpioPs_GetModePin as they are not
relevant to Zynq device. The interrupts are disabled
for output pins on all banks during initialization.
2.1 hk 04/29/14 Use Input data register DATA_RO for read. CR# 771667.</pre><pre> </pre> <hr/><h2>Function Documentation</h2>
<a class="anchor" id="a1e08a2eab17a71fe2ddfcaf5b752fcfa"></a><!-- doxytag: member="xgpiops.c::StubHandler" ref="a1e08a2eab17a71fe2ddfcaf5b752fcfa" args="(void *CallBackRef, int Bank, u32 Status)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void StubHandler </td>
<td>(</td>
<td class="paramtype">void *&nbsp;</td>
<td class="paramname"> <em>CallBackRef</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>Bank</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">u32&nbsp;</td>
<td class="paramname"> <em>Status</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>This is a stub for the status callback. The stub is here in case the upper layers do not set the handler.</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>&nbsp;</td><td>is a pointer to the upper layer callback reference </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Bank</em>&nbsp;</td><td>is the GPIO Bank in which an interrupt occurred. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Status</em>&nbsp;</td><td>is the Interrupt status of the GPIO bank.</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="a52a97b2ee0e34f35a74f4efdd252e046"></a><!-- doxytag: member="xgpiops.c::XGpioPs_CfgInitialize" ref="a52a97b2ee0e34f35a74f4efdd252e046" args="(XGpioPs *InstancePtr, XGpioPs_Config *ConfigPtr, u32 EffectiveAddr)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int XGpioPs_CfgInitialize </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_x_gpio_ps.html">XGpioPs</a> *&nbsp;</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_gpio_ps___config.html">XGpioPs_Config</a> *&nbsp;</td>
<td class="paramname"> <em>ConfigPtr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">u32&nbsp;</td>
<td class="paramname"> <em>EffectiveAddr</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<a class="anchor" id="aefc766e08002c191864802d6e3a3434e"></a><!-- doxytag: member="xgpiops.c::XGpioPs_GetBankPin" ref="aefc766e08002c191864802d6e3a3434e" args="(u8 PinNumber, u8 *BankNumber, u8 *PinNumberInBank)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void XGpioPs_GetBankPin </td>
<td>(</td>
<td class="paramtype">u8&nbsp;</td>
<td class="paramname"> <em>PinNumber</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">u8 *&nbsp;</td>
<td class="paramname"> <em>BankNumber</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">u8 *&nbsp;</td>
<td class="paramname"> <em>PinNumberInBank</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<a class="anchor" id="a158c9afe847d2b5f6bab24d20926c359"></a><!-- doxytag: member="xgpiops.c::XGpioPs_GetDirection" ref="a158c9afe847d2b5f6bab24d20926c359" args="(XGpioPs *InstancePtr, u8 Bank)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">u32 XGpioPs_GetDirection </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_x_gpio_ps.html">XGpioPs</a> *&nbsp;</td>
<td class="paramname"> <em>InstancePtr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">u8&nbsp;</td>
<td class="paramname"> <em>Bank</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the Direction of the pins of the specified GPIO Bank.</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_gpio_ps.html">XGpioPs</a> instance. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Bank</em>&nbsp;</td><td>is the bank number of the GPIO to operate on. Valid values are 0 to XGPIOPS_MAX_BANKS - 1.</td></tr>
</table>
</dd>
</dl>
<p>return Returns a 32 bit mask of the Direction register. Bits with 0 are in Input mode, bits with 1 are in Output Mode.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>None. </dd></dl>
</div>
</div>
<a class="anchor" id="a29e7e8fc2ff7a0b34e2f18cbcc099e54"></a><!-- doxytag: member="xgpiops.c::XGpioPs_GetDirectionPin" ref="a29e7e8fc2ff7a0b34e2f18cbcc099e54" args="(XGpioPs *InstancePtr, int Pin)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int XGpioPs_GetDirectionPin </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_x_gpio_ps.html">XGpioPs</a> *&nbsp;</td>
<td class="paramname"> <em>InstancePtr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>Pin</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the Direction of the specified pin.</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_gpio_ps.html">XGpioPs</a> instance. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Pin</em>&nbsp;</td><td>is the pin number for which the Direction is to be retrieved. Valid values are 0 to XGPIOPS_DEVICE_MAX_PIN_NUM - 1.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Direction of the specified pin.<ul>
<li>0 for Input Direction</li>
<li>1 for Output Direction</li>
</ul>
</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>None. </dd></dl>
</div>
</div>
<a class="anchor" id="ac182a9828e0ecfdc7a1cbe0c5a1a763f"></a><!-- doxytag: member="xgpiops.c::XGpioPs_GetOutputEnable" ref="ac182a9828e0ecfdc7a1cbe0c5a1a763f" args="(XGpioPs *InstancePtr, u8 Bank)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">u32 XGpioPs_GetOutputEnable </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_x_gpio_ps.html">XGpioPs</a> *&nbsp;</td>
<td class="paramname"> <em>InstancePtr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">u8&nbsp;</td>
<td class="paramname"> <em>Bank</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the Output Enable status of the pins of the specified GPIO Bank.</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_gpio_ps.html">XGpioPs</a> instance. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Bank</em>&nbsp;</td><td>is the bank number of the GPIO to operate on. Valid values are 0 to XGPIOPS_MAX_BANKS - 1.</td></tr>
</table>
</dd>
</dl>
<p>return Returns a a 32 bit mask of the Output Enable register. Bits with 0 are in Disabled state, bits with 1 are in Enabled State.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>None. </dd></dl>
</div>
</div>
<a class="anchor" id="a8e2276e021fde606daa6d67454f8312c"></a><!-- doxytag: member="xgpiops.c::XGpioPs_GetOutputEnablePin" ref="a8e2276e021fde606daa6d67454f8312c" args="(XGpioPs *InstancePtr, int Pin)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int XGpioPs_GetOutputEnablePin </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_x_gpio_ps.html">XGpioPs</a> *&nbsp;</td>
<td class="paramname"> <em>InstancePtr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>Pin</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the Output Enable status of the specified pin.</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_gpio_ps.html">XGpioPs</a> instance. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Pin</em>&nbsp;</td><td>is the pin number for which the Output Enable status is to be retrieved. Valid values are 0 to XGPIOPS_DEVICE_MAX_PIN_NUM - 1.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Output Enable of the specified pin.<ul>
<li>0 if Output Enable is disabled for this pin</li>
<li>1 if Output Enable is enabled for this pin</li>
</ul>
</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>None. </dd></dl>
</div>
</div>
<a class="anchor" id="a8e7bc106ec7c6108c26dfe835713d501"></a><!-- doxytag: member="xgpiops.c::XGpioPs_Read" ref="a8e7bc106ec7c6108c26dfe835713d501" args="(XGpioPs *InstancePtr, u8 Bank)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">u32 XGpioPs_Read </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_x_gpio_ps.html">XGpioPs</a> *&nbsp;</td>
<td class="paramname"> <em>InstancePtr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">u8&nbsp;</td>
<td class="paramname"> <em>Bank</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Read the Data register of the specified GPIO bank.</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_gpio_ps.html">XGpioPs</a> instance. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Bank</em>&nbsp;</td><td>is the bank number of the GPIO to operate on. Valid values are 0 to XGPIOPS_MAX_BANKS - 1.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Current value of the Data register.</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>This function is used for reading the state of all the GPIO pins of specified bank. </dd></dl>
</div>
</div>
<a class="anchor" id="aebedae64d77059711217f31abd7ba098"></a><!-- doxytag: member="xgpiops.c::XGpioPs_ReadPin" ref="aebedae64d77059711217f31abd7ba098" args="(XGpioPs *InstancePtr, int Pin)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int XGpioPs_ReadPin </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_x_gpio_ps.html">XGpioPs</a> *&nbsp;</td>
<td class="paramname"> <em>InstancePtr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>Pin</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Read Data from the specified pin.</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_gpio_ps.html">XGpioPs</a> instance. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Pin</em>&nbsp;</td><td>is the pin number for which the data has to be read. Valid values are 0 to XGPIOPS_DEVICE_MAX_PIN_NUM - 1. See <a class="el" href="xgpiops_8h.html">xgpiops.h</a> for the mapping of the pin numbers in the banks.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Current value of the Pin (0 or 1).</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>This function is used for reading the state of the specified GPIO pin. </dd></dl>
</div>
</div>
<a class="anchor" id="a85638e14681720794efa7e55d69360fc"></a><!-- doxytag: member="xgpiops.c::XGpioPs_SetDirection" ref="a85638e14681720794efa7e55d69360fc" args="(XGpioPs *InstancePtr, u8 Bank, u32 Direction)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void XGpioPs_SetDirection </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_x_gpio_ps.html">XGpioPs</a> *&nbsp;</td>
<td class="paramname"> <em>InstancePtr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">u8&nbsp;</td>
<td class="paramname"> <em>Bank</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">u32&nbsp;</td>
<td class="paramname"> <em>Direction</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set the Direction of the pins of the specified GPIO Bank.</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_gpio_ps.html">XGpioPs</a> instance. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Bank</em>&nbsp;</td><td>is the bank number of the GPIO to operate on. Valid values are 0 to XGPIOPS_MAX_BANKS - 1. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Direction</em>&nbsp;</td><td>is the 32 bit mask of the Pin direction to be set for all the pins in the Bank. Bits with 0 are set to Input mode, bits with 1 are set to Output Mode.</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>This function is used for setting the direction of all the pins in the specified bank. The previous state of the pins is not maintained. </dd></dl>
</div>
</div>
<a class="anchor" id="a936aa50aa1b0d0be57a42fcfbdc79895"></a><!-- doxytag: member="xgpiops.c::XGpioPs_SetDirectionPin" ref="a936aa50aa1b0d0be57a42fcfbdc79895" args="(XGpioPs *InstancePtr, int Pin, int Direction)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void XGpioPs_SetDirectionPin </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_x_gpio_ps.html">XGpioPs</a> *&nbsp;</td>
<td class="paramname"> <em>InstancePtr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>Pin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>Direction</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set the Direction of the specified pin.</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_gpio_ps.html">XGpioPs</a> instance. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Pin</em>&nbsp;</td><td>is the pin number to which the Data is to be written. Valid values are 0 to XGPIOPS_DEVICE_MAX_PIN_NUM - 1. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Direction</em>&nbsp;</td><td>is the direction to be set for the specified pin. Valid values are 0 for Input Direction, 1 for Output Direction.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>None. </dd></dl>
</div>
</div>
<a class="anchor" id="a867a6006d591516ed79727bb6392b9ac"></a><!-- doxytag: member="xgpiops.c::XGpioPs_SetOutputEnable" ref="a867a6006d591516ed79727bb6392b9ac" args="(XGpioPs *InstancePtr, u8 Bank, u32 OpEnable)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void XGpioPs_SetOutputEnable </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_x_gpio_ps.html">XGpioPs</a> *&nbsp;</td>
<td class="paramname"> <em>InstancePtr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">u8&nbsp;</td>
<td class="paramname"> <em>Bank</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">u32&nbsp;</td>
<td class="paramname"> <em>OpEnable</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set the Output Enable of the pins of the specified GPIO Bank.</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_gpio_ps.html">XGpioPs</a> instance. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Bank</em>&nbsp;</td><td>is the bank number of the GPIO to operate on. Valid values are 0 to XGPIOPS_MAX_BANKS - 1. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>OpEnable</em>&nbsp;</td><td>is the 32 bit mask of the Output Enables to be set for all the pins in the Bank. The Output Enable of bits with 0 are disabled, the Output Enable of bits with 1 are enabled.</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>This function is used for setting the Output Enables of all the pins in the specified bank. The previous state of the Output Enables is not maintained. </dd></dl>
</div>
</div>
<a class="anchor" id="a40f354039a1009e431674b8f8cb7be66"></a><!-- doxytag: member="xgpiops.c::XGpioPs_SetOutputEnablePin" ref="a40f354039a1009e431674b8f8cb7be66" args="(XGpioPs *InstancePtr, int Pin, int OpEnable)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void XGpioPs_SetOutputEnablePin </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_x_gpio_ps.html">XGpioPs</a> *&nbsp;</td>
<td class="paramname"> <em>InstancePtr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>Pin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>OpEnable</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set the Output Enable of the specified pin.</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_gpio_ps.html">XGpioPs</a> instance. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Pin</em>&nbsp;</td><td>is the pin number to which the Data is to be written. Valid values are 0 to XGPIOPS_DEVICE_MAX_PIN_NUM - 1. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>OpEnable</em>&nbsp;</td><td>specifies whether the Output Enable for the specified pin should be enabled. Valid values are 0 for Disabling Output Enable, 1 for Enabling Output Enable.</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="acda78d38a3b2dbf4398c5df2c88e0424"></a><!-- doxytag: member="xgpiops.c::XGpioPs_Write" ref="acda78d38a3b2dbf4398c5df2c88e0424" args="(XGpioPs *InstancePtr, u8 Bank, u32 Data)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void XGpioPs_Write </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_x_gpio_ps.html">XGpioPs</a> *&nbsp;</td>
<td class="paramname"> <em>InstancePtr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">u8&nbsp;</td>
<td class="paramname"> <em>Bank</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">u32&nbsp;</td>
<td class="paramname"> <em>Data</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Write to the Data register of the specified GPIO bank.</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_gpio_ps.html">XGpioPs</a> instance. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Bank</em>&nbsp;</td><td>is the bank number of the GPIO to operate on. Valid values are 0 to XGPIOPS_MAX_BANKS - 1. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Data</em>&nbsp;</td><td>is the value to be written to the Data register.</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>This function is used for writing to all the GPIO pins of the bank. The previous state of the pins is not maintained. </dd></dl>
</div>
</div>
<a class="anchor" id="aa3f73f12266c57bd138d6814ab24ba93"></a><!-- doxytag: member="xgpiops.c::XGpioPs_WritePin" ref="aa3f73f12266c57bd138d6814ab24ba93" args="(XGpioPs *InstancePtr, int Pin, int Data)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void XGpioPs_WritePin </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_x_gpio_ps.html">XGpioPs</a> *&nbsp;</td>
<td class="paramname"> <em>InstancePtr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>Pin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>Data</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Write data to the specified pin.</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_gpio_ps.html">XGpioPs</a> instance. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Pin</em>&nbsp;</td><td>is the pin number to which the Data is to be written. Valid values are 0 to XGPIOPS_DEVICE_MAX_PIN_NUM - 1. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Data</em>&nbsp;</td><td>is the data to be written to the specified pin (0 or 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>This function does a masked write to the specified pin of the specified GPIO bank. The previous state of other pins is maintained. </dd></dl>
</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="ad5ae9f57f16b7729b4a707583cd73392"></a><!-- doxytag: member="xgpiops.c::XGpioPsPinTable" ref="ad5ae9f57f16b7729b4a707583cd73392" args="[]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned int <a class="el" href="xgpiops_8c.html#ad5ae9f57f16b7729b4a707583cd73392">XGpioPsPinTable</a>[]</td>
</tr>
</table>
</div>
<div class="memdoc">
<b>Initial value:</b><div class="fragment"><pre class="fragment"> {
31,
53,
85,
117
}
</pre></div>
</div>
</div>
</div>
<p class="Copyright">
Copyright &copy; 1995-2014 Xilinx, Inc. All rights reserved.
</p>
</body>
</html>