<p>This file contains the functions of the <aclass="el"href="struct_x_hw_icap.html">XHwIcap</a> driver. See <aclass="el"href="xhwicap_8h.html">xhwicap.h</a> for a detailed description of the driver.</p>
<p>Virtex4, Virtex5, Virtex6, Spartan6, 7 series and Zynq devices are supported.</p>
<p>In a Zynq device the ICAP needs to be selected using the XDcfg_SelectIcapInterface API of the DevCfg driver (clear the PCAP_PR bit of Control register in the Device Config Interface) before it can be accessed using the HwIcap.</p>
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to the <aclass="el"href="struct_x_hw_icap.html">XHwIcap</a> instance.</td></tr>
<p>This function initializes a specific <aclass="el"href="struct_x_hw_icap.html">XHwIcap</a> instance. The IDCODE is read from the FPGA and based on the IDCODE the information about the resources in the FPGA is filled in the instance structure.</p>
<p>The HwIcap device will be in put in a reset state before exiting this function.</p>
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to the <aclass="el"href="struct_x_hw_icap.html">XHwIcap</a> instance. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>ConfigPtr</em> </td><td>points to the <aclass="el"href="struct_x_hw_icap.html">XHwIcap</a> device configuration structure. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>EffectiveAddr</em> </td><td>is the device base address in the virtual memory address space. If the address translation is not used then the physical address is passed. Unexpected errors may occur if the address mapping is changed after this function is invoked.</td></tr>
<p>This function reads the specified number of words from the ICAP device in the polled mode. Interrupt mode is not supported in reading data from the ICAP device.</p>
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to the <aclass="el"href="struct_x_hw_icap.html">XHwIcap</a> instance. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>FrameBuffer</em> </td><td>is a pointer to the memory where the frame read from the ICAP device is stored. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>NumWords</em> </td><td>is the number of words (16 bit for S6 and 32 bit for all other devices) to write to the ICAP device.</td></tr>
<li>XST_SUCCESS if the specified number of words have been read from the ICAP device</li>
<li>XST_FAILURE if the device is busy with the last Read/Write or if the requested number of words have not been read from the ICAP device, or there is a timeout.</li>
<p>This function writes the given user data to the Write FIFO in both the polled mode and the interrupt mode and starts the transfer of the data to the ICAP device.</p>
<p>In the polled mode, this function will write the specified number of words into the FIFO before returning.</p>
<p>In the interrupt mode, this function will write the words upto the size of the Write FIFO and starts the transfer, then subsequent transfer of the data is performed by the interrupt service routine until the entire buffer has been transferred. The status callback function is called when the entire buffer has been sent. In order to use interrupts, it is necessary for the user to connect the driver interrupt handler, <aclass="el"href="xhwicap_8h.html#a9cf1ff1dd1056a11f65a903c47492842">XHwIcap_IntrHandler()</a>, to the interrupt system of the application and enable the interrupts associated with the Write FIFO. The user has to enable the interrupts each time this function is called using the XHwIcap_IntrEnable macro.</p>
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to the <aclass="el"href="struct_x_hw_icap.html">XHwIcap</a> instance. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>FrameBuffer</em> </td><td>is a pointer to the data to be written to the ICAP device. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>NumWords</em> </td><td>is the number of words (16 bit for S6 and 32 bit for all other devices)to write to the ICAP device.</td></tr>
<dlclass="return"><dt><b>Returns:</b></dt><dd>XST_SUCCESS or XST_FAILURE</dd></dl>
<dlclass="note"><dt><b>Note:</b></dt><dd>This function is a blocking for the polled mode of operation and is non-blocking for the interrupt mode of operation. Use the function XHwIcap_DeviceWriteFrame for writing a frame of data to the ICAP device. </dd></dl>
<p><p>Icap Width of 32 does not use Fifo but declared to overcome compilation error. Size of 4 is used to overcome compiler warnings </p>
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to the <aclass="el"href="struct_x_hw_icap.html">XHwIcap</a> instance.</td></tr>
<p>This function forces the software reset of the complete HWICAP device. All the registers will return to the default value and the FIFO is also flushed as a part of this software reset.</p>
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to the <aclass="el"href="struct_x_hw_icap.html">XHwIcap</a> instance.</td></tr>