enhance
Xilinx SDK Drivers API Documentation
Enhance_v7_1

Data Structures

struct  XEnhance_Config
 This typedef contains configuration information for a Video Enhance core. More...
 
struct  XEnhance
 The Enhance driver instance data structure. More...
 

Macros

#define XENHANCE_H_
 Prevent circular inclusions by using protection macros. More...
 
#define XEnhance_Enable(InstancePtr)
 This function macro enables the Image Enhancement core instance. More...
 
#define XEnhance_Disable(InstancePtr)
 This function macro disables the Image Enhancement core instance. More...
 
#define XEnhance_Start   XEnhance_Enable
 This function macro starts the Image Enhancement core instance. More...
 
#define XEnhance_Stop   XEnhance_Disable
 This function macro stops the Image Enhancement core instance. More...
 
#define XEnhance_RegUpdateEnable(InstancePtr)
 This function macro commits all the register value changes made so far by the software to the Image Enhancement core instance. More...
 
#define XEnhance_RegUpdateDisable(InstancePtr)
 This function macro prevents the Image Enhancement core instance from committing recent changes made so far by the software. More...
 
#define XEnhance_SyncReset(InstancePtr)
 This function macro resets a Image Enhancement core instance, but differs from XEnhance_Reset() in that it automatically synchronizes to the SOF input of the core to prevent tearing. More...
 
#define XEnhance_Reset(InstancePtr)
 This function macro resets a Image Enhancement core instance. More...
 
#define XEnhance_StatusGetPending(InstancePtr)
 This function macro returns the pending status of a Enhance core. More...
 
#define XEnhance_IntrClear(InstancePtr, IntrType)
 This function macro clears/acknowledges pending interrupts of a Enhance core. More...
 
#define XEnhance_IntrEnable(InstancePtr, IntrType)
 This function macro enables the given individual interrupt(s) on the Enhance core. More...
 
#define XEnhance_IntrDisable(InstancePtr, IntrType)
 This function macro disables the given individual interrupt(s) on the Enhance core by updating Irq_Enable register. More...
 
#define XEnhance_IntrGetPending(InstancePtr)
 This function macro returns the pending interrupts of a Enhance core. More...
 
#define XENHANCE_HW_H_
 Prevent circular inclusions by using protection macros. More...
 
#define XEnhance_In32   Xil_In32
 Enhance Input Operation. More...
 
#define XEnhance_Out32   Xil_Out32
 Enhance Output Operation. More...
 
#define XEnhance_ReadReg(BaseAddress, RegOffset)   XEnhance_In32((BaseAddress) + (u32)(RegOffset))
 This function macro reads the given register. More...
 
#define XEnhance_WriteReg(BaseAddress, RegOffset, Data)   XEnhance_Out32((BaseAddress) + (u32)(RegOffset), (Data))
 This function macro writes the given register. More...
 

Typedefs

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

Functions

int XEnhance_CfgInitialize (XEnhance *InstancePtr, XEnhance_Config *CfgPtr, u32 EffectiveAddr)
 This function initializes a Enhance core. More...
 
void XEnhance_Setup (XEnhance *InstancePtr)
 This function sets the input/output frame size in Active Size register and enables the register update. More...
 
void XEnhance_EnableDbgByPass (XEnhance *InstancePtr)
 This sets the bypass bit of the control register to switch the core to bypass mode if debug is enabled in the Enhance core. More...
 
int XEnhance_IsDbgByPassEnabled (XEnhance *InstancePtr)
 This function gets the current status of the bypass setting of the Enhance core. More...
 
void XEnhance_DisableDbgBypass (XEnhance *InstancePtr)
 This function disables Bypass mode of the Enhance core. More...
 
void XEnhance_EnableDbgTestPattern (XEnhance *InstancePtr)
 This function sets the test-pattern mode of the Enhance core if debug features is enabled. More...
 
int XEnhance_IsDbgTestPatternEnabled (XEnhance *InstancePtr)
 This function gets the test-pattern mode if debug feature is enabled. More...
 
void XEnhance_DisableDbgTestPattern (XEnhance *InstancePtr)
 This function disables the test Pattern mode of the Enhance core. More...
 
u32 XEnhance_GetVersion (XEnhance *InstancePtr)
 This function returns the contents of Version register. More...
 
u32 XEnhance_GetDbgFrameCount (XEnhance *InstancePtr)
 This function gets number of frames processed since power-up or last time the core is reset. More...
 
u32 XEnhance_GetDbgLineCount (XEnhance *InstancePtr)
 This function gets the number of lines processed since power-up or last time the core is reset. More...
 
u32 XEnhance_GetDbgPixelCount (XEnhance *InstancePtr)
 This function gets the number of pixels processed since power-up or last time the core is reset. More...
 
void XEnhance_SetActiveSize (XEnhance *InstancePtr, u16 HSize, u16 VSize)
 This function sets active H/V sizes in the Active size register. More...
 
