MODIFICATION HISTORY:
Ver Who Date Changes ----- ------ -------- -------------------------------------------------- 1.00 drg/jz 01/13/10 First Release 3.00a gz 10/22/10 Updated for CFA V3.0 4.00a rc 09/11/11 Updated for CFA v4.0 5.00a se 12/01/11 Updated for CFA v5.0 7.0 adk 01/07/14 Changed the file name from cfa.c to xcfa.c Implemented the following functions: XCfa_CfgInitialize, XCfa_Setup, XCfa_GetVersion, XCfa_EnableDbgByPass, XCfa_IsDbgByPassEnabled, XCfa_DisableDbgBypass, XCfa_EnableDbgTestPattern, XCfa_IsDbgTestPatternEnabled, XCfa_DisableDbgTestPattern, XCfa_GetDbgFrameCount XCfa_GetDbgLineCount, XCfa_GetDbgPixelCount XCfa_SetActiveSize, XCfa_GetActiveSize XCfa_SetBayerPhase, XCfa_GetBayerPhase, StubCallBack, StubErrCallBack.
#include "xcfa.h"
Functions | |
int | XCfa_CfgInitialize (XCfa *InstancePtr, XCfa_Config *CfgPtr, u32 EffectiveAddr) |
void | XCfa_Setup (XCfa *InstancePtr) |
void | XCfa_EnableDbgByPass (XCfa *InstancePtr) |
int | XCfa_IsDbgByPassEnabled (XCfa *InstancePtr) |
void | XCfa_DisableDbgBypass (XCfa *InstancePtr) |
void | XCfa_EnableDbgTestPattern (XCfa *InstancePtr) |
int | XCfa_IsDbgTestPatternEnabled (XCfa *InstancePtr) |
void | XCfa_DisableDbgTestPattern (XCfa *InstancePtr) |
u32 | XCfa_GetVersion (XCfa *InstancePtr) |
u32 | XCfa_GetDbgFrameCount (XCfa *InstancePtr) |
u32 | XCfa_GetDbgLineCount (XCfa *InstancePtr) |
u32 | XCfa_GetDbgPixelCount (XCfa *InstancePtr) |
void | XCfa_SetActiveSize (XCfa *InstancePtr, u16 HSize, u16 VSize) |
void | XCfa_GetActiveSize (XCfa *InstancePtr, u16 *HSize, u16 *VSize) |
void | XCfa_SetBayerPhase (XCfa *InstancePtr, enum XCfa_BayerPhaseCombination BayerPhase) |
u32 | XCfa_GetBayerPhase (XCfa *InstancePtr) |
int XCfa_CfgInitialize | ( | XCfa * | InstancePtr, | |
XCfa_Config * | CfgPtr, | |||
u32 | EffectiveAddr | |||
) |
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.
InstancePtr | is a pointer to the XCfa instance to be worked on. | |
CfgPtr | is a reference to a configuration structure containing information about the CFA core. | |
EffectiveAddr | 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. |
void XCfa_DisableDbgBypass | ( | XCfa * | InstancePtr | ) |
This function disables bypass mode of the CFA core.
InstancePtr | is a pointer to the XCfa instance to be worked on. |
void XCfa_DisableDbgTestPattern | ( | XCfa * | InstancePtr | ) |
This function disables the test pattern mode of the CFA core.
InstancePtr | is a pointer to the XCfa instance to be worked on. |
void XCfa_EnableDbgByPass | ( | XCfa * | InstancePtr | ) |
This sets the bypass bit of the control register to switch the core to bypass mode if debug is enabled in the CFA core.
InstancePtr | is a pointer to the XCfa instance to be worked on. |
void XCfa_EnableDbgTestPattern | ( | XCfa * | InstancePtr | ) |
This function sets the test-pattern mode of the CFA core if debug features is enabled.
InstancePtr | is a pointer to the XCfa instance to be worked on. |
void XCfa_GetActiveSize | ( | XCfa * | InstancePtr, | |
u16 * | HSize, | |||
u16 * | VSize | |||
) |
This function gets the number of Active Pixel per Scan line and number of Active Lines per Frame from the Active Frame Size register.
InstancePtr | is a pointer to the XCfa instance to be worked on. | |
HSize | is a pointer to 16-bit variable in which the number of Active Pixels per Scan Line is returned. (Range is 32 to 7680). | |
VSize | is a pointer to 16-bit variable in which the number of Active Lines per Frame is returned. (Range is 32 to 7680). |
u32 XCfa_GetBayerPhase | ( | XCfa * | InstancePtr | ) |
This function gets the Bayer phase value combination from Bayer phase register.
InstancePtr | is a pointer to the XCfa instance to be worked on. |
u32 XCfa_GetDbgFrameCount | ( | XCfa * | InstancePtr | ) |
This function gets number of frames processed since power-up or last time the core is reset.
InstancePtr | is a pointer to the XCfa instance to be worked on. |
u32 XCfa_GetDbgLineCount | ( | XCfa * | InstancePtr | ) |
This function gets the number of lines processed since power-up or last time the core is reset.
InstancePtr | is a pointer to the XCfa instance to be worked on. |
u32 XCfa_GetDbgPixelCount | ( | XCfa * | InstancePtr | ) |
This function gets the number of pixels processed since power-up or last time the core is reset.
InstancePtr | is a pointer to the XCfa instance to be worked on. |
u32 XCfa_GetVersion | ( | XCfa * | InstancePtr | ) |
This function gets the Version of the CFA core.
InstancePtr | is a pointer to the XCfa instance to be worked on. |
int XCfa_IsDbgByPassEnabled | ( | XCfa * | InstancePtr | ) |
This function gets the current status of the bypass setting of the CFA core.
InstancePtr | is a pointer to the XCfa instance to be worked on. |
int XCfa_IsDbgTestPatternEnabled | ( | XCfa * | InstancePtr | ) |
This function gets the test-pattern mode if debug feature is enabled.
InstancePtr | is a pointer to the XCfa instance to be worked on. |
void XCfa_SetActiveSize | ( | XCfa * | InstancePtr, | |
u16 | HSize, | |||
u16 | VSize | |||
) |
This function sets the active H/V sizes in the Active Size register.
InstancePtr | is a pointer to the XCfa instance to be worked on. | |
HSize | is number of Active Pixels per scan line to be set. Range of HSize is 32 to 7680. | |
VSize | is number of Active Lines per frame to be set. Range of VSize is 32 to 7680. |
void XCfa_SetBayerPhase | ( | XCfa * | InstancePtr, | |
enum XCfa_BayerPhaseCombination | BayerPhase | |||
) |
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.
InstancePtr | is a pointer to the XCfa instance to be worked on. | |
BayerPhase | to be set to identify starting position. Range of Phase is 0 to 3. The Phase value combinations are
|
void XCfa_Setup | ( | XCfa * | InstancePtr | ) |
This function sets the input/output frame size in Active Size register and enables the register update.
InstancePtr | is a pointer to the XCfa instance to be worked on. |
Copyright @ 1995-2014 Xilinx, Inc. All rights reserved.