cfa
Xilinx SDK Drivers API Documentation
Cfa_v7_1

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_ConfigXCfa_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

Status and Irq_Enable Registers

#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...
 

Macro Definition Documentation

◆ XCFA_8_BIT_MASK

#define XCFA_8_BIT_MASK   0x0FF

#include <xcfa_hw.h>

Generic 8 bit Mask.

Referenced by XCfa_GetBayerPhase().

◆ XCFA_ACTIVE_SIZE_OFFSET

#define XCFA_ACTIVE_SIZE_OFFSET   0x020

#include <xcfa_hw.h>

Active Size (V x H)

Referenced by XCfa_GetActiveSize(), XCfa_SetActiveSize(), and XCfa_Setup().

◆ XCFA_ACTSIZE_NUM_LINE_MASK

#define XCFA_ACTSIZE_NUM_LINE_MASK   0x1FFF0000

#include <xcfa_hw.h>

Number of Active lines per Frame (Vertical)

Referenced by XCfa_GetActiveSize(), and XCfa_Setup().

◆ XCFA_ACTSIZE_NUM_LINE_SHIFT

#define XCFA_ACTSIZE_NUM_LINE_SHIFT   16

#include <xcfa_hw.h>

Active size Shift.

Referenced by XCfa_GetActiveSize(), XCfa_SetActiveSize(), and XCfa_Setup().

◆ XCFA_ACTSIZE_NUM_PIXEL_MASK

#define XCFA_ACTSIZE_NUM_PIXEL_MASK   0x00001FFF

#include <xcfa_hw.h>

Active size Mask.

Referenced by XCfa_GetActiveSize(), and XCfa_Setup().

◆ XCFA_BAYER_PHASE_MASK

#define XCFA_BAYER_PHASE_MASK   0x00000003

#include <xcfa_hw.h>

Bayer Phase Mask.

Referenced by XCfa_SetBayerPhase().

◆ XCFA_BAYER_PHASE_OFFSET

#define XCFA_BAYER_PHASE_OFFSET   0x100

#include <xcfa_hw.h>

Bayer_phase RW user register.

Referenced by XCfa_GetBayerPhase(), and XCfa_SetBayerPhase().

◆ XCFA_CONTROL_OFFSET

◆ XCFA_CTL_AUTORESET_MASK

#define XCFA_CTL_AUTORESET_MASK   0x40000000

#include <xcfa_hw.h>

Software Reset - Auto-synchronize to SOF Mask.

◆ XCFA_CTL_BPE_MASK

#define XCFA_CTL_BPE_MASK   0x00000010

◆ XCFA_CTL_RESET_MASK

#define XCFA_CTL_RESET_MASK   0x80000000

#include <xcfa_hw.h>

Software Reset - Instantaneous Mask.

◆ XCFA_CTL_RUE_MASK

#define XCFA_CTL_RUE_MASK   0x00000002

#include <xcfa_hw.h>

Register Update Mask.

◆ XCFA_CTL_SW_EN_MASK

#define XCFA_CTL_SW_EN_MASK   0x00000001

#include <xcfa_hw.h>

Enable Mask.

◆ XCFA_CTL_TPE_MASK

#define XCFA_CTL_TPE_MASK   0x00000020

◆ XCfa_Disable

#define XCfa_Disable (   InstancePtr)

#include <xcfa.h>

