ccm
Xilinx SDK Drivers API Documentation
Ccm_v6_1

Data Structures

struct  XCcm_Config
 This typedef contains configuration information for a CCM core. More...
 
struct  XCcm
 The XCcm driver instance data structure. More...
 
struct  XCcm_Coefs
 This typedef contains matrix coefficients of Color Correction Matrix(CCM) core which can be accessed for setting coefficients by using XCcm_SetCoefMatrix and for getting coefficient values by using XCcm_GetCoefMatrix. More...
 

Macros

#define XCCM_H_
 Prevent circular inclusions by using protection macros. More...
 
#define XCcm_Enable(InstancePtr)
 This macro enables the CCM core. More...
 
#define XCcm_Disable(InstancePtr)
 This macro disables the CCM core. More...
 
#define XCcm_Start   XCcm_Enable
 This macro enables/starts the CCM core. More...
 
#define XCcm_Stop   XCcm_Disable
 This macro disables/stops the CCM core. More...
 
#define XCcm_RegUpdateEnable(InstancePtr)
 This macro commits all the register value changes made so far by the software to the CCM core instance. More...
 
#define XCcm_RegUpdateDisable(InstancePtr)
 This macro prevents the CCM core instance from committing recent changes made so far by the software. More...
 
#define XCcm_SyncReset(InstancePtr)
 This macro resets a CCM core at the end of the frame being processed. More...
 
#define XCcm_Reset(InstancePtr)
 This macro resets a CCM core. More...
 
#define XCcm_IntrEnable(InstancePtr, IntrType)
 This macro enables individual interrupts of the CCM core by updating the IRQ_ENABLE register. More...
 
#define XCcm_IntrDisable(InstancePtr, IntrType)
 This macro disables individual interrupts of the CCM core by updating the IRQ_ENABLE register. More...
 
#define XCcm_StatusGetPending(InstancePtr)
 This macro returns the pending interrupt status of the CCM core by reading from Status register. More...
 
#define XCcm_IntrGetPending(InstancePtr)
 This macro returns the pending interrupts of the CCM core for the interrupts that have been enabled. More...
 
#define XCcm_IntrClear(InstancePtr, IntrType)
 This macro clears/acknowledges pending interrupts of the CCM core in the Status register. More...
 
#define XCCM_HW_H_
 Prevent circular inclusions by using protection macros. More...
 
#define XCcm_In32   Xil_In32
 Input operation. More...
 
#define XCcm_Out32   Xil_Out32
 Output operation. More...
 
#define XCcm_ReadReg(BaseAddress, RegOffset)   XCcm_In32((BaseAddress) + (u32)(RegOffset))
 This macro reads the given register. More...
 
#define XCcm_WriteReg(BaseAddress, RegOffset, Data)   XCcm_Out32((BaseAddress) + (u32)(RegOffset), (u32)(Data))
 This macro writes the given register. More...
 

Typedefs

typedef void(* XCcm_CallBack) (void *CallBackRef)
 Callback type for all interrupts except error interrupt. More...
 
typedef void(* XCcm_ErrorCallBack) (void *CallBackRef, u32 ErrorMask)
 Callback type for Error interrupt. More...
 

Functions

int XCcm_CfgInitialize (XCcm *InstancePtr, XCcm_Config *CfgPtr, u32 EffectiveAddr)
 This function initializes an CCM core. More...
 
void XCcm_Setup (XCcm *InstancePtr)
 This function sets the input/output frame size in Active Size register and enables the register update. More...
 
void XCcm_EnableDbgByPass (XCcm *InstancePtr)
 This function enables the bypass mode by setting bypass bit of the Control register to switch the core to bypass mode if debug feature is enabled in the core. More...
 
int XCcm_IsDbgByPassEnabled (XCcm *InstancePtr)
 This function returns the current bypass mode settings from Control register of the CCM core. More...
 
void XCcm_DisableDbgByPass (XCcm *InstancePtr)
 This function disables the Bypass mode of the CCM core. More...
 
void XCcm_EnableDbgTestPattern (XCcm *InstancePtr)
 This function enables the test-pattern mode if debug feature is enabled by setting test-pattern bit of the Control register of the CCM core. More...
 
int XCcm_IsDbgTestPatternEnabled (XCcm *InstancePtr)
 This function returns the test-pattern mode (enabled or not) from Control register of the CCM core, if debug feature was enabled. More...
 
void XCcm_DisableDbgTestPattern (XCcm *InstancePtr)
 This function disables debug test pattern mode in Control register of the CCM core, if Debug feature is enabled. More...
 
u32 XCcm_GetVersion (XCcm *InstancePtr)
 This function gets the Version of the CCM core. More...
 
u32 XCcm_GetDbgFrameCount (XCcm *InstancePtr)
 This function gets number of frames processed since power-up or last time the core is reset. More...
 
u32 XCcm_GetDbgLineCount (XCcm *InstancePtr)
 This function gets the number of lines processed since power-up or last time the core is reset. More...
 
u32 XCcm_GetDbgPixelCount (XCcm *InstancePtr)
 This function gets the number of pixels processed since power-up or last time the core is reset. More...
 
void XCcm_SetActiveSize (XCcm *InstancePtr, u16 HSize, u16 VSize)
 This function sets the active H/V sizes in the Active Size register. More...
 
void XCcm_GetActiveSize (XCcm *InstancePtr, u16 *HSize, u16 *VSize)
 This function gets the number of Active Pixels per Scan line and number of Active Lines per Frame from the Active Frame Size register. More...
 
void XCcm_SetCoefMatrix (XCcm *InstancePtr, XCcm_Coefs *CoefValues)
 This function sets the coefficients of color correction matrix in K11 to K33 registers of the CCM core. More...
 
void XCcm_GetCoefMatrix (XCcm *InstancePtr, XCcm_Coefs *CoefValues)
 This function gets the coefficient values of color correction matrix from K11 to K33 registers of the CCM core. More...
 
void XCcm_SetRgbOffset (XCcm *InstancePtr, s32 ROffset, s32 GOffset, s32 BOffset)
 This function sets the offset compensation for red, blue and green colors in corresponding Roffset, Goffset and Boffset registers of the CCM core. More...
 
void XCcm_GetRgbOffset (XCcm *InstancePtr, s32 *ROffset, s32 *GOffset, s32 *BOffset)
 This function gets the offset compensation values of red, blue, green colors from Roffset, Goffset and Boffset registers. More...
 
void XCcm_SetClip (XCcm *InstancePtr, u32 Clip)
 This function sets the clip value in the Clip register of the CCM core. More...
 
u32 XCcm_GetClip (XCcm *InstancePtr)
 This function gets the clip value from Clip register of the CCM core. More...
 
void XCcm_SetClamp (XCcm *InstancePtr, u32 Clamp)
 This function sets the clamp value in the Clamp register. More...
 
u32 XCcm_GetClamp (XCcm *InstancePtr)
 This function returns the clamp value from the Clamp register. More...
 
XCcm_ConfigXCcm_LookupConfig (u16 DeviceId)
 XCcm_LookupConfig returns a reference to an XCcm_Config structure based on the unique device id, DeviceId. More...
 
int XCcm_SelfTest (XCcm *InstancePtr)
 This function reads Version register of CCM core and compares with zero as part of self test. More...
 
void XCcm_IntrHandler (void *InstancePtr)
 This function is the interrupt handler for the CCM core. More...
 
int XCcm_SetCallBack (XCcm *InstancePtr, u32 HandlerType, void *CallBackFunc, void *CallBackRef)
 This routine installs an asynchronous callback function for the given HandlerType. More...
 

Handler Types

