cfa: Cfa_v7_1

| cfa Xilinx SDK Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List
- Examples

Data Structures | Macros | Typedefs | Functions
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_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
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

#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

Control.

Referenced by XCfa_DisableDbgBypass(), XCfa_DisableDbgTestPattern(), XCfa_EnableDbgByPass(), XCfa_EnableDbgTestPattern(), XCfa_IsDbgByPassEnabled(), XCfa_IsDbgTestPatternEnabled(), and XCfaSelfTestExample().

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

Value:
XCfa_WriteReg((InstancePtr)->Config.BaseAddress, \
(XCFA_CONTROL_OFFSET), \
((XCfa_ReadReg((InstancePtr)->Config.BaseAddress, \
(XCFA_CONTROL_OFFSET))) & (~(XCFA_CTL_SW_EN_MASK))))
XCFA_CONTROL_OFFSET
#define XCFA_CONTROL_OFFSET
Control.
Definition: xcfa_hw.h:67
XCfa_ReadReg
#define XCfa_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xcfa_hw.h:236
XCFA_CTL_SW_EN_MASK
#define XCFA_CTL_SW_EN_MASK
Enable Mask.
Definition: xcfa_hw.h:86
XCfa_WriteReg
#define XCfa_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xcfa_hw.h:255

This function macro disables the CFA core.

Parameters

  InstancePtr | is a pointer to the XCfa instance to be worked on.

Returns
  None.

Note
  C-style signature: void XCfa_Disable(XCfa *InstancePtr)

#define XCfa_Enable | ( |  | InstancePtr | ) |

Value:
XCfa_WriteReg((InstancePtr)->Config.BaseAddress, \
(XCFA_CONTROL_OFFSET), \
((XCfa_ReadReg((InstancePtr)->Config.BaseAddress, \
(XCFA_CONTROL_OFFSET))) | (XCFA_CTL_SW_EN_MASK)))
XCFA_CONTROL_OFFSET
#define XCFA_CONTROL_OFFSET
Control.
Definition: xcfa_hw.h:67
XCfa_ReadReg
#define XCfa_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xcfa_hw.h:236
XCFA_CTL_SW_EN_MASK
#define XCFA_CTL_SW_EN_MASK
Enable Mask.
Definition: xcfa_hw.h:86
XCfa_WriteReg
#define XCfa_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xcfa_hw.h:255

This function macro enables the CFA core.

Parameters

  InstancePtr | is a pointer to the XCfa instance to be worked on.

Returns
  None.

Note
  C-style signature: void XCfa_Enable(XCfa *InstancePtr)

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

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

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

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

Parameters

  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.

Returns
  None.

Note
  C-style signature: void XCfa_IntrClear(XCfa *InstancePtr, u32 IntrType)

Referenced by XCfa_IntrHandler().

#define XCfa_IntrDisable | ( |  | InstancePtr,
|  |  | IntrType
| ) |  |

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

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

Parameters

  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.

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)

#define XCfa_IntrEnable | ( |  | InstancePtr,
|  |  | IntrType
| ) |  |

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

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

Parameters

  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.

Returns
  None.

Note
  The existing enabled interrupt(s) will remain enabled. C-style signature: void XCfa_IntrEnable(XCfa *InstancePtr, u32 IntrType)

#define XCfa_IntrGetPending | ( |  | InstancePtr | ) |

Value:
XCfa_ReadReg((InstancePtr)->Config.BaseAddress, \
(XCFA_IRQ_EN_OFFSET)) & \
((XCfa_ReadReg((InstancePtr)->Config.BaseAddress, \
(XCFA_STATUS_OFFSET))) & ((u32)(XCFA_IXR_ALLINTR_MASK)))
XCfa_ReadReg
#define XCfa_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xcfa_hw.h:236
XCFA_STATUS_OFFSET
#define XCFA_STATUS_OFFSET
Status.
Definition: xcfa_hw.h:68
XCFA_IXR_ALLINTR_MASK
#define XCFA_IXR_ALLINTR_MASK
Interrupt All Error Mask (ORing of all Interrupt Mask)
Definition: xcfa_hw.h:110
XCFA_IRQ_EN_OFFSET
#define XCFA_IRQ_EN_OFFSET
IRQ Enable.
Definition: xcfa_hw.h:70

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

Parameters

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

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

Parameters

  BaseAddress | is the base address of the CFA core.
  RegOffset | is 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().

#define XCfa_RegUpdateDisable | ( |  | InstancePtr | ) |

Value:
XCfa_WriteReg((InstancePtr)->Config.BaseAddress, \
(XCFA_CONTROL_OFFSET), \
((XCfa_ReadReg((InstancePtr)->Config.BaseAddress, \
(XCFA_CONTROL_OFFSET)))) & (~(XCFA_CTL_RUE_MASK)))
XCFA_CTL_RUE_MASK
#define XCFA_CTL_RUE_MASK
Register Update Mask.
Definition: xcfa_hw.h:87
XCFA_CONTROL_OFFSET
#define XCFA_CONTROL_OFFSET
Control.
Definition: xcfa_hw.h:67
XCfa_ReadReg
#define XCfa_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xcfa_hw.h:236
XCfa_WriteReg
#define XCfa_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xcfa_hw.h:255

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

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