void XEnhance_GetActiveSize (XEnhance *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 XEnhance_SetNoiseThreshold (XEnhance *InstancePtr, u32 Threshold)
 This function sets the Noise Threshold value for the Enhance core The amount of noise reduction can be controlled through Noise Threshold parameter. More...
 
u32 XEnhance_GetNoiseThreshold (XEnhance *InstancePtr)
 This function gets the Noise Threshold value for the Enhance core. More...
 
void XEnhance_SetEdgeStrength (XEnhance *InstancePtr, u32 Strength)
 This function sets the Edge Strength value for the Enhance core. More...
 
u32 XEnhance_GetEdgeStrength (XEnhance *InstancePtr)
 This function gets the Edge Strength value for the Enhance core. More...
 
void XEnhance_SetHaloSuppress (XEnhance *InstancePtr, u32 Suppress)
 This function sets the Halo Suppress value for the Enhance core. More...
 
u32 XEnhance_GetHaloSuppress (XEnhance *InstancePtr)
 This function gets the Halo Suppress value for the Enhance core. More...
 
XEnhance_ConfigXEnhance_LookupConfig (u16 DeviceId)
 This function returns a reference to an XEnhance_Config structure based on the unique device id, DeviceId. More...
 
int XEnhance_SelfTest (XEnhance *InstancePtr)
 This function reads complete Version register of Enhance core and compares with zero values as part of self test. More...
 
void XEnhance_IntrHandler (void *InstancePtr)
 This function is the interrupt handler for the Enhance driver. More...
 
int XEnhance_SetCallBack (XEnhance *InstancePtr, u32 HandlerType, void *CallBackFunc, void *CallBackRef)
 This routine installs an asynchronous callback function for the given HandlerType: More...
 

Handler Types

enum  { XENH_HANDLER_PROCSTART = 1, XENH_HANDLER_FRAMEDONE, XENH_HANDLER_ERROR }
 These constants specify different types of handlers and used to differentiate interrupt requests from core. More...
 

Active size range macros

#define XENH_VSIZE_FIRST   32
 Vertical Size starting value. More...
 
#define XENH_VSIZE_LAST   7680
 Vertical Size ending value. More...
 
#define XENH_HSIZE_FIRST   32
 Horizontal Size starting value. More...
 
#define XENH_HSIZE_LAST   7680
 Horizontal Size ending value. More...
 

Noise threshold range macros

#define XENH_NOISETHRES_MIN   0
 Noise threshold starting value. More...
 
#define XENH_NOISETHRES_MAX   255
 Noise threshold ending value. More...
 

Strength range macros

#define XENH_ENHSTRENGTH_MIN   0
 Strength starting value. More...
 
#define XENH_ENHSTRENGTH_MAX   32768
 Strength ending value. More...
 

Halo Suppress range macros

#define XENH_HALOSUPPRESS_MIN   0
 Halo Suppress starting value. More...
 
#define XENH_HALOSUPPRESS_MAX   32768
 Halo Suppress ending value. More...
 

Control Registers

#define XENH_CONTROL_OFFSET   0x0000
 Control Offset. More...
 
#define XENH_STATUS_OFFSET   0x0004
 Status Offset. More...
 
#define XENH_ERROR_OFFSET   0x0008
 Error Offset. More...
 
#define XENH_IRQ_EN_OFFSET   0x000C
 IRQ Enable Offset. More...
 
#define XENH_VERSION_OFFSET   0x0010
 Version Offset. More...
 
#define XENH_SYSDEBUG0_OFFSET   0x0014
 System Debug 0 Offset. More...
 
#define XENH_SYSDEBUG1_OFFSET   0x0018
 System Debug 1 Offset. More...
 
#define XENH_SYSDEBUG2_OFFSET   0x001C
 System Debug 2 Offset. More...
 

Timing Control Registers

#define XENH_ACTIVE_SIZE_OFFSET   0x0020
 Horizontal and Vertical Active Frame Size Offset. More...
 

Core Specific Registers

#define XENH_NOISE_THRESHOLD_OFFSET   0x0100
 Noise Reduction Control Active. More...
 
#define XENH_ENHANCE_STRENGTH_OFFSET   0x0104
 Edge Enhancement Control Active. More...
 
#define XENH_HALO_SUPPRESS_OFFSET   0x0108
 Halo Suppression Control Active. More...
 

Enhance Control Register Bit Masks

#define XENH_CTL_SW_EN_MASK   0x00000001
 Enable Mask. More...
 
#define XENH_CTL_RUE_MASK   0x00000002
 Register Update Enable Mask. More...
 
#define XENH_CTL_BPE_MASK   0x00000010
 Bypass Mask. More...
 
#define XENH_CTL_TPE_MASK   0x00000020
 Test Pattern Mask. More...
 
#define XENH_CTL_AUTORESET_MASK   0x40000000
 Software Reset - Auto-synchronize to SOF Mask. More...
 
#define XENH_CTL_RESET_MASK   0x80000000
 Software Reset - Instantaneous Mask. More...
 

Interrupt Register Bit Masks. It is applicable for

Status and Irq_Enable Registers

#define XENH_IXR_PROCS_STARTED_MASK   0x00000001
 Process started Mask. More...
 
#define XENH_IXR_EOF_MASK   0x00000002
 End-Of-Frame Mask. More...
 
#define XENH_IXR_SE_MASK   0x00010000
 Slave Error Mask. More...
 
#define XENH_IXR_ALLINTR_MASK   0x00010003
 OR'ing of all Mask. More...
 

Enhance Error Register Bit Masks

#define XENH_ERR_EOL_EARLY_MASK   0x00000001
 Frame EOL early Mask. More...
 
#define XENH_ERR_EOL_LATE_MASK   0x00000002
 Frame EOL late Mask. More...
 
#define XENH_ERR_SOF_EARLY_MASK   0x00000004
 Frame SOF early Mask. More...
 
#define XENH_ERR_SOF_LATE_MASK   0x00000008
 Frame SOF late Mask. More...
 

Enhance Version Register bit definition

#define XENH_VER_REV_NUM_MASK   0x000000FF
 Revision Number Mask. More...
 
#define XENH_VER_PID_MASK   0x00000F00
 Patch ID Mask. More...
 
#define XENH_VER_MINOR_MASK   0x00FF0000
 Version Minor Mask. More...
 
#define XENH_VER_MAJOR_MASK   0xFF000000
 Version Major Mask. More...
 
#define XENH_VER_REV_MASK   0x0000F000
 VersionRevision Mask. More...
 
#define XENH_VER_INTERNAL_SHIFT   8
 Version Internal Shift. More...
 
#define XENH_VER_REV_SHIFT   12
 Version Revision Shift. More...
 
#define XENH_VER_MINOR_SHIFT   16
 Version Minor Shift. More...
 
#define XENH_VER_MAJOR_SHIFT   24
 Version Major Shift. More...
 

Enhance ActiveSize register Masks and Shifts

#define XENH_ACTSIZE_NUM_PIXEL_MASK   0x00001FFF
 Active size Mask. More...
 
#define XENH_ACTSIZE_NUM_LINE_MASK   0x1FFF0000
 Number of Active lines per Frame (Vertical) Mask. More...
 
#define XENH_ACTSIZE_NUM_LINE_SHIFT   16
 Active size Shift. More...
 

Enhance Noise Threshold Register Bit Masks

#define XENH_NOISE_THRESHOLD_MASK   0x0000FFFF
 Noise Threshold Mask. More...
 

Enhance Strength Register Bit Masks

#define XENH_STRENGTH_MASK   0x0000FFFF
 Enhance Strength Mask. More...
 

Enhance Halo Suppress Register Bit Masks

#define XENH_HALO_SUPPRESS_MASK   0x0000FFFF
 Halo Suppress Mask. More...
 

Backward compatibility macros

#define ENHANCE_CONTROL   XENH_CONTROL_OFFSET
 
#define ENHANCE_STATUS   XENH_STATUS_OFFSET
 
#define ENHANCE_ERROR   XENH_ERROR_OFFSET
 
#define ENHANCE_IRQ_ENABLE   XENH_IRQ_EN_OFFSET
 
#define ENHANCE_VERSION   XENH_VERSION_OFFSET
 
#define ENHANCE_SYSDEBUG0   XENH_SYSDEBUG0_OFFSET
 
#define ENHANCE_SYSDEBUG1   XENH_SYSDEBUG1_OFFSET
 
#define ENHANCE_SYSDEBUG2   XENH_SYSDEBUG2_OFFSET
 
#define ENHANCE_ACTIVE_SIZE   XENH_ACTIVE_SIZE_OFFSET
 
#define ENHANCE_NOISE_THRESHOLD   XENH_NOISE_THRESHOLD_OFFSET
 
#define ENHANCE_ENHANCE_STRENGTH   XENH_ENHANCE_STRENGTH_OFFSET
 
#define ENHANCE_HALO_SUPPRESS   XENH_HALO_SUPPRESS_OFFSET
 
#define ENHANCE_CTL_EN_MASK   XENH_CTL_SW_EN_MASK
 
#define ENHANCE_CTL_RU_MASK   XENH_CTL_RUE_MASK
 
#define ENHANCE_CTL_RESET   XENH_CTL_RESET_MASK
 
#define ENHANCE_CTL_AUTORESET   XENH_CTL_AUTORESET_MASK
 
#define ENHANCE_In32   XEnhance_In32
 
#define ENHANCE_Out32   XEnhance_Out32
 
#define ENHANCE_ReadReg   XEnhance_ReadReg
 
#define ENHANCE_WriteReg   XEnhance_WriteReg
 

Interrupt Registers

#define XENH_ISR_OFFSET   XENH_STATUS_OFFSET
 Interrupt status register generates a interrupt if the corresponding bits of interrupt enable register bits are set. More...
 
#define XENH_IER_OFFSET   XENH_IRQ_EN_OFFSET
 Interrupt Enable Register corresponds to Status bits. More...
 

Macro Definition Documentation

◆ XENH_ACTIVE_SIZE_OFFSET

#define XENH_ACTIVE_SIZE_OFFSET   0x0020

#include <xenhance_hw.h>

Horizontal and Vertical Active Frame Size Offset.

Referenced by XEnhance_GetActiveSize(), XEnhance_SetActiveSize(), and XEnhance_Setup().

◆ XENH_ACTSIZE_NUM_LINE_MASK

#define XENH_ACTSIZE_NUM_LINE_MASK   0x1FFF0000

#include <xenhance_hw.h>

Number of Active lines per Frame (Vertical) Mask.

Referenced by XEnhance_GetActiveSize(), and XEnhance_Setup().

◆ XENH_ACTSIZE_NUM_LINE_SHIFT

#define XENH_ACTSIZE_NUM_LINE_SHIFT   16

#include <xenhance_hw.h>

Active size Shift.

Referenced by XEnhance_GetActiveSize(), XEnhance_SetActiveSize(), and XEnhance_Setup().

◆ XENH_ACTSIZE_NUM_PIXEL_MASK

#define XENH_ACTSIZE_NUM_PIXEL_MASK   0x00001FFF

#include <xenhance_hw.h>

Active size Mask.

Referenced by XEnhance_GetActiveSize(), and XEnhance_Setup().

◆ XENH_CONTROL_OFFSET

◆ XENH_CTL_AUTORESET_MASK

#define XENH_CTL_AUTORESET_MASK   0x40000000

#include <xenhance_hw.h>

Software Reset - Auto-synchronize to SOF Mask.

◆ XENH_CTL_BPE_MASK

#define XENH_CTL_BPE_MASK   0x00000010

◆ XENH_CTL_RESET_MASK

#define XENH_CTL_RESET_MASK   0x80000000

#include <xenhance_hw.h>

Software Reset - Instantaneous Mask.

◆ XENH_CTL_RUE_MASK

#define XENH_CTL_RUE_MASK   0x00000002

#include <xenhance_hw.h>

Register Update Enable Mask.

◆ XENH_CTL_SW_EN_MASK

#define XENH_CTL_SW_EN_MASK   0x00000001

#include <xenhance_hw.h>

Enable Mask.

◆ XENH_CTL_TPE_MASK

#define XENH_CTL_TPE_MASK   0x00000020

◆ XENH_ENHANCE_STRENGTH_OFFSET

#define XENH_ENHANCE_STRENGTH_OFFSET   0x0104

#include <xenhance_hw.h>

Edge Enhancement Control Active.

Referenced by XEnhance_GetEdgeStrength(), and XEnhance_SetEdgeStrength().

◆ XENH_ENHSTRENGTH_MAX

#define XENH_ENHSTRENGTH_MAX   32768

#include <xenhance.h>

Strength ending value.

Referenced by XEnhance_SetEdgeStrength().

◆ XENH_ENHSTRENGTH_MIN

#define XENH_ENHSTRENGTH_MIN   0

#include <xenhance.h>

Strength starting value.

◆ XENH_ERR_EOL_EARLY_MASK

#define XENH_ERR_EOL_EARLY_MASK   0x00000001

#include <xenhance_hw.h>

Frame EOL early Mask.

◆ XENH_ERR_EOL_LATE_MASK

#define XENH_ERR_EOL_LATE_MASK   0x00000002

#include <xenhance_hw.h>

Frame EOL late Mask.

◆ XENH_ERR_SOF_EARLY_MASK

#define XENH_ERR_SOF_EARLY_MASK   0x00000004

#include <xenhance_hw.h>

Frame SOF early Mask.

◆ XENH_ERR_SOF_LATE_MASK

#define XENH_ERR_SOF_LATE_MASK   0x00000008

#include <xenhance_hw.h>

Frame SOF late Mask.

◆ XENH_ERROR_OFFSET

#define XENH_ERROR_OFFSET   0x0008

#include <xenhance_hw.h>

Error Offset.

◆ XENH_HALO_SUPPRESS_MASK

#define XENH_HALO_SUPPRESS_MASK   0x0000FFFF

#include <xenhance_hw.h>

Halo Suppress Mask.

Referenced by XEnhance_GetHaloSuppress().

◆ XENH_HALO_SUPPRESS_OFFSET

#define XENH_HALO_SUPPRESS_OFFSET   0x0108

#include <xenhance_hw.h>

Halo Suppression Control Active.

Referenced by XEnhance_GetHaloSuppress(), and XEnhance_SetHaloSuppress().

◆ XENH_HALOSUPPRESS_MAX

#define XENH_HALOSUPPRESS_MAX   32768

#include <xenhance.h>

Halo Suppress ending value.

Referenced by XEnhance_SetHaloSuppress().

◆ XENH_HALOSUPPRESS_MIN

#define XENH_HALOSUPPRESS_MIN   0

#include <xenhance.h>

Halo Suppress starting value.

◆ XENH_HSIZE_FIRST

#define XENH_HSIZE_FIRST   32

#include <xenhance.h>

Horizontal Size starting value.

Referenced by XEnhance_SetActiveSize().

◆ XENH_HSIZE_LAST

#define XENH_HSIZE_LAST   7680

#include <xenhance.h>

Horizontal Size ending value.

Referenced by XEnhance_SetActiveSize().

◆ XENH_IER_OFFSET

#define XENH_IER_OFFSET   XENH_IRQ_EN_OFFSET

#include <xenhance_hw.h>

Interrupt Enable Register corresponds to Status bits.

◆ XENH_IRQ_EN_OFFSET

#define XENH_IRQ_EN_OFFSET   0x000C

#include <xenhance_hw.h>

IRQ Enable Offset.

◆ XENH_ISR_OFFSET

#define XENH_ISR_OFFSET   XENH_STATUS_OFFSET

#include <xenhance_hw.h>

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

Interrupt Status Register

◆ XENH_IXR_ALLINTR_MASK

#define XENH_IXR_ALLINTR_MASK   0x00010003

#include <xenhance_hw.h>

OR'ing of all Mask.

◆ XENH_IXR_EOF_MASK

#define XENH_IXR_EOF_MASK   0x00000002

#include <xenhance_hw.h>

End-Of-Frame Mask.

Referenced by XEnhance_IntrHandler().

◆ XENH_IXR_PROCS_STARTED_MASK

#define XENH_IXR_PROCS_STARTED_MASK   0x00000001

#include <xenhance_hw.h>

Process started Mask.

Referenced by XEnhance_IntrHandler().

◆ XENH_IXR_SE_MASK

#define XENH_IXR_SE_MASK   0x00010000

#include <xenhance_hw.h>

Slave Error Mask.

Referenced by XEnhance_IntrHandler().

◆ XENH_NOISE_THRESHOLD_MASK

#define XENH_NOISE_THRESHOLD_MASK   0x0000FFFF

#include <xenhance_hw.h>

Noise Threshold Mask.

Referenced by XEnhance_GetNoiseThreshold().

◆ XENH_NOISE_THRESHOLD_OFFSET

#define XENH_NOISE_THRESHOLD_OFFSET   0x0100

#include <xenhance_hw.h>

Noise Reduction Control Active.

Referenced by XEnhance_GetNoiseThreshold(), and XEnhance_SetNoiseThreshold().

◆ XENH_NOISETHRES_MAX

#define XENH_NOISETHRES_MAX   255

#include <xenhance.h>

Noise threshold ending value.

Referenced by XEnhance_SetNoiseThreshold().

◆ XENH_NOISETHRES_MIN

#define XENH_NOISETHRES_MIN   0

#include <xenhance.h>

Noise threshold starting value.

◆ XENH_STATUS_OFFSET

#define XENH_STATUS_OFFSET   0x0004

#include <xenhance_hw.h>

Status Offset.

◆ XENH_STRENGTH_MASK

#define XENH_STRENGTH_MASK   0x0000FFFF

#include <xenhance_hw.h>

Enhance Strength Mask.

Referenced by XEnhance_GetEdgeStrength().

◆ XENH_SYSDEBUG0_OFFSET

#define XENH_SYSDEBUG0_OFFSET   0x0014

#include <xenhance_hw.h>

System Debug 0 Offset.

Referenced by XEnhance_GetDbgFrameCount().

◆ XENH_SYSDEBUG1_OFFSET

#define XENH_SYSDEBUG1_OFFSET   0x0018

#include <xenhance_hw.h>

System Debug 1 Offset.

Referenced by XEnhance_GetDbgLineCount().

◆ XENH_SYSDEBUG2_OFFSET

#define XENH_SYSDEBUG2_OFFSET   0x001C

#include <xenhance_hw.h>

System Debug 2 Offset.

Referenced by XEnhance_GetDbgPixelCount().

◆ XENH_VER_INTERNAL_SHIFT

#define XENH_VER_INTERNAL_SHIFT   8

#include <xenhance_hw.h>

Version Internal Shift.

◆ XENH_VER_MAJOR_MASK

#define XENH_VER_MAJOR_MASK   0xFF000000

#include <xenhance_hw.h>

Version Major Mask.

◆ XENH_VER_MAJOR_SHIFT

#define XENH_VER_MAJOR_SHIFT   24

#include <xenhance_hw.h>

Version Major Shift.

◆ XENH_VER_MINOR_MASK

#define XENH_VER_MINOR_MASK   0x00FF0000

#include <xenhance_hw.h>

Version Minor Mask.

◆ XENH_VER_MINOR_SHIFT

#define XENH_VER_MINOR_SHIFT   16

#include <xenhance_hw.h>

Version Minor Shift.

◆ XENH_VER_PID_MASK

#define XENH_VER_PID_MASK   0x00000F00

#include <xenhance_hw.h>

Patch ID Mask.

◆ XENH_VER_REV_MASK

#define XENH_VER_REV_MASK   0x0000F000

#include <xenhance_hw.h>

VersionRevision Mask.

◆ XENH_VER_REV_NUM_MASK

#define XENH_VER_REV_NUM_MASK   0x000000FF

#include <xenhance_hw.h>

Revision Number Mask.

◆ XENH_VER_REV_SHIFT

#define XENH_VER_REV_SHIFT   12

#include <xenhance_hw.h>

Version Revision Shift.

◆ XENH_VERSION_OFFSET

#define XENH_VERSION_OFFSET   0x0010

#include <xenhance_hw.h>

Version Offset.

Referenced by XEnhance_GetVersion(), and XEnhance_SelfTest().

◆ XENH_VSIZE_FIRST

#define XENH_VSIZE_FIRST   32

#include <xenhance.h>

Vertical Size starting value.

Referenced by XEnhance_SetActiveSize().

◆ XENH_VSIZE_LAST

#define XENH_VSIZE_LAST   7680

#include <xenhance.h>

Vertical Size ending value.

Referenced by XEnhance_SetActiveSize().

◆ XEnhance_Disable

#define XEnhance_Disable (   InstancePtr)

#include <xenhance.h>

Value:
XEnhance_WriteReg((InstancePtr)->Config.BaseAddress, \
XEnhance_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XENH_CTL_SW_EN_MASK
Enable Mask.
Definition: xenhance_hw.h:114
#define XEnhance_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xenhance_hw.h:292
#define XENH_CONTROL_OFFSET
Control Offset.
Definition: xenhance_hw.h:73
#define XEnhance_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xenhance_hw.h:272
XEnhance InstancePtr
Instance of the Enhance Device.
Definition: enhance_selftest_example.c:74

This function macro disables the Image Enhancement core instance.

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

◆ XEnhance_Enable

#define XEnhance_Enable (   InstancePtr)

#include <xenhance.h>

Value:
XEnhance_WriteReg((InstancePtr)->Config.BaseAddress, \
XEnhance_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XENH_CTL_SW_EN_MASK
Enable Mask.
Definition: xenhance_hw.h:114
#define XEnhance_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xenhance_hw.h:292
#define XENH_CONTROL_OFFSET
Control Offset.
Definition: xenhance_hw.h:73
#define XEnhance_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xenhance_hw.h:272
XEnhance InstancePtr
Instance of the Enhance Device.
Definition: enhance_selftest_example.c:74

This function macro enables the Image Enhancement core instance.

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

◆ XENHANCE_H_

#define XENHANCE_H_

#include <xenhance.h>

Prevent circular inclusions by using protection macros.

◆ XENHANCE_HW_H_

#define XENHANCE_HW_H_

#include <xenhance_hw.h>

Prevent circular inclusions by using protection macros.

◆ XEnhance_In32

#define XEnhance_In32   Xil_In32

#include <xenhance_hw.h>

Enhance Input Operation.

◆ XEnhance_IntrClear

#define XEnhance_IntrClear (   InstancePtr,
  IntrType 
)

#include <xenhance.h>

Value:
XEnhance_WriteReg((InstancePtr)->Config.BaseAddress, \
#define XENH_STATUS_OFFSET
Status Offset.
Definition: xenhance_hw.h:74
#define XEnhance_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xenhance_hw.h:292
#define XENH_IXR_ALLINTR_MASK
OR&#39;ing of all Mask.
Definition: xenhance_hw.h:141
XEnhance InstancePtr
Instance of the Enhance Device.
Definition: enhance_selftest_example.c:74

This function macro clears/acknowledges pending interrupts of a Enhance core.

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

Referenced by XEnhance_IntrHandler().

◆ XEnhance_IntrDisable

#define XEnhance_IntrDisable (   InstancePtr,
  IntrType 
)

#include <xenhance.h>

Value:
XEnhance_WriteReg((InstancePtr)->Config.BaseAddress, \
(XEnhance_ReadReg((InstancePtr)->Config.BaseAddress, \
(XENH_IRQ_EN_OFFSET)) & ((~(IntrType)) & \
#define XENH_IRQ_EN_OFFSET
IRQ Enable Offset.
Definition: xenhance_hw.h:76
#define XEnhance_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xenhance_hw.h:292
#define XENH_IXR_ALLINTR_MASK
OR&#39;ing of all Mask.
Definition: xenhance_hw.h:141
#define XEnhance_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xenhance_hw.h:272
XEnhance InstancePtr
Instance of the Enhance Device.
Definition: enhance_selftest_example.c:74

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

Parameters
InstancePtris a pointer to the Enhance core instance to be worked on.
IntrTypeis the bit-mask of the interrupts to be disabled. Bit positions of 1 will be disabled. Bit positions of 0 will keep the previous setting. This mask is formed by OR'ing XENH_IXR_*_MASK bits defined in xenhance_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 XEnhance_IntrDisable(XEnhance *InstancePtr, u32 IntrType)

◆ XEnhance_IntrEnable

#define XEnhance_IntrEnable (   InstancePtr,
  IntrType 
)

#include <xenhance.h>

Value:
XEnhance_WriteReg((InstancePtr)->Config.BaseAddress, \
((IntrType) & (XENH_IXR_ALLINTR_MASK)) | \
(XEnhance_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XENH_IRQ_EN_OFFSET
IRQ Enable Offset.
Definition: xenhance_hw.h:76
#define XEnhance_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xenhance_hw.h:292
#define XENH_IXR_ALLINTR_MASK
OR&#39;ing of all Mask.
Definition: xenhance_hw.h:141
#define XEnhance_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xenhance_hw.h:272
XEnhance InstancePtr
Instance of the Enhance Device.
Definition: enhance_selftest_example.c:74

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

Parameters
InstancePtris a pointer to the Enhance core instance to be worked on.
IntrTypeis the bit-mask of the interrupts to be enabled. Bit positions of 1 will be enabled. Bit positions of 0 will keep the previous setting. This mask is formed by OR'ing XENH_IXR_*_MASK bits defined in xenhance_hw.h.
Returns
None.
Note
The existing enabled interrupt(s) will remain enabled. C-style signature: void XEnhance_IntrEnable(XEnhance *InstancePtr, u32 IntrType)

◆ XEnhance_IntrGetPending

#define XEnhance_IntrGetPending (   InstancePtr)

#include <xenhance.h>

Value:
XEnhance_ReadReg((InstancePtr)->Config.BaseAddress, \
(XEnhance_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XENH_STATUS_OFFSET
Status Offset.
Definition: xenhance_hw.h:74
#define XENH_IRQ_EN_OFFSET
IRQ Enable Offset.
Definition: xenhance_hw.h:76
#define XENH_IXR_ALLINTR_MASK
OR&#39;ing of all Mask.
Definition: xenhance_hw.h:141
#define XEnhance_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xenhance_hw.h:272
XEnhance InstancePtr
Instance of the Enhance Device.
Definition: enhance_selftest_example.c:74

This function macro returns the pending interrupts of a Enhance core.

Parameters
InstancePtris a pointer to the Enhance core instance to be worked on.
Returns
The pending interrupts of the Enhance core. Use XENH_IXR_*_MASK constants defined in xenhance_hw.h to interpret this value.
Note
C-style signature: u32 XEnhance_IntrGetPending(XEnhance *InstancePtr)

Referenced by XEnhance_IntrHandler().

◆ XEnhance_Out32

#define XEnhance_Out32   Xil_Out32

#include <xenhance_hw.h>

Enhance Output Operation.

◆ XEnhance_ReadReg

#define XEnhance_ReadReg (   BaseAddress,
  RegOffset 
)    XEnhance_In32((BaseAddress) + (u32)(RegOffset))

#include <xenhance_hw.h>

This function macro reads the given register.

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

Referenced by XEnhance_DisableDbgBypass(), XEnhance_DisableDbgTestPattern(), XEnhance_EnableDbgByPass(), XEnhance_EnableDbgTestPattern(), XEnhance_GetActiveSize(), XEnhance_GetDbgFrameCount(), XEnhance_GetDbgLineCount(), XEnhance_GetDbgPixelCount(), XEnhance_GetEdgeStrength(), XEnhance_GetHaloSuppress(), XEnhance_GetNoiseThreshold(), XEnhance_GetVersion(), XEnhance_IsDbgByPassEnabled(), XEnhance_IsDbgTestPatternEnabled(), and XEnhance_SelfTest().

◆ XEnhance_RegUpdateDisable

#define XEnhance_RegUpdateDisable (   InstancePtr)

#include <xenhance.h>

Value:
XEnhance_WriteReg((InstancePtr)->Config.BaseAddress, \
((XEnhance_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XENH_CTL_RUE_MASK
Register Update Enable Mask.
Definition: xenhance_hw.h:115
#define XEnhance_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xenhance_hw.h:292
#define XENH_CONTROL_OFFSET
Control Offset.
Definition: xenhance_hw.h:73
#define XEnhance_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xenhance_hw.h:272
XEnhance InstancePtr
Instance of the Enhance Device.
Definition: enhance_selftest_example.c:74

This function macro prevents the Image Enhancement 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.

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

Referenced by XEnhance_Setup().

◆ XEnhance_RegUpdateEnable

#define XEnhance_RegUpdateEnable (   InstancePtr)

#include <xenhance.h>

Value:
XEnhance_WriteReg((InstancePtr)->Config.BaseAddress, \
(XEnhance_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XENH_CTL_RUE_MASK
Register Update Enable Mask.
Definition: xenhance_hw.h:115
#define XEnhance_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xenhance_hw.h:292
#define XENH_CONTROL_OFFSET
Control Offset.
Definition: xenhance_hw.h:73
#define XEnhance_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xenhance_hw.h:272
XEnhance InstancePtr
Instance of the Enhance Device.
Definition: enhance_selftest_example.c:74

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

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

Referenced by XEnhance_Setup().

◆ XEnhance_Reset

#define XEnhance_Reset (   InstancePtr)

#include <xenhance.h>

Value:
XEnhance_WriteReg((InstancePtr)->Config.BaseAddress, \
#define XEnhance_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xenhance_hw.h:292
#define XENH_CTL_RESET_MASK
Software Reset - Instantaneous Mask.
Definition: xenhance_hw.h:125
#define XENH_CONTROL_OFFSET
Control Offset.
Definition: xenhance_hw.h:73
XEnhance InstancePtr
Instance of the Enhance Device.
Definition: enhance_selftest_example.c:74

This function macro resets a Image Enhancement core instance.

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

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

◆ XEnhance_Start

#define XEnhance_Start   XEnhance_Enable

#include <xenhance.h>

This function macro starts the Image Enhancement core instance.

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

◆ XEnhance_StatusGetPending

#define XEnhance_StatusGetPending (   InstancePtr)

#include <xenhance.h>

Value:
XEnhance_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XENH_STATUS_OFFSET
Status Offset.
Definition: xenhance_hw.h:74
#define XENH_IXR_ALLINTR_MASK
OR&#39;ing of all Mask.
Definition: xenhance_hw.h:141
#define XEnhance_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xenhance_hw.h:272
XEnhance InstancePtr
Instance of the Enhance Device.
Definition: enhance_selftest_example.c:74

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

Parameters
InstancePtris a pointer to the Enhance core instance to be worked on.
Returns
The pending interrupts of the Enhance core. Use XENH_IXR_*_MASK constants defined in xenhance_hw.h to interpret this value.
Note
C-style signature: u32 XEnhance_StatusGePending(XEnhance *InstancePtr).

◆ XEnhance_Stop

#define XEnhance_Stop   XEnhance_Disable

#include <xenhance.h>

This function macro stops the Image Enhancement core instance.

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

◆ XEnhance_SyncReset

#define XEnhance_SyncReset (   InstancePtr)

#include <xenhance.h>

Value:
XEnhance_WriteReg((InstancePtr)->Config.BaseAddress, \
#define XEnhance_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xenhance_hw.h:292
#define XENH_CONTROL_OFFSET
Control Offset.
Definition: xenhance_hw.h:73
#define XENH_CTL_AUTORESET_MASK
Software Reset - Auto-synchronize to SOF Mask.
Definition: xenhance_hw.h:120
XEnhance InstancePtr
Instance of the Enhance Device.
Definition: enhance_selftest_example.c:74

This function macro resets a Image Enhancement core instance, but differs from XEnhance_Reset() in that it automatically synchronizes to the SOF input of the core to prevent tearing.

On the next SOF following a call to XEnhance_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 Enhance core instance to be worked on.
Returns
None.
Note
C-style signature: void Enhance_SyncReset(XEnhance *InstancePtr)

◆ XEnhance_WriteReg

#define XEnhance_WriteReg (   BaseAddress,
  RegOffset,
  Data 
)    XEnhance_Out32((BaseAddress) + (u32)(RegOffset), (Data))

#include <xenhance_hw.h>

This function macro writes the given register.

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

Referenced by XEnhance_DisableDbgBypass(), XEnhance_DisableDbgTestPattern(), XEnhance_EnableDbgByPass(), XEnhance_EnableDbgTestPattern(), XEnhance_SetActiveSize(), XEnhance_SetEdgeStrength(), XEnhance_SetHaloSuppress(), XEnhance_SetNoiseThreshold(), and XEnhance_Setup().

Typedef Documentation

◆ XEnhance_CallBack

typedef void(* XEnhance_CallBack) (void *CallBackRef)

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

◆ XEnhance_ErrorCallBack

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

#include <xenhance.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 XENH_IXR_*_MASK values defined in xenhance_hw.h

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

#include <xenhance.h>

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

Enumerator
XENH_HANDLER_PROCSTART 

A processing start event interrupt type.

XENH_HANDLER_FRAMEDONE 

A frame done event interrupt type.

XENH_HANDLER_ERROR 

An error condition event interrupt type.

Function Documentation

◆ XEnhance_CfgInitialize()

int XEnhance_CfgInitialize ( XEnhance InstancePtr,
XEnhance_Config CfgPtr,
u32  EffectiveAddr 
)

#include <xenhance.c>

This function initializes a Enhance core.

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

Parameters
InstancePtris a pointer to XEnhance instance to be worked on.
CfgPtris a reference to a configuration structure containing information about the Enhance core.
EffectiveAddris the base address of the core. If address translation is being used then this parameter must reflect the virtual base address. Otherwise, the physical address should be used.
Returns
  • XST_SUCCESS if initialization was successful.
Note
None.

References XEnhance_Config::BaseAddress, XEnhance::Config, InstancePtr, and XEnhance::ProcStartCallBack.

Referenced by XEnhanceSelfTestExample().

◆ XEnhance_DisableDbgBypass()

void XEnhance_DisableDbgBypass ( XEnhance InstancePtr)

#include <xenhance.c>

This function disables Bypass mode of the Enhance core.

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

References XENH_CONTROL_OFFSET, XENH_CTL_BPE_MASK, XEnhance_ReadReg, and XEnhance_WriteReg.

◆ XEnhance_DisableDbgTestPattern()

void XEnhance_DisableDbgTestPattern ( XEnhance InstancePtr)

#include <xenhance.c>

This function disables the test Pattern mode of the Enhance core.

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

References XENH_CONTROL_OFFSET, XENH_CTL_TPE_MASK, XEnhance_ReadReg, and XEnhance_WriteReg.

◆ XEnhance_EnableDbgByPass()

void XEnhance_EnableDbgByPass ( XEnhance InstancePtr)

#include <xenhance.c>

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

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

References XENH_CONTROL_OFFSET, XENH_CTL_BPE_MASK, XEnhance_ReadReg, and XEnhance_WriteReg.

◆ XEnhance_EnableDbgTestPattern()

void XEnhance_EnableDbgTestPattern ( XEnhance InstancePtr)

#include <xenhance.c>

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

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

References XEnhance::Config, XEnhance_Config::HasDebug, XENH_CONTROL_OFFSET, XENH_CTL_TPE_MASK, XEnhance_ReadReg, and XEnhance_WriteReg.

◆ XEnhance_GetActiveSize()

void XEnhance_GetActiveSize ( XEnhance InstancePtr,
u16 *  HSize,
u16 *  VSize 
)

#include <xenhance.c>

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

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

References XEnhance_Config::BaseAddress, XEnhance::Config, XENH_ACTIVE_SIZE_OFFSET, XENH_ACTSIZE_NUM_LINE_MASK, XENH_ACTSIZE_NUM_LINE_SHIFT, XENH_ACTSIZE_NUM_PIXEL_MASK, and XEnhance_ReadReg.

◆ XEnhance_GetDbgFrameCount()

u32 XEnhance_GetDbgFrameCount ( XEnhance InstancePtr)

#include <xenhance.c>

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

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

References XEnhance_Config::BaseAddress, XEnhance::Config, XEnhance_Config::HasDebug, XENH_SYSDEBUG0_OFFSET, and XEnhance_ReadReg.

◆ XEnhance_GetDbgLineCount()

u32 XEnhance_GetDbgLineCount ( XEnhance InstancePtr)

#include <xenhance.c>

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

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

References XEnhance_Config::BaseAddress, XEnhance::Config, XEnhance_Config::HasDebug, XENH_SYSDEBUG1_OFFSET, and XEnhance_ReadReg.

◆ XEnhance_GetDbgPixelCount()

u32 XEnhance_GetDbgPixelCount ( XEnhance InstancePtr)

#include <xenhance.c>

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

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

References XEnhance_Config::BaseAddress, XEnhance::Config, XEnhance_Config::HasDebug, XENH_SYSDEBUG2_OFFSET, and XEnhance_ReadReg.

◆ XEnhance_GetEdgeStrength()

u32 XEnhance_GetEdgeStrength ( XEnhance InstancePtr)

#include <xenhance.c>

This function gets the Edge Strength value for the Enhance core.

Parameters
InstancePtris a pointer to XEnhance instance to be worked on.
Returns
The amount of edge enhancement that can be controlled.
Note
None.

References XEnhance_Config::BaseAddress, XEnhance::Config, XENH_ENHANCE_STRENGTH_OFFSET, XENH_STRENGTH_MASK, and XEnhance_ReadReg.

◆ XEnhance_GetHaloSuppress()

u32 XEnhance_GetHaloSuppress ( XEnhance InstancePtr)

#include <xenhance.c>

This function gets the Halo Suppress value for the Enhance core.

Parameters
InstancePtris a pointer to XEnhance instance to be worked on.
Returns
The amount of halo suppression that can be controlled.
Note
None.

References XEnhance_Config::BaseAddress, XEnhance::Config, XENH_HALO_SUPPRESS_MASK, XENH_HALO_SUPPRESS_OFFSET, and XEnhance_ReadReg.

◆ XEnhance_GetNoiseThreshold()

u32 XEnhance_GetNoiseThreshold ( XEnhance InstancePtr)

#include <xenhance.c>

This function gets the Noise Threshold value for the Enhance core.

Parameters
InstancePtris a pointer to XEnhance instance to be worked on.
Returns
The amount of noise reduction that can be controlled.
Note
None.

References XENH_NOISE_THRESHOLD_MASK, XENH_NOISE_THRESHOLD_OFFSET, and XEnhance_ReadReg.

◆ XEnhance_GetVersion()

u32 XEnhance_GetVersion ( XEnhance InstancePtr)

#include <xenhance.c>

This function returns the contents of Version register.

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

References XENH_VERSION_OFFSET, and XEnhance_ReadReg.

◆ XEnhance_IntrHandler()

void XEnhance_IntrHandler ( void *  InstancePtr)

#include <xenhance.h>

This function is the interrupt handler for the Enhance driver.

This handler reads the pending interrupt from the IER/ISR, determines the source of the interrupts, calls according callbacks, 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 XEnhance_SetCallBack() during initialization phase.

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

References XEnhance::Config, XEnhance::ErrCallBack, XEnhance::ErrRef, XEnhance::FrameDoneCallBack, XEnhance::FrameDoneRef, XEnhance_Config::HasIntcIf, InstancePtr, XEnhance::IsReady, XEnhance::ProcStartCallBack, XEnhance::ProcStartRef, XENH_IXR_EOF_MASK, XENH_IXR_PROCS_STARTED_MASK, XENH_IXR_SE_MASK, XEnhance_IntrClear, and XEnhance_IntrGetPending.

◆ XEnhance_IsDbgByPassEnabled()

int XEnhance_IsDbgByPassEnabled ( XEnhance InstancePtr)

#include <xenhance.c>

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

Parameters
InstancePtris a pointer to XEnhance 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 XENH_CONTROL_OFFSET, XENH_CTL_BPE_MASK, and XEnhance_ReadReg.

◆ XEnhance_IsDbgTestPatternEnabled()

int XEnhance_IsDbgTestPatternEnabled ( XEnhance InstancePtr)

#include <xenhance.c>

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

Parameters
InstancePtris a pointer to XEnhance 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 XEnhance::Config, XEnhance_Config::HasDebug, XENH_CONTROL_OFFSET, XENH_CTL_TPE_MASK, and XEnhance_ReadReg.

◆ XEnhance_LookupConfig()

XEnhance_Config * XEnhance_LookupConfig ( u16  DeviceId)

#include <xenhance.h>

This function returns a reference to an XEnhance_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 xenhance_g.c. file.

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

Referenced by XEnhanceSelfTestExample().

◆ XEnhance_SelfTest()

int XEnhance_SelfTest ( XEnhance InstancePtr)

#include <xenhance.h>

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

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

References XENH_VERSION_OFFSET, and XEnhance_ReadReg.

Referenced by XEnhanceSelfTestExample().

◆ XEnhance_SetActiveSize()

void XEnhance_SetActiveSize ( XEnhance InstancePtr,
u16  HSize,
u16  VSize 
)

#include <xenhance.c>

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

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

References XEnhance_Config::BaseAddress, XEnhance::Config, XENH_ACTIVE_SIZE_OFFSET, XENH_ACTSIZE_NUM_LINE_SHIFT, XENH_HSIZE_FIRST, XENH_HSIZE_LAST, XENH_VSIZE_FIRST, XENH_VSIZE_LAST, and XEnhance_WriteReg.

◆ XEnhance_SetCallBack()

int XEnhance_SetCallBack ( XEnhance InstancePtr,
u32  HandlerType,
void *  CallBackFunc,
void *  CallBackRef 
)

#include <xenhance.h>

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

HandlerType              Callback Function Type
-----------------------  --------------------------------
XENH_HANDLER_PROCSTART   ProcStartCallBack
XENH_HANDLER_FRAMEDONE   FrameDoneCallBack
XENH_HANDLER_ERROR       ErrCallBack
Parameters
InstancePtris a pointer to the XEnhance 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 XEnhance::ErrCallBack, XEnhance::ErrRef, XEnhance::FrameDoneCallBack, XEnhance::FrameDoneRef, XEnhance::IsReady, XEnhance::ProcStartCallBack, XEnhance::ProcStartRef, XENH_HANDLER_ERROR, XENH_HANDLER_FRAMEDONE, and XENH_HANDLER_PROCSTART.

◆ XEnhance_SetEdgeStrength()

void XEnhance_SetEdgeStrength ( XEnhance InstancePtr,
u32  Strength 
)

#include <xenhance.c>

This function sets the Edge Strength value for the Enhance core.

i.e. The amount of edge enhancement can be controlled through the programmable Enhance Strength parameter.

Parameters
InstancePtris a pointer to XEnhance instance to be worked on.
Strengthis the value to set the Edge Strength of the core.
Returns
None.
Note
The larger the strength, the stronger the edge enhancement.

References XENH_ENHANCE_STRENGTH_OFFSET, XENH_ENHSTRENGTH_MAX, and XEnhance_WriteReg.

◆ XEnhance_SetHaloSuppress()

void XEnhance_SetHaloSuppress ( XEnhance InstancePtr,
u32  Suppress 
)

#include <xenhance.c>

This function sets the Halo Suppress value for the Enhance core.

i.e. The amount of halo suppression can be controlled through the programmable Halo Suppress parameter.

Parameters
InstancePtris a pointer to XEnhance instance to be worked on.
Suppressis the value to set the Suppression value.
Returns
None.
Note
None.

References XENH_HALO_SUPPRESS_OFFSET, XENH_HALOSUPPRESS_MAX, and XEnhance_WriteReg.

◆ XEnhance_SetNoiseThreshold()

void XEnhance_SetNoiseThreshold ( XEnhance InstancePtr,
u32  Threshold 
)

#include <xenhance.c>

This function sets the Noise Threshold value for the Enhance core The amount of noise reduction can be controlled through Noise Threshold parameter.

Parameters
InstancePtris a pointer to XEnhance instance to be worked on.
Thresholdis the value to set the Noise Threshold.
Returns
None.
Note
None.

References XENH_NOISE_THRESHOLD_OFFSET, XENH_NOISETHRES_MAX, and XEnhance_WriteReg.

◆ XEnhance_Setup()

void XEnhance_Setup ( XEnhance InstancePtr)

#include <xenhance.c>

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

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

References InstancePtr, XENH_ACTIVE_SIZE_OFFSET, XENH_ACTSIZE_NUM_LINE_MASK, XENH_ACTSIZE_NUM_LINE_SHIFT, XENH_ACTSIZE_NUM_PIXEL_MASK, XEnhance_RegUpdateDisable, XEnhance_RegUpdateEnable, and XEnhance_WriteReg.