This file contains the implementation of the interface functions for CFA core. Refer to the header file <aclass="el"href="xcfa_8h.html">xcfa.h</a> for more detailed information.<p>
This function initializes the CFA core. This function must be called prior to using the CFA core. Initialization of the CFA includes setting up the instance data and ensuring the hardware is in a quiescent state.<p>
<dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to the <aclass="el"href="struct_x_cfa.html">XCfa</a> instance to be worked on. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>CfgPtr</em> </td><td>is a reference to a configuration structure containing information about the CFA core. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>EffectiveAddr</em> </td><td>is the base address of the core. If address translation is being used then this parameter must reflect the virtual base address. Otherwise, the physical address should be used.</td></tr>
</table>
</dl>
<dlcompact><dt><b>Returns:</b></dt><dd><ul>
<li>XST_SUCCESS if initialization was successful.</li></ul>
This function disables bypass mode of the CFA core.<p>
<dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to the <aclass="el"href="struct_x_cfa.html">XCfa</a> instance to be worked on.</td></tr>
This function disables the test pattern mode of the CFA core.<p>
<dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to the <aclass="el"href="struct_x_cfa.html">XCfa</a> instance to be worked on.</td></tr>
This sets the bypass bit of the control register to switch the core to bypass mode if debug is enabled in the CFA core.<p>
<dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to the <aclass="el"href="struct_x_cfa.html">XCfa</a> instance to be worked on.</td></tr>
This function sets the test-pattern mode of the CFA core if debug features is enabled.<p>
<dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to the <aclass="el"href="struct_x_cfa.html">XCfa</a> instance to be worked on.</td></tr>
This function gets the number of Active Pixel per Scan line and number of Active Lines per Frame from the Active Frame Size register.<p>
<dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to the <aclass="el"href="struct_x_cfa.html">XCfa</a> instance to be worked on. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>HSize</em> </td><td>is a pointer to 16-bit variable in which the number of Active Pixels per Scan Line is returned. (Range is 32 to 7680). </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>VSize</em> </td><td>is a pointer to 16-bit variable in which the number of Active Lines per Frame is returned. (Range is 32 to 7680).</td></tr>
This function gets the Bayer phase value combination from Bayer phase register.<p>
<dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to the <aclass="el"href="struct_x_cfa.html">XCfa</a> instance to be worked on.</td></tr>
</table>
</dl>
<dlcompact><dt><b>Returns:</b></dt><dd>BayerPhase the Bayer Phase value 0 to 3. The Phase value combinations are<ul>
<li>Bayer Phase 0 is XCFA_RGRG_COMBINATION.</li><li>Bayer Phase 1 is XCFA_GRGR_COMBINATION.</li><li>Bayer Phase 2 is XCFA_GBGB_COMBINATION.</li><li>Bayer Phase 3 is XCFA_BGBG_COMBINATION.</li></ul>
</dd></dl>
<dlcompact><dt><b>Note:</b></dt><dd>- It is a double buffered register. </dd></dl>
This function gets number of frames processed since power-up or last time the core is reset.<p>
<dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to the <aclass="el"href="struct_x_cfa.html">XCfa</a> instance to be worked on.</td></tr>
</table>
</dl>
<dlcompact><dt><b>Returns:</b></dt><dd>FrameCount is the number of frames processed since power up.</dd></dl>
<dlcompact><dt><b>Note:</b></dt><dd>Debug functionality should be enabled. </dd></dl>
This function gets the number of lines processed since power-up or last time the core is reset.<p>
<dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to the <aclass="el"href="struct_x_cfa.html">XCfa</a> instance to be worked on.</td></tr>
</table>
</dl>
<dlcompact><dt><b>Returns:</b></dt><dd>LineCount is the number of lines processed since power up.</dd></dl>
<dlcompact><dt><b>Note:</b></dt><dd>Debug functionality should be enabled. </dd></dl>
This function gets the number of pixels processed since power-up or last time the core is reset.<p>
<dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to the <aclass="el"href="struct_x_cfa.html">XCfa</a> instance to be worked on.</td></tr>
</table>
</dl>
<dlcompact><dt><b>Returns:</b></dt><dd>PixelCount is the number of pixels processed since power up.</dd></dl>
<dlcompact><dt><b>Note:</b></dt><dd>Debug functionality should be enabled. </dd></dl>
This function gets the Version of the CFA core.<p>
<dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to the <aclass="el"href="struct_x_cfa.html">XCfa</a> instance to be worked on.</td></tr>
</table>
</dl>
<dlcompact><dt><b>Returns:</b></dt><dd>Returns the contents of the Version register.</dd></dl>
This function gets the current status of the bypass setting of the CFA core.<p>
<dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to the <aclass="el"href="struct_x_cfa.html">XCfa</a> instance to be worked on.</td></tr>
This function gets the test-pattern mode if debug feature is enabled.<p>
<dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to the <aclass="el"href="struct_x_cfa.html">XCfa</a> instance to be worked on.</td></tr>
This function sets the active H/V sizes in the Active Size register.<p>
<dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to the <aclass="el"href="struct_x_cfa.html">XCfa</a> instance to be worked on. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>HSize</em> </td><td>is number of Active Pixels per scan line to be set. Range of HSize is 32 to 7680. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>VSize</em> </td><td>is number of Active Lines per frame to be set. Range of VSize is 32 to 7680.</td></tr>
This function specify whether the starting position pixel(0,0) of the Bayer sampling grid is on a red-green or blue-green line and whether the first pixel is green or not.<p>
<dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to the <aclass="el"href="struct_x_cfa.html">XCfa</a> instance to be worked on. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>BayerPhase</em> </td><td>to be set to identify starting position. Range of Phase is 0 to 3. The Phase value combinations are<ul>
<li>Bayer Phase 0 is XCFA_RGRG_COMBINATION.</li><li>Bayer Phase 1 is XCFA_GRGR_COMBINATION.</li><li>Bayer Phase 2 is XCFA_GBGB_COMBINATION.</li><li>Bayer Phase 3 is XCFA_BGBG_COMBINATION.</li><li>It is a double buffered register.</li></ul>
This function sets the input/output frame size in Active Size register and enables the register update.<p>
<dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>InstancePtr</em> </td><td>is a pointer to the <aclass="el"href="struct_x_cfa.html">XCfa</a> instance to be worked on.</td></tr>