#define XCfa_RegUpdateEnable | ( |  | InstancePtr | ) |

Value:
XCfa_WriteReg((InstancePtr)->Config.BaseAddress, \
(XCFA_CONTROL_OFFSET), \
((XCfa_ReadReg((InstancePtr)->Config.BaseAddress, \
(XCFA_CONTROL_OFFSET))) | (XCFA_CTL_RUE_MASK)))
XCFA_CTL_RUE_MASK
#define XCFA_CTL_RUE_MASK
Register Update Mask.
Definition: xcfa_hw.h:87
XCFA_CONTROL_OFFSET
#define XCFA_CONTROL_OFFSET
Control.
Definition: xcfa_hw.h:67
XCfa_ReadReg
#define XCfa_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xcfa_hw.h:236
XCfa_WriteReg
#define XCfa_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xcfa_hw.h:255

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

Parameters

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

#define XCfa_Reset | ( |  | InstancePtr | ) |

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

This macro resets CFA core instance.

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

Parameters

  InstancePtr | is a pointer to the XCfa instance to be worked on.

Returns
  None.

Note
  C-style signature: void XCfa_Reset(XCfa *InstancePtr)

Referenced by XCfa_CfgInitialize().

#define XCfa_Start XCfa_Enable

This function macro enables/starts the CFA core.

Parameters

  InstancePtr | is a pointer to the XCfa instance to be worked on.

Returns
  None.

Note
  C-style signature: void XCfa_Start(XCfa *InstancePtr)

#define XCFA_STATUS_OFFSET 0x004

Status.

Referenced by XCfaSelfTestExample().

#define XCfa_StatusGetPending | ( |  | InstancePtr | ) |

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

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

Parameters

  InstancePtr | is 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)

#define XCfa_Stop XCfa_Disable

This function macro disables/stops the CFA core.

Parameters

  InstancePtr | is a pointer to the XCfa instance to be worked on.

Returns
  None.

Note
  C-style signature: void XCfa_Stop(XCfa *InstancePtr)

#define XCfa_SyncReset | ( |  | InstancePtr | ) |

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

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

  InstancePtr | is a pointer to the XCfa instance to be worked on.

Returns
  None.

Note
  C-style signature: void XCfa_SyncReset(XCfa *InstancePtr)

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

Parameters

  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.

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

typedef void(* XCfa_CallBack)(void *CallBackRef)

Callback type for all interrupts except error interrupt.

Parameters

  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.

Parameters

  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.

## Enumeration Type Documentation

anonymous enum

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.

enum XCfa_BayerPhaseCombination

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

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.

Parameters

  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.

Returns
  - XST_SUCCESS if initialization was successful.

Note
  None.

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.

Parameters

  InstancePtr | is 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.

void XCfa_DisableDbgTestPattern | ( | XCfa * | InstancePtr | ) |

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

Parameters

  InstancePtr | is 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.

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.

Parameters

  InstancePtr | is 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.

void XCfa_EnableDbgTestPattern | ( | XCfa * | InstancePtr | ) |

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

Parameters

  InstancePtr | is 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.

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.

Parameters

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

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.

u32 XCfa_GetBayerPhase | ( | XCfa * | InstancePtr | ) |

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

Parameters

  InstancePtr | is 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.

u32 XCfa_GetDbgFrameCount | ( | XCfa * | InstancePtr | ) |

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

Parameters

  InstancePtr | is 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.

u32 XCfa_GetDbgLineCount | ( | XCfa * | InstancePtr | ) |

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

Parameters

  InstancePtr | is 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.

u32 XCfa_GetDbgPixelCount | ( | XCfa * | InstancePtr | ) |

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

Parameters

  InstancePtr | is 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.

u32 XCfa_GetVersion | ( | XCfa * | InstancePtr | ) |

This function gets the Version of the CFA core.

Parameters

  InstancePtr | is 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.

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.

Parameters

  InstancePtr | is 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.

int XCfa_IsDbgByPassEnabled | ( | XCfa * | InstancePtr | ) |

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

Parameters

  InstancePtr | is 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.

int XCfa_IsDbgTestPatternEnabled | ( | XCfa * | InstancePtr | ) |

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

Parameters

  InstancePtr | is 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_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.

Parameters

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

int XCfa_SelfTest | ( | XCfa * | InstancePtr | ) |

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

Parameters

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

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

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

Parameters

  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.

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.

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.

Parameters

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

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

Parameters

  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.

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.

void XCfa_Setup | ( | XCfa * | InstancePtr | ) |

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

Parameters

  InstancePtr | is 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.