enum  { XCCM_HANDLER_PROCSTART = 1, XCCM_HANDLER_FRAMEDONE, XCCM_HANDLER_ERROR }
 These constants specify different types of handler and used to differentiate interrupt requests from core. More...
 

Active Size Ranges

#define XCCM_ACT_SIZE_FIRST   32
 Active Size starting value. More...
 
#define XCCM_ACT_SIZE_LAST   7680
 Active Size ending value. More...
 

Coefficient ranges

#define XCCM_COEF_FIRST   -8.0
 Coefficient starting value. More...
 
#define XCCM_COEF_LAST   8.0
 Coefficient ending value. More...
 

Offset ranges

#define XCCM_OFFSET_FIRST   0xFFFFFF00
 Offset starting value. More...
 
#define XCCM_OFFSET_LAST   255
 Offset ending value. More...
 

Clamp ranges

#define XCCM_CLAMP_FIRST   0
 Clamp starting value. More...
 
#define XCCM_CLAMP_LAST   255
 Clamp ending value. More...
 

Clip ranges

#define XCCM_CLIP_FIRST   0
 Clip starting value. More...
 
#define XCCM_CLIP_LAST   255
 Clip ending value. More...
 

Registers offsets

#define XCCM_CONTROL_OFFSET   0x000
 Control offset. More...
 
#define XCCM_STATUS_OFFSET   0x004
 Status offset. More...
 
#define XCCM_ERROR_OFFSET   0x008
 Error offset. More...
 
#define XCCM_IRQ_EN_OFFSET   0x00C
 IRQ Enable offset. More...
 
#define XCCM_VERSION_OFFSET   0x010
 Version offset. More...
 
#define XCCM_SYSDEBUG0_OFFSET   0x014
 System Debug 0 offset. More...
 
#define XCCM_SYSDEBUG1_OFFSET   0x018
 System Debug 1 offset. More...
 
#define XCCM_SYSDEBUG2_OFFSET   0x01C
 System Debug 2 offset. More...
 
#define XCCM_ACTIVE_SIZE_OFFSET   0x020
 Active Size (V x H) offset. More...
 
#define XCCM_K11_OFFSET   0x100
 K11 Coefficient offset. More...
 
#define XCCM_K12_OFFSET   0x104
 K12 Coefficient offset. More...
 
#define XCCM_K13_OFFSET   0x108
 K13 Coefficient offset. More...
 
#define XCCM_K21_OFFSET   0x10C
 K21 Coefficient offset. More...
 
#define XCCM_K22_OFFSET   0x110
 K22 Coefficient offset. More...
 
#define XCCM_K23_OFFSET   0x114
 K23 Coefficient offset. More...
 
#define XCCM_K31_OFFSET   0x118
 K31 Coefficient offset. More...
 
#define XCCM_K32_OFFSET   0x11C
 K32 Coefficient offset. More...
 
#define XCCM_K33_OFFSET   0x120
 K33 Coefficient offset. More...
 
#define XCCM_ROFFSET_OFFSET   0x124
 Red Offset offset. More...
 
#define XCCM_GOFFSET_OFFSET   0x128
 Green Offset offset. More...
 
#define XCCM_BOFFSET_OFFSET   0x12C
 Blue Offset offset. More...
 
#define XCCM_CLIP_OFFSET   0x130
 Clip Offset offset. More...
 
#define XCCM_CLAMP_OFFSET   0x134
 Clamp Offset offset. More...
 

Control register bit masks

#define XCCM_CTL_SW_EN_MASK   0x00000001
 Enable mask. More...
 
#define XCCM_CTL_RUE_MASK   0x00000002
 Register Update Enable mask. More...
 
#define XCCM_CTL_BPE_MASK   0x00000010
 Bypass Enable mask. More...
 
#define XCCM_CTL_TPE_MASK   0x00000020
 Test Pattern Enable mask. More...
 
#define XCCM_CTL_AUTORESET_MASK   0x40000000
 Software Auto Reset mask. More...
 
#define XCCM_CTL_RESET_MASK   0x80000000
 Software Reset mask. More...
 

Interrupt register bit masks. It is applicable for

Status and IRQ_ENABLE Registers

#define XCCM_IXR_PROCS_STARTED_MASK   0x00000001
 Process Started mask. More...
 
#define XCCM_IXR_EOF_MASK   0x00000002
 End-Of-Frame mask. More...
 
#define XCCM_IXR_SE_MASK   0x00010000
 Slave Error mask. More...
 
#define XCCM_IXR_ALLINTR_MASK   0x00010003
 Interrupt all error mask (ORing of all interrupt mask) More...
 

Error register bit masks

#define XCCM_ERR_EOL_EARLY_MASK   0x00000001
 End of Line Early mask. More...
 
#define XCCM_ERR_EOL_LATE_MASK   0x00000002
 End of Line Late mask. More...
 
#define XCCM_ERR_SOF_EARLY_MASK   0x00000004
 Start of Frame Early mask. More...
 
#define XCCM_ERR_SOF_LATE_MASK   0x00000008
 Start of Frame Late mask. More...
 

Version register bit masks and shifts

#define XCCM_VER_REV_NUM_MASK   0x000000FF
 Version Revision Number mask. More...
 
#define XCCM_VER_PID_MASK   0x00000F00
 Version Patch ID mask. More...
 
#define XCCM_VER_REV_MASK   0x0000F000
 Version Revision mask. More...
 
#define XCCM_VER_MINOR_MASK   0x00FF0000
 Version Minor mask. More...
 
#define XCCM_VER_MAJOR_MASK   0xFF000000
 Version Major mask. More...
 
#define XCCM_VER_INTERNAL_SHIFT   0x00000008
 Version Internal shift. More...
 
#define XCCM_VER_REV_SHIFT   0x0000000C
 Version Revision shift. More...
 
#define XCCM_VER_MINOR_SHIFT   0x00000010
 Version Minor shift. More...
 
#define XCCM_VER_MAJOR_SHIFT   0x00000018
 Version Major shift. More...
 

Active Size register masks and shift

#define XCCM_ACTSIZE_NUM_PIXEL_MASK   0x00001FFF
 Number of Active pixels per scan line (horizontal) mask. More...
 
#define XCCM_ACTSIZE_NUM_LINE_MASK   0x1FFF0000
 Number of Active lines per frame (vertical) mask. More...
 
#define XCCM_ACTSIZE_NUM_LINE_SHIFT   16
 Shift for number of lines. More...
 

Matrix coefficient masks and shifts

#define XCCM_COEF_MASK   0x0003FFFF
 Matrix Coefficient mask. More...
 
#define XCCM_COEF_DECI_MASK   0x0001C000
 Mask of Decimal part. More...
 
#define XCCM_COEFF_FRAC_MASK   0x00003FFF
 Mask of Fractional part. More...
 
#define XCCM_COEF_SHIFT   14
 Coefficient shift. More...
 
#define XCCM_COEF_SIGN_MASK   0x20000
 Mask for sign bit. More...
 

Offsets masks and shifts

#define XCCM_OFFSET_MASK   0x0001FFFF
 Offset mask for Red, Green Blue Offset registers. More...
 
#define XCCM_OFFSET_SIGN_SHIFT   15
 Shift for signed bit. More...
 

Clip and Clamp masks

#define XCCM_CLIP_MASK   0x0000FFFF
 Clip register mask. More...
 
#define XCCM_CLAMP_MASK   0x0000FFFF
 Clamp register mask. More...
 

General purpose macros

#define XCCM_SIGN_MUL   -1
 Macro for sign multiplication. More...
 
#define XCCM_MAX_VALUE   0xFFFFFFFF
 32 bit maximum value More...
 
