<p>The implementation of the <aclass="el"href="struct_x_gpio.html">XGpio</a> driver's basic functionality. See <aclass="el"href="xgpio_8h.html">xgpio.h</a> for more information about the driver.</p>
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to an <aclass="el"href="struct_x_gpio.html">XGpio</a> instance. The memory the pointer references must be pre-allocated by the caller. Further calls to manipulate the driver through the <aclass="el"href="struct_x_gpio.html">XGpio</a> API must be made with this pointer. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>Config</em> </td><td>is a reference to a structure containing information about a specific GPIO device. This function initializes an InstancePtr object for a specific device specified by the contents of Config. This function can initialize multiple instance objects with the use of multiple calls giving different Config information on each call. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>EffectiveAddr</em> </td><td>is the device base address in the virtual memory address space. The caller is responsible for keeping the address mapping from EffectiveAddr to the device physical base address unchanged once this function is invoked. Unexpected errors may occur if the address mapping changes after this function is called. If address translation is not used, use Config->BaseAddress for this parameters, passing the physical address instead.</td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to an <aclass="el"href="struct_x_gpio.html">XGpio</a> instance to be worked on. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>Channel</em> </td><td>contains the channel of the GPIO (1 or 2) to operate on.</td></tr>
<dlclass="return"><dt><b>Returns:</b></dt><dd>Current copy of the discretes register.</dd></dl>
<dlclass="note"><dt><b>Note:</b></dt><dd>The hardware must be built for dual channels if this function is used with any channel other than 1. If it is not, this function will assert. </dd></dl>
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to an <aclass="el"href="struct_x_gpio.html">XGpio</a> instance to be worked on. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>Channel</em> </td><td>contains the channel of the GPIO (1 or 2) to operate on. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>Data</em> </td><td>is the value to be written to the discretes register.</td></tr>
<dlclass="note"><dt><b>Note:</b></dt><dd>The hardware must be built for dual channels if this function is used with any channel other than 1. If it is not, this function will assert. See also <aclass="el"href="xgpio_8h.html#a8f2cea7ef78412c03c7ebdba87b7cdd4">XGpio_DiscreteSet()</a> and <aclass="el"href="xgpio_8h.html#ae430718af9f347c91be42aad580b216c">XGpio_DiscreteClear()</a>. </dd></dl>
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to an <aclass="el"href="struct_x_gpio.html">XGpio</a> instance to be worked on. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>Channel</em> </td><td>contains the channel of the GPIO (1 or 2) to operate on.</td></tr>
<dlclass="return"><dt><b>Returns:</b></dt><dd>Bitmask specifying which discretes are input and which are output. Bits set to 0 are output and bits set to 1 are input.</dd></dl>
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to an <aclass="el"href="struct_x_gpio.html">XGpio</a> instance to be worked on. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>Channel</em> </td><td>contains the channel of the GPIO (1 or 2) to operate on. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>DirectionMask</em> </td><td>is a bitmask specifying which discretes are input and which are output. Bits set to 0 are output and bits set to 1 are input.</td></tr>
<dlclass="note"><dt><b>Note:</b></dt><dd>The hardware must be built for dual channels if this function is used with any channel other than 1. If it is not, this function will assert. </dd></dl>