![]() |
cfa
Xilinx SDK Drivers API Documentation
|
Data Structures | |
struct | XCfa_Config |
This typedef contains configuration information for the CFA core. More... | |
struct | XCfa |
The XCfa instance data structure. More... | |
Macros | |
#define | XCFA_H_ |
Prevent circular inclusions by using protection macros. More... | |
#define | XCfa_Enable(InstancePtr) |
This function macro enables the CFA core. More... | |
#define | XCfa_Disable(InstancePtr) |
This function macro disables the CFA core. More... | |
#define | XCfa_Start XCfa_Enable |
This function macro enables/starts the CFA core. More... | |
#define | XCfa_Stop XCfa_Disable |
This function macro disables/stops the CFA core. More... | |
#define | XCfa_RegUpdateEnable(InstancePtr) |
This function macro commits all the register value changes made so far by the software to the CFA core. More... | |
#define | XCfa_RegUpdateDisable(InstancePtr) |
This function macro prevents the CFA core from committing recent changes made so far by the software. More... | |
#define | XCfa_SyncReset(InstancePtr) |
This function macro resets a CFA core at the end of the frame being processed. More... | |
#define | XCfa_Reset(InstancePtr) |
This macro resets CFA core instance. More... | |
#define | XCfa_StatusGetPending(InstancePtr) |
This function macro returns the pending status of a CFA core. More... | |
#define | XCfa_IntrClear(InstancePtr, IntrType) |
This function macro clears/acknowledges pending interrupts of the CFA core. More... | |
#define | XCfa_IntrEnable(InstancePtr, IntrType) |
This function macro enables the given individual interrupt(s) on the CFA core. More... | |
#define | XCfa_IntrDisable(InstancePtr, IntrType) |
This function macro disables the given individual interrupt(s) on the CFA core by updating Irq_Enable register. More... | |
#define | XCfa_IntrGetPending(InstancePtr) |
This function macro returns the pending interrupts of the CFA core. More... | |
#define | XCFA_HW_H_ |
Prevent circular inclusions by using protection macros. More... | |
#define | XCfa_In32 Xil_In32 |
Cfa Input Operation. More... | |
#define | XCfa_Out32 Xil_Out32 |
Cfa Output Operation. More... | |
#define | XCfa_ReadReg(BaseAddress, RegOffset) XCfa_In32((BaseAddress) + (u32)(RegOffset)) |
This function macro reads the given register. More... | |
#define | XCfa_WriteReg(BaseAddress, RegOffset, Data) XCfa_Out32((BaseAddress) + (u32)(RegOffset), (Data)) |
This function macro writes the given register. More... | |
Typedefs | |
typedef void(* | XCfa_CallBack )(void *CallBackRef) |
Callback type for all interrupts except error interrupt. More... | |
typedef void(* | XCfa_ErrorCallBack )(void *CallBackRef, u32 ErrorMask) |
Callback type for error interrupt. More... | |
Functions | |
int | XCfa_CfgInitialize (XCfa *InstancePtr, XCfa_Config *CfgPtr, u32 EffectiveAddr) |
This function initializes the CFA core. More... | |
void | XCfa_Setup (XCfa *InstancePtr) |
This function sets the input/output frame size in Active Size register and enables the register update. More... | |
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. More... | |
int | XCfa_IsDbgByPassEnabled (XCfa *InstancePtr) |
This function gets the current status of the bypass setting of the CFA core. More... | |
void | XCfa_DisableDbgBypass (XCfa *InstancePtr) |
This function disables bypass mode of the CFA core. More... | |
void | XCfa_EnableDbgTestPattern (XCfa *InstancePtr) |
This function sets the test-pattern mode of the CFA core if debug features is enabled. More... | |
int | XCfa_IsDbgTestPatternEnabled (XCfa *InstancePtr) |
This function gets the test-pattern mode if debug feature is enabled. More... | |
void | XCfa_DisableDbgTestPattern (XCfa *InstancePtr) |
This function disables the test pattern mode of the CFA core. More... | |
u32 | XCfa_GetVersion (XCfa *InstancePtr) |
This function gets the Version of the CFA core. More... | |
u32 | XCfa_GetDbgFrameCount (XCfa *InstancePtr) |
This function gets number of frames processed since power-up or last time the core is reset. More... | |
u32 | XCfa_GetDbgLineCount (XCfa *InstancePtr) |
This function gets the number of lines processed since power-up or last time the core is reset. More... | |
u32 | XCfa_GetDbgPixelCount (XCfa *InstancePtr) |
This function gets the number of pixels processed since power-up or last time the core is reset. More... | |
void | XCfa_SetActiveSize (XCfa *InstancePtr, u16 HSize, u16 VSize) |
This function sets the active H/V sizes in the Active Size register. More... | |
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. More... | |
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. More... | |
u32 | XCfa_GetBayerPhase (XCfa *InstancePtr) |
This function gets the Bayer phase value combination from Bayer phase register. More... | |
XCfa_Config * | XCfa_LookupConfig (u16 DeviceId) |
This function returns a reference to an XCfa_Config structure based on the unique device id, DeviceId. More... | |
int | XCfa_SelfTest (XCfa *InstancePtr) |
This function reads complete Version register of CFA core and compares with zero values as part of self test. More... | |
void | XCfa_IntrHandler (void *InstancePtr) |
This function is the interrupt handler for the CFA core. More... | |
int | XCfa_SetCallBack (XCfa *InstancePtr, u32 HandlerType, void *CallBackFunc, void *CallBackRef) |
This routine installs an asynchronous callback function for the given HandlerType: More... | |
Handler Types | |
enum | { XCFA_HANDLER_PROCSTART = 1, XCFA_HANDLER_FRAMEDONE, XCFA_HANDLER_ERROR } |
These constants specify different types of handlers and used to differentiate interrupt requests from core. More... | |
Bayer phase | |
enum | XCfa_BayerPhaseCombination { XCFA_RGRG_COMBINATION, XCFA_GRGR_COMBINATION, XCFA_GBGB_COMBINATION, XCFA_BGBG_COMBINATION } |
These constants specify Bayer phase combinations of the core. More... | |
Active size range macros | |
#define | XCFA_VSIZE_FIRST 32 |
Vertical Size starting value. More... | |
#define | XCFA_VSIZE_LAST 7680 |
Vertical Size ending value. More... | |
#define | XCFA_HSIZE_FIRST 32 |
Horizontal Size starting value. More... | |
#define | XCFA_HSIZE_LAST 7680 |
Horizontal Size ending value. More... | |
General control registers offsets | |
#define | XCFA_CONTROL_OFFSET 0x000 |
Control. More... | |
#define | XCFA_STATUS_OFFSET 0x004 |
Status. More... | |
#define | XCFA_ERROR_OFFSET 0x008 |
Error. More... | |
#define | XCFA_IRQ_EN_OFFSET 0x00C |
IRQ Enable. More... | |
#define | XCFA_VERSION_OFFSET 0x010 |
Version. More... | |
#define | XCFA_SYSDEBUG0_OFFSET 0x014 |
System Debug 0. More... | |
#define | XCFA_SYSDEBUG1_OFFSET 0x018 |
System Debug 1. More... | |
#define | XCFA_SYSDEBUG2_OFFSET 0x01C |
System Debug 2. More... | |
#define | XCFA_ACTIVE_SIZE_OFFSET 0x020 |
Active Size (V x H) More... | |
#define | XCFA_BAYER_PHASE_OFFSET 0x100 |
Bayer_phase RW user register. More... | |
Control register bit mask definition | |
#define | XCFA_CTL_SW_EN_MASK 0x00000001 |
Enable Mask. More... | |
#define | XCFA_CTL_RUE_MASK 0x00000002 |
Register Update Mask. More... | |
#define | XCFA_CTL_BPE_MASK 0x00000010 |
Bypass Mask. More... | |
#define | XCFA_CTL_TPE_MASK 0x00000020 |
Test pattern Mask. More... | |
#define | XCFA_CTL_AUTORESET_MASK 0x40000000 |
Software Reset - Auto-synchronize to SOF Mask. More... | |
#define | XCFA_CTL_RESET_MASK 0x80000000 |
Software Reset - Instantaneous Mask. More... | |
Interrupt Register Bit Masks. It is applicable for | |
#define | XCFA_IXR_PROCS_STARTED_MASK 0x00000001 |
Process Started Mask. More... | |
#define | XCFA_IXR_EOF_MASK 0x00000002 |
End-Of-Frame Mask. More... | |
#define | XCFA_IXR_SE_MASK 0x00010000 |
Slave Error Mask. More... | |
#define | XCFA_IXR_ALLINTR_MASK 0x00010003 |
Interrupt All Error Mask (ORing of all Interrupt Mask) More... | |
Error Register bit mask definitions | |
#define | XCFA_ERR_EOL_EARLY_MASK 0x00000001 |
Error: End of line Early Mask. More... | |
#define | XCFA_ERR_EOL_LATE_MASK 0x00000002 |
Error: End of line Late Mask. More... | |
#define | XCFA_ERR_SOF_EARLY_MASK 0x00000004 |
Error: Start of frame Early Mask. More... | |
#define | XCFA_ERR_SOF_LATE_MASK 0x00000008 |
Error: Start of frame Late Mask. More... | |
Version register bit definition and shifts | |
#define | XCFA_VER_REV_NUM_MASK 0x000000FF |
Revision Number Mask. More... | |
#define | XCFA_VER_PID_MASK 0x00000F00 |
Patch ID Mask. More... | |
#define | XCFA_VER_MINOR_MASK 0x00FF0000 |
Version Minor Mask. More... | |
#define | XCFA_VER_MAJOR_MASK 0xFF000000 |
Version Major Mask. More... | |
#define | XCFA_VER_REV_MASK 0x0000F000 |
Version revision Mask. More... | |
#define | XCFA_VER_MAJOR_SHIFT 24 |
Version Major Shift. More... | |
#define | XCFA_VER_MINOR_SHIFT 16 |
Version Minor Shift. More... | |
#define | XCFA_VER_INTERNAL_SHIFT 8 |
Version Internal Shift. More... | |
#define | XCFA_VER_REV_SHIFT 12 |
Version Revision Shift. More... | |
Active size register bit mask definition and shifts | |
#define | XCFA_ACTSIZE_NUM_PIXEL_MASK 0x00001FFF |
Active size Mask. More... | |
#define | XCFA_ACTSIZE_NUM_LINE_MASK 0x1FFF0000 |
Number of Active lines per Frame (Vertical) More... | |
#define | XCFA_ACTSIZE_NUM_LINE_SHIFT 16 |
Active size Shift. More... | |
Bayer Phase | |
#define | XCFA_BAYER_PHASE_MASK 0x00000003 |
Bayer Phase Mask. More... | |
General purpose masks | |
#define | XCFA_8_BIT_MASK 0x0FF |
Generic 8 bit Mask. More... | |
Backward compatibility macros | |
#define | CFA_CONTROL XCFA_CONTROL_OFFSET |
#define | CFA_STATUS XCFA_STATUS_OFFSET |
#define | CFA_ERROR XCFA_ERROR_OFFSET |
#define | CFA_IRQ_EN XCFA_IRQ_EN_OFFSET |
#define | CFA_VERSION XCFA_VERSION_OFFSET |
#define | CFA_SYSDEBUG0 XCFA_SYSDEBUG0_OFFSET |
#define | CFA_SYSDEBUG1 XCFA_SYSDEBUG1_OFFSET |
#define | CFA_SYSDEBUG2 XCFA_SYSDEBUG2_OFFSET |
#define | CFA_ACTIVE_SIZE XCFA_ACTIVE_SIZE_OFFSET |
#define | CFA_BAYER_PHASE XCFA_BAYER_PHASE_OFFSET |
#define | CFA_CTL_EN_MASK XCFA_CTL_SW_EN_MASK |
#define | CFA_CTL_RUE_MASK XCFA_CTL_RUE_MASK |
#define | CFA_CTL_CS_MASK XCFA_CTL_CS_MASK |
#define | CFA_RST_RESET XCFA_CTL_RESET_MASK |
#define | CFA_RST_AUTORESET XCFA_CTL_AUTORESET_MASK |
#define | CFA_In32 XCfa_In32 |
#define | CFA_Out32 XCfa_Out32 |
#define | CFA_ReadReg XCfa_ReadReg |
#define | CFA_WriteReg XCfa_WriteReg |
Interrupt Enable and Status Registers Offsets | |
#define | XCFA_ISR_OFFSET XCFA_STATUS_OFFSET |
Interrupt status register generates a interrupt if the corresponding bits of interrupt enable register bits are set. More... | |
#define | XCFA_IER_OFFSET XCFA_IRQ_EN_OFFSET |
Interrupt Enable Offset. More... | |
#define XCFA_8_BIT_MASK 0x0FF |
Generic 8 bit Mask.
Referenced by XCfa_GetBayerPhase().
#define XCFA_ACTIVE_SIZE_OFFSET 0x020 |
Active Size (V x H)
Referenced by XCfa_GetActiveSize(), XCfa_SetActiveSize(), and XCfa_Setup().
#define XCFA_ACTSIZE_NUM_LINE_MASK 0x1FFF0000 |
Number of Active lines per Frame (Vertical)
Referenced by XCfa_GetActiveSize(), and XCfa_Setup().
#define XCFA_ACTSIZE_NUM_LINE_SHIFT 16 |
Active size Shift.
Referenced by XCfa_GetActiveSize(), XCfa_SetActiveSize(), and XCfa_Setup().
#define XCFA_ACTSIZE_NUM_PIXEL_MASK 0x00001FFF |
Active size Mask.
Referenced by XCfa_GetActiveSize(), and XCfa_Setup().
#define XCFA_BAYER_PHASE_MASK 0x00000003 |
Bayer Phase Mask.
Referenced by XCfa_SetBayerPhase().
#define XCFA_BAYER_PHASE_OFFSET 0x100 |
Bayer_phase RW user register.
Referenced by XCfa_GetBayerPhase(), and XCfa_SetBayerPhase().
#define XCFA_CONTROL_OFFSET 0x000 |
#define XCFA_CTL_AUTORESET_MASK 0x40000000 |
Software Reset - Auto-synchronize to SOF Mask.
#define XCFA_CTL_BPE_MASK 0x00000010 |
Bypass Mask.
Referenced by XCfa_DisableDbgBypass(), XCfa_EnableDbgByPass(), and XCfa_IsDbgByPassEnabled().
#define XCFA_CTL_RESET_MASK 0x80000000 |
Software Reset - Instantaneous Mask.
#define XCFA_CTL_RUE_MASK 0x00000002 |
Register Update Mask.
#define XCFA_CTL_SW_EN_MASK 0x00000001 |
Enable Mask.
#define XCFA_CTL_TPE_MASK 0x00000020 |
Test pattern Mask.
Referenced by XCfa_DisableDbgTestPattern(), XCfa_EnableDbgTestPattern(), and XCfa_IsDbgTestPatternEnabled().
#define XCfa_Disable | ( | InstancePtr | ) |
This function macro disables the CFA core.
InstancePtr | is a pointer to the XCfa instance to be worked on. |
#define XCfa_Enable | ( | InstancePtr | ) |
This function macro enables the CFA core.
InstancePtr | is a pointer to the XCfa instance to be worked on. |
#define XCFA_ERR_EOL_EARLY_MASK 0x00000001 |
Error: End of line Early Mask.
#define XCFA_ERR_EOL_LATE_MASK 0x00000002 |
Error: End of line Late Mask.
#define XCFA_ERR_SOF_EARLY_MASK 0x00000004 |
Error: Start of frame Early Mask.
#define XCFA_ERR_SOF_LATE_MASK 0x00000008 |
Error: Start of frame Late Mask.
#define XCFA_ERROR_OFFSET 0x008 |
Error.
Referenced by XCfaSelfTestExample().
#define XCFA_H_ |
Prevent circular inclusions by using protection macros.
#define XCFA_HSIZE_FIRST 32 |
Horizontal Size starting value.
Referenced by XCfa_SetActiveSize().
#define XCFA_HSIZE_LAST 7680 |
Horizontal Size ending value.
Referenced by XCfa_SetActiveSize().
#define XCFA_HW_H_ |
Prevent circular inclusions by using protection macros.
#define XCFA_IER_OFFSET XCFA_IRQ_EN_OFFSET |
Interrupt Enable Offset.
#define XCfa_In32 Xil_In32 |
Cfa Input Operation.
#define XCfa_IntrClear | ( | InstancePtr, | |
IntrType | |||
) |
This function macro clears/acknowledges pending interrupts of the CFA core.
in the Status register. Bit positions of 1 will be cleared.
InstancePtr | is a pointer to the XCfa instance to be worked on. |
IntrType | is the pending interrupts to clear/acknowledge. Use OR'ing of XCFA_IXR_*_MASK constants defined in xcfa_hw.h to create this parameter value. |
Referenced by XCfa_IntrHandler().
#define XCfa_IntrDisable | ( | InstancePtr, | |
IntrType | |||
) |
This function macro disables the given individual interrupt(s) on the CFA core by updating Irq_Enable register.
InstancePtr | is a pointer to the XCfa instance to be worked on. |
IntrType | is the bit-mask of the interrupts to be disabled. Bit positions of 1 will be disabled. Bit positions of 0 will keep the previous setting. This mask is formed by OR'ing XCFA_IXR_*_MASK bits defined in xcfa_hw.h. |
#define XCfa_IntrEnable | ( | InstancePtr, | |
IntrType | |||
) |
This function macro enables the given individual interrupt(s) on the CFA core.
InstancePtr | is a pointer to the XCfa instance to be worked on. |
IntrType | is the bit-mask of the interrupts to be enabled. Bit positions of 1 will be enabled. Bit positions of 0 will keep the previous setting. This mask is formed by OR'ing XCFA_IXR_*_MASK bits defined in xcfa_hw.h. |
#define XCfa_IntrGetPending | ( | InstancePtr | ) |
This function macro returns the pending interrupts of the CFA core.
InstancePtr | is a pointer to the XCfa instance to be worked on. |
Referenced by XCfa_IntrHandler().
#define XCFA_IRQ_EN_OFFSET 0x00C |
IRQ Enable.
#define XCFA_ISR_OFFSET XCFA_STATUS_OFFSET |
Interrupt status register generates a interrupt if the corresponding bits of interrupt enable register bits are set.
Interrupt Status Offset
#define XCFA_IXR_ALLINTR_MASK 0x00010003 |
Interrupt All Error Mask (ORing of all Interrupt Mask)
#define XCFA_IXR_EOF_MASK 0x00000002 |
End-Of-Frame Mask.
Referenced by XCfa_IntrHandler().
#define XCFA_IXR_PROCS_STARTED_MASK 0x00000001 |
Process Started Mask.
Referenced by XCfa_IntrHandler().
#define XCFA_IXR_SE_MASK 0x00010000 |
Slave Error Mask.
Referenced by XCfa_IntrHandler().
#define XCfa_Out32 Xil_Out32 |
Cfa Output Operation.
#define XCfa_ReadReg | ( | BaseAddress, | |
RegOffset | |||
) | XCfa_In32((BaseAddress) + (u32)(RegOffset)) |
This function macro reads the given register.
BaseAddress | is the base address of the CFA core. |
RegOffset | is the register offset of the core (defined at top of this file). |
Referenced by XCfa_DisableDbgBypass(), XCfa_DisableDbgTestPattern(), XCfa_EnableDbgByPass(), XCfa_EnableDbgTestPattern(), XCfa_GetActiveSize(), XCfa_GetBayerPhase(), XCfa_GetDbgFrameCount(), XCfa_GetDbgLineCount(), XCfa_GetDbgPixelCount(), XCfa_GetVersion(), XCfa_IsDbgByPassEnabled(), XCfa_IsDbgTestPatternEnabled(), XCfa_SelfTest(), and XCfaSelfTestExample().
#define XCfa_RegUpdateDisable | ( | InstancePtr | ) |
This function macro prevents the CFA core from committing recent changes made so far by the software.
When disabled, changes to other configuration registers are stored, but do not effect the behavior of the core.
InstancePtr | is a pointer to the XCfa instance to be worked on. |
Referenced by XCfa_Setup().
#define XCfa_RegUpdateEnable | ( | InstancePtr | ) |
This function macro commits all the register value changes made so far by the software to the CFA core.
InstancePtr | is a pointer to the XCfa instance to be worked on. |
Referenced by XCfa_Setup().
#define XCfa_Reset | ( | InstancePtr | ) |
This macro resets CFA core instance.
This reset effects the core immediately and may cause image tearing.
InstancePtr | is a pointer to the XCfa instance to be worked on. |
Referenced by XCfa_CfgInitialize().
#define XCfa_Start XCfa_Enable |
This function macro enables/starts the CFA core.
InstancePtr | is a pointer to the XCfa instance to be worked on. |
#define XCFA_STATUS_OFFSET 0x004 |
Status.
Referenced by XCfaSelfTestExample().
#define XCfa_StatusGetPending | ( | InstancePtr | ) |
This function macro returns the pending status of a CFA core.
InstancePtr | is a pointer to the XCfa instance to be worked on. |
#define XCfa_Stop XCfa_Disable |
This function macro disables/stops the CFA core.
InstancePtr | is a pointer to the XCfa instance to be worked on. |
#define XCfa_SyncReset | ( | InstancePtr | ) |
This function macro resets a CFA core at the end of the frame being processed.
It enables core automatically synchronizes to the SOF of the core to prevent image tearing. This function macro is differ from XCfa_Reset().
On the next rising-edge of SOF following a call to XCfa_SyncReset(), all of the core's configuration registers and outputs will be reset, then the reset flag will be immediately released, allowing the core to immediately resume default operation.
InstancePtr | is a pointer to the XCfa instance to be worked on. |
#define XCFA_SYSDEBUG0_OFFSET 0x014 |
System Debug 0.
Referenced by XCfa_GetDbgFrameCount().
#define XCFA_SYSDEBUG1_OFFSET 0x018 |
System Debug 1.
Referenced by XCfa_GetDbgLineCount().
#define XCFA_SYSDEBUG2_OFFSET 0x01C |
System Debug 2.
Referenced by XCfa_GetDbgPixelCount().
#define XCFA_VER_INTERNAL_SHIFT 8 |
Version Internal Shift.
#define XCFA_VER_MAJOR_MASK 0xFF000000 |
Version Major Mask.
#define XCFA_VER_MAJOR_SHIFT 24 |
Version Major Shift.
#define XCFA_VER_MINOR_MASK 0x00FF0000 |
Version Minor Mask.
#define XCFA_VER_MINOR_SHIFT 16 |
Version Minor Shift.
#define XCFA_VER_PID_MASK 0x00000F00 |
Patch ID Mask.
#define XCFA_VER_REV_MASK 0x0000F000 |
Version revision Mask.
#define XCFA_VER_REV_NUM_MASK 0x000000FF |
Revision Number Mask.
#define XCFA_VER_REV_SHIFT 12 |
Version Revision Shift.
#define XCFA_VERSION_OFFSET 0x010 |
Version.
Referenced by XCfa_GetVersion(), and XCfa_SelfTest().
#define XCFA_VSIZE_FIRST 32 |
Vertical Size starting value.
Referenced by XCfa_SetActiveSize().
#define XCFA_VSIZE_LAST 7680 |
Vertical Size ending value.
Referenced by XCfa_SetActiveSize().
#define XCfa_WriteReg | ( | BaseAddress, | |
RegOffset, | |||
Data | |||
) | XCfa_Out32((BaseAddress) + (u32)(RegOffset), (Data)) |
This function macro writes the given register.
BaseAddress | is the base address of the CFA core. |
RegOffset | is the register offset of the core (defined at top of this file). |
Data | is the 32-bit value to write into the register. |
Referenced by XCfa_DisableDbgBypass(), XCfa_DisableDbgTestPattern(), XCfa_EnableDbgByPass(), XCfa_EnableDbgTestPattern(), XCfa_SetActiveSize(), XCfa_SetBayerPhase(), and XCfa_Setup().
typedef void(* XCfa_CallBack)(void *CallBackRef) |
Callback type for all interrupts except error interrupt.
CallBackRef | is a callback reference passed in by the upper layer when setting the callback functions, and passed back to the upper layer when the callback is invoked. |
typedef void(* XCfa_ErrorCallBack)(void *CallBackRef, u32 ErrorMask) |
Callback type for error interrupt.
CallBackRef | is a callback reference passed in by the upper layer when setting the callback functions, and passed back to the upper layer when the callback is invoked. |
ErrorMask | is a bit mask indicating the cause of the error. Its value equals 'OR'ing one or more XCFA_IXR_*_MASK values defined in xcfa_hw.h. |
anonymous enum |
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. |
References XCfa_Config::BaseAddress, XCfa::Config, XCfa::ErrCallBack, XCfa::FrameDoneCallBack, XCfa::IsReady, XCfa::ProcStartCallBack, and XCfa_Reset.
Referenced by XCfaSelfTestExample().
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. |
References XCfa_Config::BaseAddress, XCfa::Config, XCfa_Config::HasDebug, XCFA_CONTROL_OFFSET, XCFA_CTL_BPE_MASK, XCfa_ReadReg, and XCfa_WriteReg.
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. |
References XCfa_Config::BaseAddress, XCfa::Config, XCfa_Config::HasDebug, XCFA_CONTROL_OFFSET, XCFA_CTL_TPE_MASK, XCfa_ReadReg, and XCfa_WriteReg.
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. |
References XCfa_Config::BaseAddress, XCfa::Config, XCfa_Config::HasDebug, XCFA_CONTROL_OFFSET, XCFA_CTL_BPE_MASK, XCfa_ReadReg, and XCfa_WriteReg.
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. |
References XCfa_Config::BaseAddress, XCfa::Config, XCfa_Config::HasDebug, XCFA_CONTROL_OFFSET, XCFA_CTL_TPE_MASK, XCfa_ReadReg, and XCfa_WriteReg.
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). |
References XCfa_Config::BaseAddress, XCfa::Config, XCFA_ACTIVE_SIZE_OFFSET, XCFA_ACTSIZE_NUM_LINE_MASK, XCFA_ACTSIZE_NUM_LINE_SHIFT, XCFA_ACTSIZE_NUM_PIXEL_MASK, and XCfa_ReadReg.
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. |
References XCfa_Config::BaseAddress, XCfa::Config, XCFA_8_BIT_MASK, XCFA_BAYER_PHASE_OFFSET, and XCfa_ReadReg.
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. |
References XCfa_Config::BaseAddress, XCfa::Config, XCfa_Config::HasDebug, XCfa_ReadReg, and XCFA_SYSDEBUG0_OFFSET.
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. |
References XCfa_Config::BaseAddress, XCfa::Config, XCfa_Config::HasDebug, XCfa_ReadReg, and XCFA_SYSDEBUG1_OFFSET.
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. |
References XCfa_Config::BaseAddress, XCfa::Config, XCfa_Config::HasDebug, XCfa_ReadReg, and XCFA_SYSDEBUG2_OFFSET.
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. |
References XCfa_Config::BaseAddress, XCfa::Config, XCfa_ReadReg, and XCFA_VERSION_OFFSET.
void XCfa_IntrHandler | ( | void * | InstancePtr | ) |
This function is the interrupt handler for the CFA core.
This handler reads the pending interrupt from the STATUS register, determines the source of the interrupts and calls the respective callbacks for the interrupts that are enabled in IRQ_ENABLE register, and finally clears the interrupts.
The application is responsible for connecting this function to the interrupt system. Application beyond this core is also responsible for providing callbacks to handle interrupts and installing the callbacks using XCfa_SetCallBack() during initialization phase.
InstancePtr | is a pointer to the XCfa instance that just interrupted. |
References XCfa::Config, XCfa::ErrCallBack, XCfa::ErrRef, XCfa::FrameDoneCallBack, XCfa::FrameDoneRef, XCfa_Config::HasIntcIf, XCfa::IsReady, XCfa::ProcStartCallBack, XCfa::ProcStartRef, XCfa_IntrClear, XCfa_IntrGetPending, XCFA_IXR_EOF_MASK, XCFA_IXR_PROCS_STARTED_MASK, and XCFA_IXR_SE_MASK.
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. |
References XCfa_Config::BaseAddress, XCfa::Config, XCfa_Config::HasDebug, XCFA_CONTROL_OFFSET, XCFA_CTL_BPE_MASK, and XCfa_ReadReg.
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. |
References XCfa_Config::BaseAddress, XCfa::Config, XCfa_Config::HasDebug, XCFA_CONTROL_OFFSET, XCFA_CTL_TPE_MASK, and XCfa_ReadReg.
XCfa_Config * XCfa_LookupConfig | ( | u16 | DeviceId | ) |
This function returns a reference to an XCfa_Config structure based on the unique device id, DeviceId.
The return value will refer to an entry in the device configuration table defined in the xcfa_g.c file.
DeviceId | is the unique device ID of the core for the lookup operation. |
Referenced by XCfaSelfTestExample().
int XCfa_SelfTest | ( | XCfa * | InstancePtr | ) |
This function reads complete Version register of CFA core and compares with zero values as part of self test.
InstancePtr | is a pointer to the XCfa instance to be worked on. |
References XCfa_Config::BaseAddress, XCfa::Config, XCfa_ReadReg, and XCFA_VERSION_OFFSET.
Referenced by XCfaSelfTestExample().
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. |
References XCfa_Config::BaseAddress, XCfa::Config, XCFA_ACTIVE_SIZE_OFFSET, XCFA_ACTSIZE_NUM_LINE_SHIFT, XCFA_HSIZE_FIRST, XCFA_HSIZE_LAST, XCFA_VSIZE_FIRST, XCFA_VSIZE_LAST, and XCfa_WriteReg.
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
|
References XCfa_Config::BaseAddress, XCfa::Config, XCFA_BAYER_PHASE_MASK, XCFA_BAYER_PHASE_OFFSET, XCFA_BGBG_COMBINATION, and XCfa_WriteReg.
int XCfa_SetCallBack | ( | XCfa * | InstancePtr, |
u32 | HandlerType, | ||
void * | CallBackFunc, | ||
void * | CallBackRef | ||
) |
This routine installs an asynchronous callback function for the given HandlerType:
HandlerType Callback Function Type ----------------------- ----------------------------------- XCFA_HANDLER_FRAMEDONE FrameDoneCallBack XCFA_HANDLER_PROCSTART ProcStartCallBack XCFA_HANDLER_ERROR ErrCallBack
InstancePtr | is a pointer to the XCfa instance to be worked on. |
HandlerType | specifies which callback is to be attached. |
CallBackFunc | is the address of the callback function. |
CallBackRef | is a user data item that will be passed to the callback function when it is invoked. |
References XCfa::ErrCallBack, XCfa::ErrRef, XCfa::FrameDoneCallBack, XCfa::FrameDoneRef, XCfa::IsReady, XCfa::ProcStartCallBack, XCfa::ProcStartRef, XCFA_HANDLER_ERROR, XCFA_HANDLER_FRAMEDONE, and XCFA_HANDLER_PROCSTART.
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. |
References XCfa_Config::BaseAddress, XCfa::Config, XCfa::HSize, XCfa::VSize, XCFA_ACTIVE_SIZE_OFFSET, XCFA_ACTSIZE_NUM_LINE_MASK, XCFA_ACTSIZE_NUM_LINE_SHIFT, XCFA_ACTSIZE_NUM_PIXEL_MASK, XCfa_RegUpdateDisable, XCfa_RegUpdateEnable, and XCfa_WriteReg.