#define XCCM_SIGNBIT_MASK
 

Macros for backward compatibility

#define CCM_CONTROL   XCCM_CONTROL_OFFSET
 
#define CCM_STATUS   XCCM_STATUS_OFFSET
 
#define CCM_ERROR   XCCM_ERROR_OFFSET
 
#define CCM_IRQ_EN   XCCM_IRQ_EN_OFFSET
 
#define CCM_VERSION   XCCM_VERSION_OFFSET
 
#define CCM_SYSDEBUG0   XCCM_SYSDEBUG0_OFFSET
 
#define CCM_SYSDEBUG1   XCCM_SYSDEBUG1_OFFSET
 
#define CCM_SYSDEBUG2   XCCM_SYSDEBUG2_OFFSET
 
#define CCM_ACTIVE_SIZE   XCCM_ACTIVE_SIZE_OFFSET
 
#define CCM_K11   XCCM_K11_OFFSET
 
#define CCM_K12   XCCM_K12_OFFSET
 
#define CCM_K13   XCCM_K13_OFFSET
 
#define CCM_K21   XCCM_K21_OFFSET
 
#define CCM_K22   XCCM_K22_OFFSET
 
#define CCM_K23   XCCM_K23_OFFSET
 
#define CCM_K31   XCCM_K31_OFFSET
 
#define CCM_K32   XCCM_K32_OFFSET
 
#define CCM_K33   XCCM_K33_OFFSET
 
#define CCM_ROFFSET   XCCM_ROFFSET_OFFSET
 
#define CCM_GOFFSET   XCCM_GOFFSET_OFFSET
 
#define CCM_BOFFSET   XCCM_BOFFSET_OFFSET
 
#define CCM_CLIP   XCCM_CLIP_OFFSET
 
#define CCM_CLAMP   XCCM_CLAMP_OFFSET
 
#define CCM_CTL_EN_MASK   XCCM_CTL_SW_EN_MASK
 
#define CCM_CTL_RUE_MASK   XCCM_CTL_RUE_MASK
 
#define CCM_RST_RESET   XCCM_CTL_RESET_MASK
 
#define CCM_RST_AUTORESET   XCCM_CTL_AUTORESET_MASK
 
#define CCM_In32   XCcm_In32
 
#define CCM_Out32   XCcm_Out32
 
#define XCCM_ReadReg   XCcm_ReadReg
 
#define XCCM_WriteReg   XCcm_WriteReg
 

Interrupt Enable and Status Registers Offsets

#define XCCM_ISR_OFFSET   XCCM_STATUS_OFFSET
 Interrupt status register generates a interrupt if the corresponding bits of interrupt enable register bits are set. More...
 
#define XCCM_IER_OFFSET   XCCM_IRQ_EN_OFFSET
 Interrupt enable Offset. More...
 

Macro Definition Documentation

◆ XCCM_ACT_SIZE_FIRST

#define XCCM_ACT_SIZE_FIRST   32

#include <xccm.h>

Active Size starting value.

Referenced by XCcm_SetActiveSize().

◆ XCCM_ACT_SIZE_LAST

#define XCCM_ACT_SIZE_LAST   7680

#include <xccm.h>

Active Size ending value.

Referenced by XCcm_SetActiveSize().

◆ XCCM_ACTIVE_SIZE_OFFSET

#define XCCM_ACTIVE_SIZE_OFFSET   0x020

#include <xccm_hw.h>

Active Size (V x H) offset.

Referenced by XCcm_GetActiveSize(), XCcm_SetActiveSize(), and XCcm_Setup().

◆ XCCM_ACTSIZE_NUM_LINE_MASK

#define XCCM_ACTSIZE_NUM_LINE_MASK   0x1FFF0000

#include <xccm_hw.h>

Number of Active lines per frame (vertical) mask.

Referenced by XCcm_GetActiveSize(), and XCcm_Setup().

◆ XCCM_ACTSIZE_NUM_LINE_SHIFT

#define XCCM_ACTSIZE_NUM_LINE_SHIFT   16

#include <xccm_hw.h>

Shift for number of lines.

Referenced by XCcm_GetActiveSize(), XCcm_SetActiveSize(), and XCcm_Setup().

◆ XCCM_ACTSIZE_NUM_PIXEL_MASK

#define XCCM_ACTSIZE_NUM_PIXEL_MASK   0x00001FFF

#include <xccm_hw.h>

Number of Active pixels per scan line (horizontal) mask.

Referenced by XCcm_GetActiveSize(), and XCcm_Setup().

◆ XCCM_BOFFSET_OFFSET

#define XCCM_BOFFSET_OFFSET   0x12C

#include <xccm_hw.h>

Blue Offset offset.

Referenced by XCcm_GetRgbOffset(), and XCcm_SetRgbOffset().

◆ XCCM_CLAMP_FIRST

#define XCCM_CLAMP_FIRST   0

#include <xccm.h>

Clamp starting value.

◆ XCCM_CLAMP_LAST

#define XCCM_CLAMP_LAST   255

#include <xccm.h>

Clamp ending value.

Referenced by XCcm_SetClamp().

◆ XCCM_CLAMP_MASK

#define XCCM_CLAMP_MASK   0x0000FFFF

#include <xccm_hw.h>

Clamp register mask.

Referenced by XCcm_GetClamp(), and XCcm_SetClamp().

◆ XCCM_CLAMP_OFFSET

#define XCCM_CLAMP_OFFSET   0x134

#include <xccm_hw.h>

Clamp Offset offset.

Referenced by XCcm_GetClamp(), and XCcm_SetClamp().

◆ XCCM_CLIP_FIRST

#define XCCM_CLIP_FIRST   0

#include <xccm.h>

Clip starting value.

◆ XCCM_CLIP_LAST

#define XCCM_CLIP_LAST   255

#include <xccm.h>

Clip ending value.

Referenced by XCcm_SetClip().

◆ XCCM_CLIP_MASK

#define XCCM_CLIP_MASK   0x0000FFFF

#include <xccm_hw.h>

Clip register mask.

Referenced by XCcm_GetClip(), and XCcm_SetClip().

◆ XCCM_CLIP_OFFSET

#define XCCM_CLIP_OFFSET   0x130

#include <xccm_hw.h>

Clip Offset offset.

Referenced by XCcm_GetClip(), and XCcm_SetClip().

◆ XCCM_COEF_DECI_MASK

#define XCCM_COEF_DECI_MASK   0x0001C000

#include <xccm_hw.h>

Mask of Decimal part.

◆ XCCM_COEF_FIRST

#define XCCM_COEF_FIRST   -8.0

#include <xccm.h>

Coefficient starting value.

Referenced by XCcm_SetCoefMatrix().

◆ XCCM_COEF_LAST

#define XCCM_COEF_LAST   8.0

#include <xccm.h>

Coefficient ending value.

Referenced by XCcm_SetCoefMatrix().

◆ XCCM_COEF_MASK

#define XCCM_COEF_MASK   0x0003FFFF

#include <xccm_hw.h>

Matrix Coefficient mask.

◆ XCCM_COEF_SHIFT

#define XCCM_COEF_SHIFT   14

#include <xccm_hw.h>

Coefficient shift.

◆ XCCM_COEF_SIGN_MASK

#define XCCM_COEF_SIGN_MASK   0x20000

#include <xccm_hw.h>

Mask for sign bit.

◆ XCCM_COEFF_FRAC_MASK

#define XCCM_COEFF_FRAC_MASK   0x00003FFF

#include <xccm_hw.h>

Mask of Fractional part.

◆ XCCM_CONTROL_OFFSET