Value:
XCfa_WriteReg((InstancePtr)->Config.BaseAddress, \
((XCfa_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XCFA_CONTROL_OFFSET
Control.
Definition: xcfa_hw.h:73
#define XCfa_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xcfa_hw.h:242
#define XCFA_CTL_SW_EN_MASK
Enable Mask.
Definition: xcfa_hw.h:92
#define XCfa_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xcfa_hw.h:261

This function macro disables the CFA core.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
Returns
None.
Note
C-style signature: void XCfa_Disable(XCfa *InstancePtr)

◆ XCfa_Enable

#define XCfa_Enable (   InstancePtr)

#include <xcfa.h>

Value:
XCfa_WriteReg((InstancePtr)->Config.BaseAddress, \
((XCfa_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XCFA_CONTROL_OFFSET
Control.
Definition: xcfa_hw.h:73
#define XCfa_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xcfa_hw.h:242
#define XCFA_CTL_SW_EN_MASK
Enable Mask.
Definition: xcfa_hw.h:92
#define XCfa_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xcfa_hw.h:261

This function macro enables the CFA core.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
Returns
None.
Note
C-style signature: void XCfa_Enable(XCfa *InstancePtr)

◆ XCFA_ERR_EOL_EARLY_MASK

#define XCFA_ERR_EOL_EARLY_MASK   0x00000001

#include <xcfa_hw.h>

Error: End of line Early Mask.

◆ XCFA_ERR_EOL_LATE_MASK

#define XCFA_ERR_EOL_LATE_MASK   0x00000002

#include <xcfa_hw.h>

Error: End of line Late Mask.

◆ XCFA_ERR_SOF_EARLY_MASK

#define XCFA_ERR_SOF_EARLY_MASK   0x00000004

#include <xcfa_hw.h>

Error: Start of frame Early Mask.

◆ XCFA_ERR_SOF_LATE_MASK

#define XCFA_ERR_SOF_LATE_MASK   0x00000008

#include <xcfa_hw.h>

Error: Start of frame Late Mask.

◆ XCFA_ERROR_OFFSET

#define XCFA_ERROR_OFFSET   0x008

#include <xcfa_hw.h>

Error.

Referenced by XCfaSelfTestExample().

◆ XCFA_H_

#define XCFA_H_

#include <xcfa.h>

Prevent circular inclusions by using protection macros.

◆ XCFA_HSIZE_FIRST

#define XCFA_HSIZE_FIRST   32

#include <xcfa.h>

Horizontal Size starting value.

Referenced by XCfa_SetActiveSize().

◆ XCFA_HSIZE_LAST

#define XCFA_HSIZE_LAST   7680

#include <xcfa.h>

Horizontal Size ending value.

Referenced by XCfa_SetActiveSize().

◆ XCFA_HW_H_

#define XCFA_HW_H_

#include <xcfa_hw.h>

Prevent circular inclusions by using protection macros.

◆ XCFA_IER_OFFSET

#define XCFA_IER_OFFSET   XCFA_IRQ_EN_OFFSET

#include <xcfa_hw.h>

Interrupt Enable Offset.

◆ XCfa_In32

#define XCfa_In32   Xil_In32

#include <xcfa_hw.h>

Cfa Input Operation.

◆ XCfa_IntrClear

#define XCfa_IntrClear (   InstancePtr,
  IntrType 
)

#include <xcfa.h>

Value:
XCfa_WriteReg((InstancePtr)->Config.BaseAddress, \
(XCFA_STATUS_OFFSET), ((IntrType) & \
#define XCFA_STATUS_OFFSET
Status.
Definition: xcfa_hw.h:74
#define XCFA_IXR_ALLINTR_MASK
Interrupt All Error Mask (ORing of all Interrupt Mask)
Definition: xcfa_hw.h:116
#define XCfa_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xcfa_hw.h:261

This function macro clears/acknowledges pending interrupts of the CFA core.

in the Status register. Bit positions of 1 will be cleared.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
IntrTypeis the pending interrupts to clear/acknowledge. Use OR'ing of XCFA_IXR_*_MASK constants defined in xcfa_hw.h to create this parameter value.
Returns
None.
Note
C-style signature: void XCfa_IntrClear(XCfa *InstancePtr, u32 IntrType)

Referenced by XCfa_IntrHandler().

◆ XCfa_IntrDisable

#define XCfa_IntrDisable (   InstancePtr,
  IntrType 
)

#include <xcfa.h>

Value:
XCfa_WriteReg((InstancePtr)->Config.BaseAddress, \
((XCfa_ReadReg((InstancePtr)->Config.BaseAddress, \
(XCFA_IRQ_EN_OFFSET))) & ((~(IntrType)) & \
#define XCfa_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xcfa_hw.h:242
#define XCFA_IXR_ALLINTR_MASK
Interrupt All Error Mask (ORing of all Interrupt Mask)
Definition: xcfa_hw.h:116
#define XCFA_IRQ_EN_OFFSET
IRQ Enable.
Definition: xcfa_hw.h:76
#define XCfa_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xcfa_hw.h:261

This function macro disables the given individual interrupt(s) on the CFA core by updating Irq_Enable register.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
IntrTypeis 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.
Returns
None.
Note
Any other interrupt not covered by parameter IntrType, if enabled before this macro is called, will remain enabled. C-style signature: void XCfa_IntrDisable(XCfa *InstancePtr, u32 IntrType)

◆ XCfa_IntrEnable

#define XCfa_IntrEnable (   InstancePtr,
  IntrType 
)

#include <xcfa.h>

Value:
XCfa_WriteReg((InstancePtr)->Config.BaseAddress, \
(((IntrType) & (XCFA_IXR_ALLINTR_MASK)) | \
(XCfa_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XCfa_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xcfa_hw.h:242
#define XCFA_IXR_ALLINTR_MASK
Interrupt All Error Mask (ORing of all Interrupt Mask)
Definition: xcfa_hw.h:116
#define XCFA_IRQ_EN_OFFSET
IRQ Enable.
Definition: xcfa_hw.h:76
#define XCfa_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xcfa_hw.h:261

This function macro enables the given individual interrupt(s) on the CFA core.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
IntrTypeis 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.
Returns
None.
Note
The existing enabled interrupt(s) will remain enabled. C-style signature: void XCfa_IntrEnable(XCfa *InstancePtr, u32 IntrType)

◆ XCfa_IntrGetPending

#define XCfa_IntrGetPending (   InstancePtr)

#include <xcfa.h>

Value:
XCfa_ReadReg((InstancePtr)->Config.BaseAddress, \
((XCfa_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XCfa_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xcfa_hw.h:242
#define XCFA_STATUS_OFFSET
Status.
Definition: xcfa_hw.h:74
#define XCFA_IXR_ALLINTR_MASK
Interrupt All Error Mask (ORing of all Interrupt Mask)
Definition: xcfa_hw.h:116
#define XCFA_IRQ_EN_OFFSET
IRQ Enable.
Definition: xcfa_hw.h:76

This function macro returns the pending interrupts of the CFA core.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
Returns
The pending interrupts of the CFA. Use XCFA_IXR_*_MASK constants defined in xcfa_hw.h to interpret this value. The returned value is a logical AND of the contents of the STATUS Register and the IRQ_ENABLE Register.
Note
C-style signature: u32 XCfa_IntrGetPending(XCfa *InstancePtr)

Referenced by XCfa_IntrHandler().

◆ XCFA_IRQ_EN_OFFSET

#define XCFA_IRQ_EN_OFFSET   0x00C

#include <xcfa_hw.h>

IRQ Enable.

◆ XCFA_ISR_OFFSET

#define XCFA_ISR_OFFSET   XCFA_STATUS_OFFSET

#include <xcfa_hw.h>

Interrupt status register generates a interrupt if the corresponding bits of interrupt enable register bits are set.

Interrupt Status Offset

◆ XCFA_IXR_ALLINTR_MASK

#define XCFA_IXR_ALLINTR_MASK   0x00010003

#include <xcfa_hw.h>

Interrupt All Error Mask (ORing of all Interrupt Mask)

◆ XCFA_IXR_EOF_MASK

#define XCFA_IXR_EOF_MASK   0x00000002

#include <xcfa_hw.h>

End-Of-Frame Mask.

Referenced by XCfa_IntrHandler().

◆ XCFA_IXR_PROCS_STARTED_MASK

#define XCFA_IXR_PROCS_STARTED_MASK   0x00000001

#include <xcfa_hw.h>

Process Started Mask.

Referenced by XCfa_IntrHandler().

◆ XCFA_IXR_SE_MASK

#define XCFA_IXR_SE_MASK   0x00010000

#include <xcfa_hw.h>

Slave Error Mask.

Referenced by XCfa_IntrHandler().

◆ XCfa_Out32

#define XCfa_Out32   Xil_Out32

#include <xcfa_hw.h>

Cfa Output Operation.

◆ XCfa_ReadReg

#define XCfa_ReadReg (   BaseAddress,
  RegOffset 
)    XCfa_In32((BaseAddress) + (u32)(RegOffset))

#include <xcfa_hw.h>

This function macro reads the given register.

Parameters
BaseAddressis the base address of the CFA core.
RegOffsetis the register offset of the core (defined at top of this file).
Returns
The 32-bit value of the register.
Note
C-style signature: u32 XCfa_ReadReg(u32 BaseAddress, u32 RegOffset)

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().

◆ XCfa_RegUpdateDisable

#define XCfa_RegUpdateDisable (   InstancePtr)

#include <xcfa.h>

Value:
XCfa_WriteReg((InstancePtr)->Config.BaseAddress, \
((XCfa_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XCFA_CTL_RUE_MASK
Register Update Mask.
Definition: xcfa_hw.h:93
#define XCFA_CONTROL_OFFSET
Control.
Definition: xcfa_hw.h:73
#define XCfa_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xcfa_hw.h:242
#define XCfa_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xcfa_hw.h:261

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.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
Returns
None.
Note
C-style signature: void XCfa_RegUpdateDisable(XCfa *InstancePtr)

Referenced by XCfa_Setup().

◆ XCfa_RegUpdateEnable

#define XCfa_RegUpdateEnable (   InstancePtr)

#include <xcfa.h>

Value:
XCfa_WriteReg((InstancePtr)->Config.BaseAddress, \
((XCfa_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XCFA_CTL_RUE_MASK
Register Update Mask.
Definition: xcfa_hw.h:93
#define XCFA_CONTROL_OFFSET
Control.
Definition: xcfa_hw.h:73
#define XCfa_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xcfa_hw.h:242
#define XCfa_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xcfa_hw.h:261

This function macro commits all the register value changes made so far by the software to the CFA core.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
Returns
None.
Note
C-style signature: void XCfa_RegUpdateEnable(XCfa *InstancePtr)

Referenced by XCfa_Setup().

◆ XCfa_Reset

#define XCfa_Reset (   InstancePtr)

#include <xcfa.h>

Value:
XCfa_WriteReg((InstancePtr)->Config.BaseAddress, \
#define XCFA_CONTROL_OFFSET
Control.
Definition: xcfa_hw.h:73
#define XCfa_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xcfa_hw.h:261
#define XCFA_CTL_RESET_MASK
Software Reset - Instantaneous Mask.
Definition: xcfa_hw.h:102

This macro resets CFA core instance.

This reset effects the core immediately and may cause image tearing.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
Returns
None.
Note
C-style signature: void XCfa_Reset(XCfa *InstancePtr)

◆ XCfa_Start

#define XCfa_Start   XCfa_Enable

#include <xcfa.h>

This function macro enables/starts the CFA core.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
Returns
None.
Note
C-style signature: void XCfa_Start(XCfa *InstancePtr)

◆ XCFA_STATUS_OFFSET

#define XCFA_STATUS_OFFSET   0x004

#include <xcfa_hw.h>

Status.

Referenced by XCfaSelfTestExample().

◆ XCfa_StatusGetPending

#define XCfa_StatusGetPending (   InstancePtr)

#include <xcfa.h>

Value:
XCfa_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XCfa_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xcfa_hw.h:242
#define XCFA_STATUS_OFFSET
Status.
Definition: xcfa_hw.h:74
#define XCFA_IXR_ALLINTR_MASK
Interrupt All Error Mask (ORing of all Interrupt Mask)
Definition: xcfa_hw.h:116

This function macro returns the pending status of a CFA core.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
Returns
The pending interrupts of the CFA core. Use XCFA_IXR_*_MASK constants defined in xcfa_hw.h to interpret this value.
Note
C-style signature: u32 XCfa_StatusGePending(XCfa *InstancePtr)

◆ XCfa_Stop

#define XCfa_Stop   XCfa_Disable

#include <xcfa.h>

This function macro disables/stops the CFA core.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
Returns
None.
Note
C-style signature: void XCfa_Stop(XCfa *InstancePtr)

◆ XCfa_SyncReset

#define XCfa_SyncReset (   InstancePtr)

#include <xcfa.h>

Value:
XCfa_WriteReg((InstancePtr)->Config.BaseAddress, \
#define XCFA_CONTROL_OFFSET
Control.
Definition: xcfa_hw.h:73
#define XCFA_CTL_AUTORESET_MASK
Software Reset - Auto-synchronize to SOF Mask.
Definition: xcfa_hw.h:97
#define XCfa_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xcfa_hw.h:261

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.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
Returns
None.
Note
C-style signature: void XCfa_SyncReset(XCfa *InstancePtr)

◆ XCFA_SYSDEBUG0_OFFSET

#define XCFA_SYSDEBUG0_OFFSET   0x014

#include <xcfa_hw.h>

System Debug 0.

Referenced by XCfa_GetDbgFrameCount().

◆ XCFA_SYSDEBUG1_OFFSET

#define XCFA_SYSDEBUG1_OFFSET   0x018

#include <xcfa_hw.h>

System Debug 1.

Referenced by XCfa_GetDbgLineCount().

◆ XCFA_SYSDEBUG2_OFFSET

#define XCFA_SYSDEBUG2_OFFSET   0x01C

#include <xcfa_hw.h>

System Debug 2.

Referenced by XCfa_GetDbgPixelCount().

◆ XCFA_VER_INTERNAL_SHIFT

#define XCFA_VER_INTERNAL_SHIFT   8

#include <xcfa_hw.h>

Version Internal Shift.

◆ XCFA_VER_MAJOR_MASK

#define XCFA_VER_MAJOR_MASK   0xFF000000

#include <xcfa_hw.h>

Version Major Mask.

◆ XCFA_VER_MAJOR_SHIFT

#define XCFA_VER_MAJOR_SHIFT   24

#include <xcfa_hw.h>

Version Major Shift.

◆ XCFA_VER_MINOR_MASK

#define XCFA_VER_MINOR_MASK   0x00FF0000

#include <xcfa_hw.h>

Version Minor Mask.

◆ XCFA_VER_MINOR_SHIFT

#define XCFA_VER_MINOR_SHIFT   16

#include <xcfa_hw.h>

Version Minor Shift.

◆ XCFA_VER_PID_MASK

#define XCFA_VER_PID_MASK   0x00000F00

#include <xcfa_hw.h>

Patch ID Mask.

◆ XCFA_VER_REV_MASK

#define XCFA_VER_REV_MASK   0x0000F000

#include <xcfa_hw.h>

Version revision Mask.

◆ XCFA_VER_REV_NUM_MASK

#define XCFA_VER_REV_NUM_MASK   0x000000FF

#include <xcfa_hw.h>

Revision Number Mask.

◆ XCFA_VER_REV_SHIFT

#define XCFA_VER_REV_SHIFT   12

#include <xcfa_hw.h>

Version Revision Shift.

◆ XCFA_VERSION_OFFSET

#define XCFA_VERSION_OFFSET   0x010

#include <xcfa_hw.h>

Version.

Referenced by XCfa_GetVersion(), and XCfa_SelfTest().

◆ XCFA_VSIZE_FIRST

#define XCFA_VSIZE_FIRST   32

#include <xcfa.h>

Vertical Size starting value.

Referenced by XCfa_SetActiveSize().

◆ XCFA_VSIZE_LAST

#define XCFA_VSIZE_LAST   7680

#include <xcfa.h>

Vertical Size ending value.

Referenced by XCfa_SetActiveSize().

◆ XCfa_WriteReg

#define XCfa_WriteReg (   BaseAddress,
  RegOffset,
  Data 
)    XCfa_Out32((BaseAddress) + (u32)(RegOffset), (Data))

#include <xcfa_hw.h>

This function macro writes the given register.

Parameters
BaseAddressis the base address of the CFA core.
RegOffsetis the register offset of the core (defined at top of this file).
Datais the 32-bit value to write into the register.
Returns
None.
Note
C-style signature: void XCfa_WriteReg(u32 BaseAddress, u32 RegOffset, u32 Data)

Referenced by XCfa_DisableDbgBypass(), XCfa_DisableDbgTestPattern(), XCfa_EnableDbgByPass(), XCfa_EnableDbgTestPattern(), XCfa_SetActiveSize(), XCfa_SetBayerPhase(), and XCfa_Setup().

Typedef Documentation

◆ XCfa_CallBack

typedef void(* XCfa_CallBack) (void *CallBackRef)

#include <xcfa.h>

Callback type for all interrupts except error interrupt.

Parameters
CallBackRefis 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.

◆ XCfa_ErrorCallBack

typedef void(* XCfa_ErrorCallBack) (void *CallBackRef, u32 ErrorMask)

#include <xcfa.h>

Callback type for error interrupt.

Parameters
CallBackRefis 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.
ErrorMaskis 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.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

#include <xcfa.h>

These constants specify different types of handlers and used to differentiate interrupt requests from core.

Enumerator
XCFA_HANDLER_PROCSTART 

A processing start event interrupt type.

XCFA_HANDLER_FRAMEDONE 

A frame done event interrupt type.

XCFA_HANDLER_ERROR 

An error condition interrupt type.

◆ XCfa_BayerPhaseCombination

#include <xcfa.h>

These constants specify Bayer phase combinations of the core.

Enumerator
XCFA_RGRG_COMBINATION 

Red green combination.

XCFA_GRGR_COMBINATION 

Green red combination.

XCFA_GBGB_COMBINATION 

Green blue combination.

XCFA_BGBG_COMBINATION 

Blue green combination.

Function Documentation

◆ XCfa_CfgInitialize()

int XCfa_CfgInitialize ( XCfa InstancePtr,
XCfa_Config CfgPtr,
u32  EffectiveAddr 
)

#include <xcfa.c>

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.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
CfgPtris a reference to a configuration structure containing information about the CFA core.
EffectiveAddris 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.
Returns
  • XST_SUCCESS if initialization was successful.
Note
None.

References XCfa_Config::BaseAddress, XCfa::Config, and XCfa::ProcStartCallBack.

Referenced by XCfaSelfTestExample().

◆ XCfa_DisableDbgBypass()

void XCfa_DisableDbgBypass ( XCfa InstancePtr)

#include <xcfa.c>

This function disables bypass mode of the CFA core.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
Returns
None.
Note
Debug functionality should be enabled.

References XCfa_Config::BaseAddress, XCfa::Config, XCfa_Config::HasDebug, XCFA_CONTROL_OFFSET, XCFA_CTL_BPE_MASK, XCfa_ReadReg, and XCfa_WriteReg.

◆ XCfa_DisableDbgTestPattern()

void XCfa_DisableDbgTestPattern ( XCfa InstancePtr)

#include <xcfa.c>

This function disables the test pattern mode of the CFA core.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
Returns
None.
Note
Debug functionality should be enabled.

References XCfa_Config::BaseAddress, XCfa::Config, XCfa_Config::HasDebug, XCFA_CONTROL_OFFSET, XCFA_CTL_TPE_MASK, XCfa_ReadReg, and XCfa_WriteReg.

◆ XCfa_EnableDbgByPass()

void XCfa_EnableDbgByPass ( XCfa InstancePtr)

#include <xcfa.c>

This sets the bypass bit of the control register to switch the core to bypass mode if debug is enabled in the CFA core.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
Returns
None.
Note
Debug functionality should be enabled.

References XCfa_Config::BaseAddress, XCfa::Config, XCfa_Config::HasDebug, XCFA_CONTROL_OFFSET, XCFA_CTL_BPE_MASK, XCfa_ReadReg, and XCfa_WriteReg.

◆ XCfa_EnableDbgTestPattern()

void XCfa_EnableDbgTestPattern ( XCfa InstancePtr)

#include <xcfa.c>

This function sets the test-pattern mode of the CFA core if debug features is enabled.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
Returns
None.
Note
Debug functionality should be enabled.

References XCfa_Config::BaseAddress, XCfa::Config, XCfa_Config::HasDebug, XCFA_CONTROL_OFFSET, XCFA_CTL_TPE_MASK, XCfa_ReadReg, and XCfa_WriteReg.

◆ XCfa_GetActiveSize()

void XCfa_GetActiveSize ( XCfa InstancePtr,
u16 *  HSize,
u16 *  VSize 
)

#include <xcfa.c>

This function gets the number of Active Pixel per Scan line and number of Active Lines per Frame from the Active Frame Size register.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
HSizeis a pointer to 16-bit variable in which the number of Active Pixels per Scan Line is returned. (Range is 32 to 7680).
VSizeis a pointer to 16-bit variable in which the number of Active Lines per Frame is returned. (Range is 32 to 7680).
Returns
None.
Note
None.

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.

◆ XCfa_GetBayerPhase()

u32 XCfa_GetBayerPhase ( XCfa InstancePtr)

#include <xcfa.c>

This function gets the Bayer phase value combination from Bayer phase register.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
Returns
BayerPhase the Bayer Phase value 0 to 3. The Phase value combinations are
  • Bayer Phase 0 is XCFA_RGRG_COMBINATION.
  • Bayer Phase 1 is XCFA_GRGR_COMBINATION.
  • Bayer Phase 2 is XCFA_GBGB_COMBINATION.
  • Bayer Phase 3 is XCFA_BGBG_COMBINATION.
Note
- It is a double buffered register.

References XCfa_Config::BaseAddress, XCfa::Config, XCFA_8_BIT_MASK, XCFA_BAYER_PHASE_OFFSET, and XCfa_ReadReg.

◆ XCfa_GetDbgFrameCount()

u32 XCfa_GetDbgFrameCount ( XCfa InstancePtr)

#include <xcfa.c>

This function gets number of frames processed since power-up or last time the core is reset.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
Returns
FrameCount is the number of frames processed since power up.
Note
Debug functionality should be enabled.

References XCfa_Config::BaseAddress, XCfa::Config, XCfa_Config::HasDebug, XCfa_ReadReg, and XCFA_SYSDEBUG0_OFFSET.

◆ XCfa_GetDbgLineCount()

u32 XCfa_GetDbgLineCount ( XCfa InstancePtr)

#include <xcfa.c>

This function gets the number of lines processed since power-up or last time the core is reset.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
Returns
LineCount is the number of lines processed since power up.
Note
Debug functionality should be enabled.

References XCfa_Config::BaseAddress, XCfa::Config, XCfa_Config::HasDebug, XCfa_ReadReg, and XCFA_SYSDEBUG1_OFFSET.

◆ XCfa_GetDbgPixelCount()

u32 XCfa_GetDbgPixelCount ( XCfa InstancePtr)

#include <xcfa.c>

This function gets the number of pixels processed since power-up or last time the core is reset.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
Returns
PixelCount is the number of pixels processed since power up.
Note
Debug functionality should be enabled.

References XCfa_Config::BaseAddress, XCfa::Config, XCfa_Config::HasDebug, XCfa_ReadReg, and XCFA_SYSDEBUG2_OFFSET.

◆ XCfa_GetVersion()

u32 XCfa_GetVersion ( XCfa InstancePtr)

#include <xcfa.c>

This function gets the Version of the CFA core.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
Returns
Returns the contents of the Version register.
Note
None.

References XCfa_Config::BaseAddress, XCfa::Config, XCfa_ReadReg, and XCFA_VERSION_OFFSET.

◆ XCfa_IntrHandler()

void XCfa_IntrHandler ( void *  InstancePtr)

#include <xcfa.h>

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.

Parameters
InstancePtris a pointer to the XCfa instance that just interrupted.
Returns
None.
Note
Interrupt interface should be enabled.

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.

◆ XCfa_IsDbgByPassEnabled()

int XCfa_IsDbgByPassEnabled ( XCfa InstancePtr)

#include <xcfa.c>

This function gets the current status of the bypass setting of the CFA core.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
Returns
Core debug bypass mode.
  • TRUE = Bypass mode is enabled.
  • FALSE = Bypass mode is not enabled.
Note
Debug functionality should be enabled.

References XCfa_Config::BaseAddress, XCfa::Config, XCfa_Config::HasDebug, XCFA_CONTROL_OFFSET, XCFA_CTL_BPE_MASK, and XCfa_ReadReg.

◆ XCfa_IsDbgTestPatternEnabled()

int XCfa_IsDbgTestPatternEnabled ( XCfa InstancePtr)

#include <xcfa.c>

This function gets the test-pattern mode if debug feature is enabled.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
Returns
Test-pattern generator mode.
  • TRUE = Test-pattern mode is enabled.
  • FALSE = Test-pattern mode is not enabled.
Note
Debug functionality should be enabled.

References XCfa_Config::BaseAddress, XCfa::Config, XCfa_Config::HasDebug, XCFA_CONTROL_OFFSET, XCFA_CTL_TPE_MASK, and XCfa_ReadReg.

◆ XCfa_LookupConfig()

XCfa_Config * XCfa_LookupConfig ( u16  DeviceId)

#include <xcfa.h>

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.

Parameters
DeviceIdis the unique device ID of the core for the lookup operation.
Returns
CfgPtr is a reference to a config record in the configuration table (in xcfa_g.c) corresponding to DeviceId, or NULL if no match is found.
Note
None.

Referenced by XCfaSelfTestExample().

◆ XCfa_SelfTest()

int XCfa_SelfTest ( XCfa InstancePtr)

#include <xcfa.h>

This function reads complete Version register of CFA core and compares with zero values as part of self test.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
Returns
  • XST_SUCCESS if the Version register read test was successful.
  • XST_FAILURE if the Version register read test failed.
Note
None.

References XCfa_Config::BaseAddress, XCfa::Config, XCfa_ReadReg, and XCFA_VERSION_OFFSET.

Referenced by XCfaSelfTestExample().

◆ XCfa_SetActiveSize()

void XCfa_SetActiveSize ( XCfa InstancePtr,
u16  HSize,
u16  VSize 
)

#include <xcfa.c>

This function sets the active H/V sizes in the Active Size register.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
HSizeis number of Active Pixels per scan line to be set. Range of HSize is 32 to 7680.
VSizeis number of Active Lines per frame to be set. Range of VSize is 32 to 7680.
Returns
None.
Note
None.

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.

◆ XCfa_SetBayerPhase()

void XCfa_SetBayerPhase ( XCfa InstancePtr,
enum XCfa_BayerPhaseCombination  BayerPhase 
)

#include <xcfa.c>

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.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
BayerPhaseto be set to identify starting position. Range of Phase is 0 to 3. The Phase value combinations are
  • Bayer Phase 0 is XCFA_RGRG_COMBINATION.
  • Bayer Phase 1 is XCFA_GRGR_COMBINATION.
  • Bayer Phase 2 is XCFA_GBGB_COMBINATION.
  • Bayer Phase 3 is XCFA_BGBG_COMBINATION.
  • It is a double buffered register.
Returns
None.
Note
None.

References XCfa_Config::BaseAddress, XCfa::Config, XCFA_BAYER_PHASE_MASK, XCFA_BAYER_PHASE_OFFSET, XCFA_BGBG_COMBINATION, and XCfa_WriteReg.

◆ XCfa_SetCallBack()

int XCfa_SetCallBack ( XCfa InstancePtr,
u32  HandlerType,
void *  CallBackFunc,
void *  CallBackRef 
)

#include <xcfa.h>

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
 
Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
HandlerTypespecifies which callback is to be attached.
CallBackFuncis the address of the callback function.
CallBackRefis a user data item that will be passed to the callback function when it is invoked.
Returns
  • XST_SUCCESS when handler is installed.
  • XST_INVALID_PARAM when HandlerType is invalid.
Note
Invoking this function for a handler that already has been installed replaces it with the new handler.

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.

◆ XCfa_Setup()

void XCfa_Setup ( XCfa InstancePtr)

#include <xcfa.c>

This function sets the input/output frame size in Active Size register and enables the register update.

Parameters
InstancePtris a pointer to the XCfa instance to be worked on.
Returns
None.
Note
None.

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.