◆ XCCM_CTL_AUTORESET_MASK

#define XCCM_CTL_AUTORESET_MASK   0x40000000

#include <xccm_hw.h>

Software Auto Reset mask.

◆ XCCM_CTL_BPE_MASK

#define XCCM_CTL_BPE_MASK   0x00000010

#include <xccm_hw.h>

Bypass Enable mask.

Referenced by XCcm_DisableDbgByPass(), XCcm_EnableDbgByPass(), and XCcm_IsDbgByPassEnabled().

◆ XCCM_CTL_RESET_MASK

#define XCCM_CTL_RESET_MASK   0x80000000

#include <xccm_hw.h>

Software Reset mask.

◆ XCCM_CTL_RUE_MASK

#define XCCM_CTL_RUE_MASK   0x00000002

#include <xccm_hw.h>

Register Update Enable mask.

◆ XCCM_CTL_SW_EN_MASK

#define XCCM_CTL_SW_EN_MASK   0x00000001

#include <xccm_hw.h>

Enable mask.

◆ XCCM_CTL_TPE_MASK

#define XCCM_CTL_TPE_MASK   0x00000020

#include <xccm_hw.h>

Test Pattern Enable mask.

Referenced by XCcm_DisableDbgTestPattern(), XCcm_EnableDbgTestPattern(), and XCcm_IsDbgTestPatternEnabled().

◆ XCcm_Disable

#define XCcm_Disable (   InstancePtr)

#include <xccm.h>

Value:
XCcm_WriteReg((InstancePtr)->Config.BaseAddress, \
((XCcm_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XCCM_CONTROL_OFFSET
Control offset.
Definition: xccm_hw.h:74
#define XCcm_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xccm_hw.h:281
#define XCCM_CTL_SW_EN_MASK
Enable mask.
Definition: xccm_hw.h:103
#define XCcm_WriteReg(BaseAddress, RegOffset, Data)
This macro writes the given register.
Definition: xccm_hw.h:299

This macro disables the CCM core.

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

◆ XCcm_Enable

#define XCcm_Enable (   InstancePtr)

#include <xccm.h>

Value:
XCcm_WriteReg((InstancePtr)->Config.BaseAddress, \
((XCcm_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XCCM_CONTROL_OFFSET
Control offset.
Definition: xccm_hw.h:74
#define XCcm_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xccm_hw.h:281
#define XCCM_CTL_SW_EN_MASK
Enable mask.
Definition: xccm_hw.h:103
#define XCcm_WriteReg(BaseAddress, RegOffset, Data)
This macro writes the given register.
Definition: xccm_hw.h:299

This macro enables the CCM core.

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

◆ XCCM_ERR_EOL_EARLY_MASK

#define XCCM_ERR_EOL_EARLY_MASK   0x00000001

#include <xccm_hw.h>

End of Line Early mask.

◆ XCCM_ERR_EOL_LATE_MASK

#define XCCM_ERR_EOL_LATE_MASK   0x00000002

#include <xccm_hw.h>

End of Line Late mask.

◆ XCCM_ERR_SOF_EARLY_MASK

#define XCCM_ERR_SOF_EARLY_MASK   0x00000004

#include <xccm_hw.h>

Start of Frame Early mask.

◆ XCCM_ERR_SOF_LATE_MASK

#define XCCM_ERR_SOF_LATE_MASK   0x00000008

#include <xccm_hw.h>

Start of Frame Late mask.

◆ XCCM_ERROR_OFFSET

#define XCCM_ERROR_OFFSET   0x008

#include <xccm_hw.h>

Error offset.

◆ XCCM_GOFFSET_OFFSET

#define XCCM_GOFFSET_OFFSET   0x128

#include <xccm_hw.h>

Green Offset offset.

Referenced by XCcm_GetRgbOffset(), and XCcm_SetRgbOffset().

◆ XCCM_H_

#define XCCM_H_

#include <xccm.h>

Prevent circular inclusions by using protection macros.

◆ XCCM_HW_H_

#define XCCM_HW_H_

#include <xccm_hw.h>

Prevent circular inclusions by using protection macros.

◆ XCCM_IER_OFFSET

#define XCCM_IER_OFFSET   XCCM_IRQ_EN_OFFSET

#include <xccm_hw.h>

Interrupt enable Offset.

◆ XCcm_In32

#define XCcm_In32   Xil_In32

#include <xccm_hw.h>

Input operation.

◆ XCcm_IntrClear

#define XCcm_IntrClear (   InstancePtr,
  IntrType 
)

#include <xccm.h>

Value:
XCcm_WriteReg((InstancePtr)->Config.BaseAddress, \
#define XCcm_WriteReg(BaseAddress, RegOffset, Data)
This macro writes the given register.
Definition: xccm_hw.h:299
#define XCCM_STATUS_OFFSET
Status offset.
Definition: xccm_hw.h:75
#define XCCM_IXR_ALLINTR_MASK
Interrupt all error mask (ORing of all interrupt mask)
Definition: xccm_hw.h:124

This macro clears/acknowledges pending interrupts of the CCM core in the Status register.

Bit positions to 1 will be cleared.

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

Referenced by XCcm_IntrHandler().

◆ XCcm_IntrDisable

#define XCcm_IntrDisable (   InstancePtr,
  IntrType 
)

#include <xccm.h>

Value:
XCcm_WriteReg((InstancePtr)->Config.BaseAddress, \
((XCcm_ReadReg((InstancePtr)->Config.BaseAddress, \
(XCCM_IRQ_EN_OFFSET))) & ((~(IntrType)) & \
#define XCcm_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xccm_hw.h:281
#define XCCM_IRQ_EN_OFFSET
IRQ Enable offset.
Definition: xccm_hw.h:77
#define XCcm_WriteReg(BaseAddress, RegOffset, Data)
This macro writes the given register.
Definition: xccm_hw.h:299
#define XCCM_IXR_ALLINTR_MASK
Interrupt all error mask (ORing of all interrupt mask)
Definition: xccm_hw.h:124

This macro disables individual interrupts of the CCM core by updating the IRQ_ENABLE register.

Parameters
InstancePtris a pointer to the XCcm instance to be worked on.
IntrTypeis the type of the interrupts to disable. Use OR'ing of XCCM_IXR_*_MASK constants defined in xccm_hw.h to create this parameter value.
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 XCcm_IntrDisable(XCcm *InstancePtr, u32 IntrType)

◆ XCcm_IntrEnable

#define XCcm_IntrEnable (   InstancePtr,
  IntrType 
)

#include <xccm.h>

Value:
XCcm_WriteReg((InstancePtr)->Config.BaseAddress, \
(((IntrType) & (XCCM_IXR_ALLINTR_MASK)) | \
(XCcm_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XCcm_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xccm_hw.h:281
#define XCCM_IRQ_EN_OFFSET
IRQ Enable offset.
Definition: xccm_hw.h:77
#define XCcm_WriteReg(BaseAddress, RegOffset, Data)
This macro writes the given register.
Definition: xccm_hw.h:299
#define XCCM_IXR_ALLINTR_MASK
Interrupt all error mask (ORing of all interrupt mask)
Definition: xccm_hw.h:124

This macro enables individual interrupts of the CCM core by updating the IRQ_ENABLE register.

Parameters
InstancePtris a pointer to the XCcm instance to be worked on.
IntrTypeis the type of the interrupts to enable. Use OR'ing of XCCM_IXR_*_MASK constants defined in xccm_hw.h to create this parameter value.
Returns
None.
Note
The existing enabled interrupt(s) will remain enabled. C-style signature: void XCcm_IntrEnable(XCcm *InstancePtr, u32 IntrType)

◆ XCcm_IntrGetPending

#define XCcm_IntrGetPending (   InstancePtr)

#include <xccm.h>

Value:
XCcm_ReadReg((InstancePtr)->Config.BaseAddress, \
((XCcm_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XCcm_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xccm_hw.h:281
#define XCCM_IRQ_EN_OFFSET
IRQ Enable offset.
Definition: xccm_hw.h:77
#define XCCM_STATUS_OFFSET
Status offset.
Definition: xccm_hw.h:75
#define XCCM_IXR_ALLINTR_MASK
Interrupt all error mask (ORing of all interrupt mask)
Definition: xccm_hw.h:124

This macro returns the pending interrupts of the CCM core for the interrupts that have been enabled.

Parameters
InstancePtris a pointer to the XCcm instance to be worked on.
Returns
The pending interrupts of the CCM. Use XCCM_IXR_*_MASK constants defined in xccm_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 XCcm_IntrGetPending(XCcm *InstancePtr)

Referenced by XCcm_IntrHandler().

◆ XCCM_IRQ_EN_OFFSET

#define XCCM_IRQ_EN_OFFSET   0x00C

#include <xccm_hw.h>

IRQ Enable offset.

◆ XCCM_ISR_OFFSET

#define XCCM_ISR_OFFSET   XCCM_STATUS_OFFSET

#include <xccm_hw.h>

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

Interrupt status offset

◆ XCCM_IXR_ALLINTR_MASK

#define XCCM_IXR_ALLINTR_MASK   0x00010003

#include <xccm_hw.h>

Interrupt all error mask (ORing of all interrupt mask)

◆ XCCM_IXR_EOF_MASK

#define XCCM_IXR_EOF_MASK   0x00000002

#include <xccm_hw.h>

End-Of-Frame mask.

Referenced by XCcm_IntrHandler().

◆ XCCM_IXR_PROCS_STARTED_MASK

#define XCCM_IXR_PROCS_STARTED_MASK   0x00000001

#include <xccm_hw.h>

Process Started mask.

Referenced by XCcm_IntrHandler().

◆ XCCM_IXR_SE_MASK

#define XCCM_IXR_SE_MASK   0x00010000

#include <xccm_hw.h>

Slave Error mask.

Referenced by XCcm_IntrHandler().

◆ XCCM_K11_OFFSET

#define XCCM_K11_OFFSET   0x100

#include <xccm_hw.h>

K11 Coefficient offset.

Referenced by XCcm_GetCoefMatrix().

◆ XCCM_K12_OFFSET

#define XCCM_K12_OFFSET   0x104

#include <xccm_hw.h>

K12 Coefficient offset.

◆ XCCM_K13_OFFSET

#define XCCM_K13_OFFSET   0x108

#include <xccm_hw.h>

K13 Coefficient offset.

◆ XCCM_K21_OFFSET

#define XCCM_K21_OFFSET   0x10C

#include <xccm_hw.h>

K21 Coefficient offset.

◆ XCCM_K22_OFFSET

#define XCCM_K22_OFFSET   0x110

#include <xccm_hw.h>

K22 Coefficient offset.

◆ XCCM_K23_OFFSET

#define XCCM_K23_OFFSET   0x114

#include <xccm_hw.h>

K23 Coefficient offset.

◆ XCCM_K31_OFFSET

#define XCCM_K31_OFFSET   0x118

#include <xccm_hw.h>

K31 Coefficient offset.

◆ XCCM_K32_OFFSET

#define XCCM_K32_OFFSET   0x11C

#include <xccm_hw.h>

K32 Coefficient offset.

◆ XCCM_K33_OFFSET

#define XCCM_K33_OFFSET   0x120

#include <xccm_hw.h>

K33 Coefficient offset.

◆ XCCM_MAX_VALUE

#define XCCM_MAX_VALUE   0xFFFFFFFF

#include <xccm_hw.h>

32 bit maximum value

◆ XCCM_OFFSET_FIRST

#define XCCM_OFFSET_FIRST   0xFFFFFF00

#include <xccm.h>

Offset starting value.

Referenced by XCcm_SetRgbOffset().

◆ XCCM_OFFSET_LAST

#define XCCM_OFFSET_LAST   255

#include <xccm.h>

Offset ending value.

Referenced by XCcm_SetRgbOffset().

◆ XCCM_OFFSET_MASK

#define XCCM_OFFSET_MASK   0x0001FFFF

#include <xccm_hw.h>

Offset mask for Red, Green Blue Offset registers.

◆ XCCM_OFFSET_SIGN_SHIFT

#define XCCM_OFFSET_SIGN_SHIFT   15

#include <xccm_hw.h>

Shift for signed bit.

Referenced by XCcm_GetRgbOffset().

◆ XCcm_Out32

#define XCcm_Out32   Xil_Out32

#include <xccm_hw.h>

Output operation.

◆ XCcm_ReadReg

#define XCcm_ReadReg (   BaseAddress,
  RegOffset 
)    XCcm_In32((BaseAddress) + (u32)(RegOffset))

#include <xccm_hw.h>

This macro reads the given register.

Parameters
BaseAddressis the Xilinx base address of the CCM core.
RegOffsetis the register offset of the register.
Returns
The 32-bit value of the register.
Note
C-style signature: u32 XCcm_ReadReg(u32 BaseAddress, u32 RegOffset)

Referenced by XCcm_DisableDbgByPass(), XCcm_DisableDbgTestPattern(), XCcm_EnableDbgByPass(), XCcm_EnableDbgTestPattern(), XCcm_GetActiveSize(), XCcm_GetClamp(), XCcm_GetClip(), XCcm_GetCoefMatrix(), XCcm_GetDbgFrameCount(), XCcm_GetDbgLineCount(), XCcm_GetDbgPixelCount(), XCcm_GetRgbOffset(), XCcm_GetVersion(), XCcm_IsDbgByPassEnabled(), XCcm_IsDbgTestPatternEnabled(), and XCcm_SelfTest().

◆ XCcm_RegUpdateDisable

#define XCcm_RegUpdateDisable (   InstancePtr)

#include <xccm.h>

Value:
XCcm_WriteReg((InstancePtr)->Config.BaseAddress, \
((XCcm_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XCCM_CONTROL_OFFSET
Control offset.
Definition: xccm_hw.h:74
#define XCcm_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xccm_hw.h:281
#define XCCM_CTL_RUE_MASK
Register Update Enable mask.
Definition: xccm_hw.h:104
#define XCcm_WriteReg(BaseAddress, RegOffset, Data)
This macro writes the given register.
Definition: xccm_hw.h:299

This macro prevents the CCM core instance 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.

This macro only works when the CCM core is enabled.

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

Referenced by XCcm_Setup().

◆ XCcm_RegUpdateEnable

#define XCcm_RegUpdateEnable (   InstancePtr)

#include <xccm.h>

Value:
XCcm_WriteReg((InstancePtr)->Config.BaseAddress, \
((XCcm_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XCCM_CONTROL_OFFSET
Control offset.
Definition: xccm_hw.h:74
#define XCcm_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xccm_hw.h:281
#define XCCM_CTL_RUE_MASK
Register Update Enable mask.
Definition: xccm_hw.h:104
#define XCcm_WriteReg(BaseAddress, RegOffset, Data)
This macro writes the given register.
Definition: xccm_hw.h:299

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

This macro only works when the CCM core is enabled.

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

Referenced by XCcm_Setup().

◆ XCcm_Reset

#define XCcm_Reset (   InstancePtr)

#include <xccm.h>

Value:
XCcm_WriteReg((InstancePtr)->Config.BaseAddress, \
#define XCCM_CONTROL_OFFSET
Control offset.
Definition: xccm_hw.h:74
#define XCCM_CTL_RESET_MASK
Software Reset mask.
Definition: xccm_hw.h:114
#define XCcm_WriteReg(BaseAddress, RegOffset, Data)
This macro writes the given register.
Definition: xccm_hw.h:299

This macro resets a CCM core.

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

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

◆ XCCM_ROFFSET_OFFSET

#define XCCM_ROFFSET_OFFSET   0x124

#include <xccm_hw.h>

Red Offset offset.

Referenced by XCcm_GetRgbOffset(), and XCcm_SetRgbOffset().

◆ XCCM_SIGN_MUL

#define XCCM_SIGN_MUL   -1

#include <xccm_hw.h>

Macro for sign multiplication.

◆ XCcm_Start

#define XCcm_Start   XCcm_Enable

#include <xccm.h>

This macro enables/starts the CCM core.

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

◆ XCCM_STATUS_OFFSET

#define XCCM_STATUS_OFFSET   0x004

#include <xccm_hw.h>

Status offset.

◆ XCcm_StatusGetPending

#define XCcm_StatusGetPending (   InstancePtr)

#include <xccm.h>

Value:
XCcm_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XCcm_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xccm_hw.h:281
#define XCCM_STATUS_OFFSET
Status offset.
Definition: xccm_hw.h:75
#define XCCM_IXR_ALLINTR_MASK
Interrupt all error mask (ORing of all interrupt mask)
Definition: xccm_hw.h:124

This macro returns the pending interrupt status of the CCM core by reading from Status register.

Parameters
InstancePtris a pointer to the XCcm instance to be worked on.
Returns
The pending interrupts of the CCM. Use XCCM_IXR_*_MASK constants defined in xccm_hw.h to interpret this value.
Note
C-style signature: u32 XCcm_StatusGetPending(XCcm *InstancePtr)

◆ XCcm_Stop

#define XCcm_Stop   XCcm_Disable

#include <xccm.h>

This macro disables/stops the CCM core.

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

◆ XCcm_SyncReset

#define XCcm_SyncReset (   InstancePtr)

#include <xccm.h>

Value:
XCcm_WriteReg((InstancePtr)->Config.BaseAddress, \
#define XCCM_CONTROL_OFFSET
Control offset.
Definition: xccm_hw.h:74
#define XCCM_CTL_AUTORESET_MASK
Software Auto Reset mask.
Definition: xccm_hw.h:111
#define XCcm_WriteReg(BaseAddress, RegOffset, Data)
This macro writes the given register.
Definition: xccm_hw.h:299

This macro resets a CCM 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 macro is differ from XCcm_Reset().

On the next rising-edge of SOF following a call to XCcm_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 XCcm instance to be worked on.
Returns
None.
Note
C-style signature: void XCcm_SyncReset(XCcm *InstancePtr)

◆ XCCM_SYSDEBUG0_OFFSET

#define XCCM_SYSDEBUG0_OFFSET   0x014

#include <xccm_hw.h>

System Debug 0 offset.

Referenced by XCcm_GetDbgFrameCount().

◆ XCCM_SYSDEBUG1_OFFSET

#define XCCM_SYSDEBUG1_OFFSET   0x018

#include <xccm_hw.h>

System Debug 1 offset.

Referenced by XCcm_GetDbgLineCount().

◆ XCCM_SYSDEBUG2_OFFSET

#define XCCM_SYSDEBUG2_OFFSET   0x01C

#include <xccm_hw.h>

System Debug 2 offset.

Referenced by XCcm_GetDbgPixelCount().

◆ XCCM_VER_INTERNAL_SHIFT

#define XCCM_VER_INTERNAL_SHIFT   0x00000008

#include <xccm_hw.h>

Version Internal shift.

◆ XCCM_VER_MAJOR_MASK

#define XCCM_VER_MAJOR_MASK   0xFF000000

#include <xccm_hw.h>

Version Major mask.

◆ XCCM_VER_MAJOR_SHIFT

#define XCCM_VER_MAJOR_SHIFT   0x00000018

#include <xccm_hw.h>

Version Major shift.

◆ XCCM_VER_MINOR_MASK

#define XCCM_VER_MINOR_MASK   0x00FF0000

#include <xccm_hw.h>

Version Minor mask.

◆ XCCM_VER_MINOR_SHIFT

#define XCCM_VER_MINOR_SHIFT   0x00000010

#include <xccm_hw.h>

Version Minor shift.

◆ XCCM_VER_PID_MASK

#define XCCM_VER_PID_MASK   0x00000F00

#include <xccm_hw.h>

Version Patch ID mask.

◆ XCCM_VER_REV_MASK

#define XCCM_VER_REV_MASK   0x0000F000

#include <xccm_hw.h>

Version Revision mask.

◆ XCCM_VER_REV_NUM_MASK

#define XCCM_VER_REV_NUM_MASK   0x000000FF

#include <xccm_hw.h>

Version Revision Number mask.

◆ XCCM_VER_REV_SHIFT

#define XCCM_VER_REV_SHIFT   0x0000000C

#include <xccm_hw.h>

Version Revision shift.

◆ XCCM_VERSION_OFFSET

#define XCCM_VERSION_OFFSET   0x010

#include <xccm_hw.h>

Version offset.

Referenced by XCcm_GetVersion(), and XCcm_SelfTest().

◆ XCcm_WriteReg

#define XCcm_WriteReg (   BaseAddress,
  RegOffset,
  Data 
)    XCcm_Out32((BaseAddress) + (u32)(RegOffset), (u32)(Data))

#include <xccm_hw.h>

This macro writes the given register.

Parameters
BaseAddressis the Xilinx base address of the CCM core.
RegOffsetis the register offset of the register.
Datais the 32-bit value to write to the register.
Returns
None.
Note
C-style signature: void XCcm_WriteReg(u32 BaseAddress, u32 RegOffset, u32 Data)

Referenced by XCcm_DisableDbgByPass(), XCcm_DisableDbgTestPattern(), XCcm_EnableDbgByPass(), XCcm_EnableDbgTestPattern(), XCcm_SetActiveSize(), XCcm_SetClamp(), XCcm_SetClip(), XCcm_SetRgbOffset(), and XCcm_Setup().

Typedef Documentation

◆ XCcm_CallBack

typedef void(* XCcm_CallBack) (void *CallBackRef)

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

◆ XCcm_ErrorCallBack

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

#include <xccm.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 XCCM_IXR_*_MASK values defined in xccm_hw.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

#include <xccm.h>

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

Enumerator
XCCM_HANDLER_PROCSTART 

A processing start event interrupt type.

XCCM_HANDLER_FRAMEDONE 

A frame done event interrupt type.

XCCM_HANDLER_ERROR 

An error condition interrupt type.

Function Documentation

◆ XCcm_CfgInitialize()

int XCcm_CfgInitialize ( XCcm InstancePtr,
XCcm_Config CfgPtr,
u32  EffectiveAddr 
)

#include <xccm.c>

This function initializes an CCM core.

This function must be called prior to using an CCM core. Initialization of an CCM includes setting up the instance data and ensuring the hardware is in a quiescent state.

Parameters
InstancePtris a pointer to the XCcm instance.
CfgPtris a reference to a structure containing information about a specific XCcm instance.
EffectiveAddris the device base address in the virtual memory address space. The caller is responsible for keeping the address mapping from EffectiveAddr to the device physical base address unchanged once this function is invoked. Unexpected errors may occur if the address mapping changes after this function is called. If address translation is not used, pass in the physical address instead.
Returns
- XST_SUCCESS if initialization was successful.
Note
None.

References XCcm_Config::BaseAddress, XCcm::Config, and XCcm::ProcStartCallBack.

Referenced by XCcmSelfTestExample().

◆ XCcm_DisableDbgByPass()

void XCcm_DisableDbgByPass ( XCcm InstancePtr)

#include <xccm.c>

This function disables the Bypass mode of the CCM core.

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

References XCcm_Config::BaseAddress, XCcm::Config, XCcm_Config::HasDebug, XCCM_CONTROL_OFFSET, XCCM_CTL_BPE_MASK, XCcm_ReadReg, and XCcm_WriteReg.

◆ XCcm_DisableDbgTestPattern()

void XCcm_DisableDbgTestPattern ( XCcm InstancePtr)

#include <xccm.c>

This function disables debug test pattern mode in Control register of the CCM core, if Debug feature is enabled.

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

References XCcm_Config::BaseAddress, XCcm::Config, XCcm_Config::HasDebug, XCCM_CONTROL_OFFSET, XCCM_CTL_TPE_MASK, XCcm_ReadReg, and XCcm_WriteReg.

◆ XCcm_EnableDbgByPass()

void XCcm_EnableDbgByPass ( XCcm InstancePtr)

#include <xccm.c>

This function enables the bypass mode by setting bypass bit of the Control register to switch the core to bypass mode if debug feature is enabled in the core.

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

References XCcm_Config::BaseAddress, XCcm::Config, XCcm_Config::HasDebug, XCCM_CONTROL_OFFSET, XCCM_CTL_BPE_MASK, XCcm_ReadReg, and XCcm_WriteReg.

◆ XCcm_EnableDbgTestPattern()

void XCcm_EnableDbgTestPattern ( XCcm InstancePtr)

#include <xccm.c>

This function enables the test-pattern mode if debug feature is enabled by setting test-pattern bit of the Control register of the CCM core.

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

References XCcm_Config::BaseAddress, XCcm::Config, XCcm_Config::HasDebug, XCCM_CONTROL_OFFSET, XCCM_CTL_TPE_MASK, XCcm_ReadReg, and XCcm_WriteReg.

◆ XCcm_GetActiveSize()

void XCcm_GetActiveSize ( XCcm InstancePtr,
u16 *  HSize,
u16 *  VSize 
)

#include <xccm.c>

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

Parameters
InstancePtris a pointer to the XCcm instance.
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 XCcm_Config::BaseAddress, XCcm::Config, XCCM_ACTIVE_SIZE_OFFSET, XCCM_ACTSIZE_NUM_LINE_MASK, XCCM_ACTSIZE_NUM_LINE_SHIFT, XCCM_ACTSIZE_NUM_PIXEL_MASK, and XCcm_ReadReg.

◆ XCcm_GetClamp()

u32 XCcm_GetClamp ( XCcm InstancePtr)

#include <xccm.c>

This function returns the clamp value from the Clamp register.

Parameters
InstancePtris a pointer to the CCM instance.
Returns
Clamp Value is returned.(Range is 0 to 255).
Note
If Output value smaller than this clamp value it will be replaced by this value.

References XCcm_Config::BaseAddress, XCcm::Config, XCCM_CLAMP_MASK, XCCM_CLAMP_OFFSET, and XCcm_ReadReg.

◆ XCcm_GetClip()

u32 XCcm_GetClip ( XCcm InstancePtr)

#include <xccm.c>

This function gets the clip value from Clip register of the CCM core.

Parameters
InstancePtris a pointer to the CCM instance.
Returns
Clip value is returned.(Range is 0 to 255).
Note
If Output value greater than this Clip value it will be replaced by this Clip value.

References XCcm_Config::BaseAddress, XCcm::Config, XCCM_CLIP_MASK, XCCM_CLIP_OFFSET, and XCcm_ReadReg.

◆ XCcm_GetCoefMatrix()

void XCcm_GetCoefMatrix ( XCcm InstancePtr,
XCcm_Coefs CoefValues 
)

#include <xccm.c>

This function gets the coefficient values of color correction matrix from K11 to K33 registers of the CCM core.

Parameters
InstancePtris a pointer to the CCM instance
CoefValuesis a pointer to XCcm_Coefs structure which has matrix coefficients is updated with coefficient values. (Range is floating point numbers [-8, 8)).
Returns
None.
Note
None.

References XCcm_Config::BaseAddress, XCcm::Config, XCcm_Coefs::K11, XCCM_K11_OFFSET, and XCcm_ReadReg.

◆ XCcm_GetDbgFrameCount()

u32 XCcm_GetDbgFrameCount ( XCcm InstancePtr)

#include <xccm.c>

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

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

References XCcm_Config::BaseAddress, XCcm::Config, XCcm_Config::HasDebug, XCcm_ReadReg, and XCCM_SYSDEBUG0_OFFSET.

◆ XCcm_GetDbgLineCount()

u32 XCcm_GetDbgLineCount ( XCcm InstancePtr)

#include <xccm.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 XCcm instance.
Returns
LineCount is the number of lines processed since power up.
Note
Debug functionality should be enabled.

References XCcm_Config::BaseAddress, XCcm::Config, XCcm_Config::HasDebug, XCcm_ReadReg, and XCCM_SYSDEBUG1_OFFSET.

◆ XCcm_GetDbgPixelCount()

u32 XCcm_GetDbgPixelCount ( XCcm InstancePtr)

#include <xccm.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 XCcm instance.
Returns
PixelCount is the number of pixels processed since power up.
Note
Debug functionality should be enabled.

References XCcm_Config::BaseAddress, XCcm::Config, XCcm_Config::HasDebug, XCcm_ReadReg, and XCCM_SYSDEBUG2_OFFSET.

◆ XCcm_GetRgbOffset()

void XCcm_GetRgbOffset ( XCcm InstancePtr,
s32 *  ROffset,
s32 *  GOffset,
s32 *  BOffset 
)

#include <xccm.c>

This function gets the offset compensation values of red, blue, green colors from Roffset, Goffset and Boffset registers.

Parameters
InstancePtris a pointer to the CCM instance.
ROffsetis a pointer of signed 32 bit variable in which offset of red color value is returned. (Range of offset is [-256 255]).
GOffsetis a pointer of signed 32 bit variable in which offset of green color value is returned. (Range of offset is [-256 255]).
BOffsetis a pointer of signed 32 bit variable in which offset of blue color value is returned. (Range of offset is [-256 255]).
Returns
None.
Note
None.

References XCcm_Config::BaseAddress, XCcm::Config, XCCM_BOFFSET_OFFSET, XCCM_GOFFSET_OFFSET, XCCM_OFFSET_SIGN_SHIFT, XCcm_ReadReg, and XCCM_ROFFSET_OFFSET.

◆ XCcm_GetVersion()

u32 XCcm_GetVersion ( XCcm InstancePtr)

#include <xccm.c>

This function gets the Version of the CCM core.

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

References XCcm_Config::BaseAddress, XCcm::Config, XCcm_ReadReg, and XCCM_VERSION_OFFSET.

◆ XCcm_IntrHandler()

void XCcm_IntrHandler ( void *  InstancePtr)

#include <xccm.h>

This function is the interrupt handler for the CCM core.

This handler reads the pending interrupt from 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 driver is also responsible for providing callbacks to handle interrupts and installing the callbacks using XCcm_SetCallBack() during initialization phase. .

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

References XCcm::Config, XCcm::ErrCallBack, XCcm::ErrRef, XCcm::FrameDoneCallBack, XCcm::FrameDoneRef, XCcm_Config::HasIntcIf, XCcm::IsReady, XCcm::ProcStartCallBack, XCcm::ProcStartRef, XCcm_IntrClear, XCcm_IntrGetPending, XCCM_IXR_EOF_MASK, XCCM_IXR_PROCS_STARTED_MASK, and XCCM_IXR_SE_MASK.

◆ XCcm_IsDbgByPassEnabled()

int XCcm_IsDbgByPassEnabled ( XCcm InstancePtr)

#include <xccm.c>

This function returns the current bypass mode settings from Control register of the CCM core.

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

References XCcm_Config::BaseAddress, XCcm::Config, XCcm_Config::HasDebug, XCCM_CONTROL_OFFSET, XCCM_CTL_BPE_MASK, and XCcm_ReadReg.

◆ XCcm_IsDbgTestPatternEnabled()

int XCcm_IsDbgTestPatternEnabled ( XCcm InstancePtr)

#include <xccm.c>

This function returns the test-pattern mode (enabled or not) from Control register of the CCM core, if debug feature was enabled.

Parameters
InstancePtris a pointer to the XCcm instance.
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 XCcm_Config::BaseAddress, XCcm::Config, XCcm_Config::HasDebug, XCCM_CONTROL_OFFSET, XCCM_CTL_TPE_MASK, and XCcm_ReadReg.

◆ XCcm_LookupConfig()

XCcm_Config * XCcm_LookupConfig ( u16  DeviceId)

#include <xccm.h>

XCcm_LookupConfig returns a reference to an XCcm_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 xccm_g.c file.

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

Referenced by XCcmSelfTestExample().

◆ XCcm_SelfTest()

int XCcm_SelfTest ( XCcm InstancePtr)

#include <xccm.h>

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

Parameters
InstancePtris a pointer to XCcm instance.
Returns
  • XST_SUCCESS if the test is successful.
  • XST_FAILURE if the test is failed.
Note
None.

References XCcm_Config::BaseAddress, XCcm::Config, XCcm_ReadReg, and XCCM_VERSION_OFFSET.

Referenced by XCcmSelfTestExample().

◆ XCcm_SetActiveSize()

void XCcm_SetActiveSize ( XCcm InstancePtr,
u16  HSize,
u16  VSize 
)

#include <xccm.c>

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

Parameters
InstancePtris a pointer to the XCcm instance.
HSizespecifies the number of Active Pixels per Scan Line that needs to be set (Range is 32 to 7680).
VSizespecifies the number of Active Lines per Frame that needs to be set (Range is 32 to 7680).
Returns
None.
Note
None.

References XCcm_Config::BaseAddress, XCcm::Config, XCCM_ACT_SIZE_FIRST, XCCM_ACT_SIZE_LAST, XCCM_ACTIVE_SIZE_OFFSET, XCCM_ACTSIZE_NUM_LINE_SHIFT, and XCcm_WriteReg.

◆ XCcm_SetCallBack()

int XCcm_SetCallBack ( XCcm InstancePtr,
u32  HandlerType,
void *  CallBackFunc,
void *  CallBackRef 
)

#include <xccm.h>

This routine installs an asynchronous callback function for the given HandlerType.

HandlerType              Callback Function Type
-----------------------  --------------------------------------------------
XCCM_HANDLER_FRAMEDONE   FrameDoneCallBack
XCCM_HANDLER_PROCSTART   ProcStartCallBack
XCCM_HANDLER_ERROR       ErrCallBack
Parameters
InstancePtris a pointer to the Xccm 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 XCcm::ErrCallBack, XCcm::ErrRef, XCcm::FrameDoneCallBack, XCcm::FrameDoneRef, XCcm::IsReady, XCcm::ProcStartCallBack, XCcm::ProcStartRef, XCCM_HANDLER_ERROR, XCCM_HANDLER_FRAMEDONE, and XCCM_HANDLER_PROCSTART.

◆ XCcm_SetClamp()

void XCcm_SetClamp ( XCcm InstancePtr,
u32  Clamp 
)

#include <xccm.c>

This function sets the clamp value in the Clamp register.

Parameters
InstancePtris a pointer to the CCM instance
Clampis the minimum output value which needs to be set. (Range of Clamping value is 0 to 255).
Returns
None.
Note
If Output value smaller than this Clamp value it will be replaced by this value.

References XCcm_Config::BaseAddress, XCcm::Config, XCCM_CLAMP_LAST, XCCM_CLAMP_MASK, XCCM_CLAMP_OFFSET, and XCcm_WriteReg.

◆ XCcm_SetClip()

void XCcm_SetClip ( XCcm InstancePtr,
u32  Clip 
)

#include <xccm.c>

This function sets the clip value in the Clip register of the CCM core.

Parameters
InstancePtris a pointer to the CCM instance.
Clipis the maximum output value which needs to be set. (Range of Clip value is 0 to 255).
Returns
None.
Note
If Output value greater than this Clip value it will be replaced by this Clip value.

References XCcm_Config::BaseAddress, XCcm::Config, XCCM_CLIP_LAST, XCCM_CLIP_MASK, XCCM_CLIP_OFFSET, and XCcm_WriteReg.

◆ XCcm_SetCoefMatrix()

void XCcm_SetCoefMatrix ( XCcm InstancePtr,
XCcm_Coefs CoefValues 
)

#include <xccm.c>

This function sets the coefficients of color correction matrix in K11 to K33 registers of the CCM core.

Parameters
InstancePtris a pointer to the CCM instance.
CoefValuesis a pointer to XCcm_Coefs structure which has matrix coefficients that needs to be set. (Range is floating point numbers [-8, 8)).
Returns
None.
Note
None.

References XCcm_Coefs::K11, XCcm_Coefs::K12, XCcm_Coefs::K13, XCcm_Coefs::K21, XCcm_Coefs::K22, XCcm_Coefs::K23, XCcm_Coefs::K31, XCcm_Coefs::K32, XCcm_Coefs::K33, XCCM_COEF_FIRST, and XCCM_COEF_LAST.

◆ XCcm_SetRgbOffset()

void XCcm_SetRgbOffset ( XCcm InstancePtr,
s32  ROffset,
s32  GOffset,
s32  BOffset 
)

#include <xccm.c>

This function sets the offset compensation for red, blue and green colors in corresponding Roffset, Goffset and Boffset registers of the CCM core.

Parameters
InstancePtris a pointer to the CCM instance.
ROffsetspecifies offset value of red color component which needs to be set. (Range of offset is [-256 255]).
GOffsetspecifies offset value of green color component which needs to be set. (Range of offset is [-256 255]).
BOffsetspecifies offset value of blue color component which needs to be set. (Range of offset is [-256 255]).
Returns
None.
Note
None.

References XCcm_Config::BaseAddress, XCcm::Config, XCCM_BOFFSET_OFFSET, XCCM_GOFFSET_OFFSET, XCCM_OFFSET_FIRST, XCCM_OFFSET_LAST, XCCM_ROFFSET_OFFSET, and XCcm_WriteReg.

◆ XCcm_Setup()

void XCcm_Setup ( XCcm InstancePtr)

#include <xccm.c>

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

Parameters
InstancePtris a pointer to the Xccm instance.
Returns
None.
Note
None.

References XCcm_Config::BaseAddress, XCcm::Config, XCcm::HSize, XCcm::VSize, XCCM_ACTIVE_SIZE_OFFSET, XCCM_ACTSIZE_NUM_LINE_MASK, XCCM_ACTSIZE_NUM_LINE_SHIFT, XCCM_ACTSIZE_NUM_PIXEL_MASK, XCcm_RegUpdateDisable, XCcm_RegUpdateEnable, and XCcm_WriteReg.