enhance: Enhance_v7_1

| enhance Xilinx SDK Drivers API Documentation

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

Data Structures | Macros | Typedefs | Functions
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_Config * | XEnhance_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

#define XENH_ACTIVE_SIZE_OFFSET 0x0020

Horizontal and Vertical Active Frame Size Offset.

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

#define XENH_ACTSIZE_NUM_LINE_MASK 0x1FFF0000

Number of Active lines per Frame (Vertical) Mask.

Referenced by XEnhance_GetActiveSize(), and XEnhance_Setup().

#define XENH_ACTSIZE_NUM_LINE_SHIFT 16

Active size Shift.

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

#define XENH_ACTSIZE_NUM_PIXEL_MASK 0x00001FFF

Active size Mask.

Referenced by XEnhance_GetActiveSize(), and XEnhance_Setup().

#define XENH_CONTROL_OFFSET 0x0000

Control Offset.

Referenced by XEnhance_DisableDbgBypass(), XEnhance_DisableDbgTestPattern(), XEnhance_EnableDbgByPass(), XEnhance_EnableDbgTestPattern(), XEnhance_IsDbgByPassEnabled(), and XEnhance_IsDbgTestPatternEnabled().

#define XENH_CTL_AUTORESET_MASK 0x40000000

Software Reset - Auto-synchronize to SOF Mask.

#define XENH_CTL_BPE_MASK 0x00000010

Bypass Mask.

Referenced by XEnhance_DisableDbgBypass(), XEnhance_EnableDbgByPass(), and XEnhance_IsDbgByPassEnabled().

#define XENH_CTL_RESET_MASK 0x80000000

Software Reset - Instantaneous Mask.

#define XENH_CTL_RUE_MASK 0x00000002

Register Update Enable Mask.

#define XENH_CTL_SW_EN_MASK 0x00000001

Enable Mask.

#define XENH_CTL_TPE_MASK 0x00000020

Test Pattern Mask.

Referenced by XEnhance_DisableDbgTestPattern(), XEnhance_EnableDbgTestPattern(), and XEnhance_IsDbgTestPatternEnabled().

#define XENH_ENHANCE_STRENGTH_OFFSET 0x0104

Edge Enhancement Control Active.

Referenced by XEnhance_GetEdgeStrength(), and XEnhance_SetEdgeStrength().

#define XENH_ENHSTRENGTH_MAX 32768

Strength ending value.

Referenced by XEnhance_SetEdgeStrength().

#define XENH_ENHSTRENGTH_MIN 0

Strength starting value.

#define XENH_ERR_EOL_EARLY_MASK 0x00000001

Frame EOL early Mask.

#define XENH_ERR_EOL_LATE_MASK 0x00000002

Frame EOL late Mask.

#define XENH_ERR_SOF_EARLY_MASK 0x00000004

Frame SOF early Mask.

#define XENH_ERR_SOF_LATE_MASK 0x00000008

Frame SOF late Mask.

#define XENH_ERROR_OFFSET 0x0008

Error Offset.

#define XENH_HALO_SUPPRESS_MASK 0x0000FFFF

Halo Suppress Mask.

Referenced by XEnhance_GetHaloSuppress().

#define XENH_HALO_SUPPRESS_OFFSET 0x0108

Halo Suppression Control Active.

Referenced by XEnhance_GetHaloSuppress(), and XEnhance_SetHaloSuppress().

#define XENH_HALOSUPPRESS_MAX 32768

Halo Suppress ending value.

Referenced by XEnhance_SetHaloSuppress().

#define XENH_HALOSUPPRESS_MIN 0

Halo Suppress starting value.

#define XENH_HSIZE_FIRST 32

Horizontal Size starting value.

Referenced by XEnhance_SetActiveSize().

#define XENH_HSIZE_LAST 7680

Horizontal Size ending value.

Referenced by XEnhance_SetActiveSize().

#define XENH_IER_OFFSET XENH_IRQ_EN_OFFSET

Interrupt Enable Register corresponds to Status bits.

#define XENH_IRQ_EN_OFFSET 0x000C

IRQ Enable Offset.

#define XENH_ISR_OFFSET XENH_STATUS_OFFSET

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

Interrupt Status Register

#define XENH_IXR_ALLINTR_MASK 0x00010003

OR'ing of all Mask.

#define XENH_IXR_EOF_MASK 0x00000002

End-Of-Frame Mask.

Referenced by XEnhance_IntrHandler().

#define XENH_IXR_PROCS_STARTED_MASK 0x00000001

Process started Mask.

Referenced by XEnhance_IntrHandler().

#define XENH_IXR_SE_MASK 0x00010000

Slave Error Mask.

Referenced by XEnhance_IntrHandler().

#define XENH_NOISE_THRESHOLD_MASK 0x0000FFFF

Noise Threshold Mask.

Referenced by XEnhance_GetNoiseThreshold().

#define XENH_NOISE_THRESHOLD_OFFSET 0x0100

Noise Reduction Control Active.

Referenced by XEnhance_GetNoiseThreshold(), and XEnhance_SetNoiseThreshold().

#define XENH_NOISETHRES_MAX 255

Noise threshold ending value.

Referenced by XEnhance_SetNoiseThreshold().

#define XENH_NOISETHRES_MIN 0

Noise threshold starting value.

#define XENH_STATUS_OFFSET 0x0004

Status Offset.

#define XENH_STRENGTH_MASK 0x0000FFFF

Enhance Strength Mask.

Referenced by XEnhance_GetEdgeStrength().

#define XENH_SYSDEBUG0_OFFSET 0x0014

System Debug 0 Offset.

Referenced by XEnhance_GetDbgFrameCount().

#define XENH_SYSDEBUG1_OFFSET 0x0018

System Debug 1 Offset.

Referenced by XEnhance_GetDbgLineCount().

#define XENH_SYSDEBUG2_OFFSET 0x001C

System Debug 2 Offset.

Referenced by XEnhance_GetDbgPixelCount().

#define XENH_VER_INTERNAL_SHIFT 8

Version Internal Shift.

#define XENH_VER_MAJOR_MASK 0xFF000000

Version Major Mask.

#define XENH_VER_MAJOR_SHIFT 24

Version Major Shift.

#define XENH_VER_MINOR_MASK 0x00FF0000

Version Minor Mask.

#define XENH_VER_MINOR_SHIFT 16

Version Minor Shift.

#define XENH_VER_PID_MASK 0x00000F00

Patch ID Mask.

#define XENH_VER_REV_MASK 0x0000F000

VersionRevision Mask.

#define XENH_VER_REV_NUM_MASK 0x000000FF

Revision Number Mask.

#define XENH_VER_REV_SHIFT 12

Version Revision Shift.

#define XENH_VERSION_OFFSET 0x0010

Version Offset.

Referenced by XEnhance_GetVersion(), and XEnhance_SelfTest().

#define XENH_VSIZE_FIRST 32

Vertical Size starting value.

Referenced by XEnhance_SetActiveSize().

#define XENH_VSIZE_LAST 7680

Vertical Size ending value.

Referenced by XEnhance_SetActiveSize().

#define XEnhance_Disable | ( |  | InstancePtr | ) |

Value:
XEnhance_WriteReg((InstancePtr)->Config.BaseAddress, \
(XENH_CONTROL_OFFSET), \
XEnhance_ReadReg((InstancePtr)->Config.BaseAddress, \
(XENH_CONTROL_OFFSET)) & (~(XENH_CTL_SW_EN_MASK)))
XENH_CTL_SW_EN_MASK
#define XENH_CTL_SW_EN_MASK
Enable Mask.
Definition: xenhance_hw.h:112
XEnhance_WriteReg
#define XEnhance_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xenhance_hw.h:290
XENH_CONTROL_OFFSET
#define XENH_CONTROL_OFFSET
Control Offset.
Definition: xenhance_hw.h:71
XEnhance_ReadReg
#define XEnhance_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xenhance_hw.h:270
InstancePtr
XEnhance InstancePtr
Instance of the Enhance Device.
Definition: enhance_selftest_example.c:72

This function macro disables the Image Enhancement core instance.

Parameters

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

Returns
  None.

Note
  C-style signature: void XEnhance_Disable(XEnhance *InstancePtr)

#define XEnhance_Enable | ( |  | InstancePtr | ) |

Value:
XEnhance_WriteReg((InstancePtr)->Config.BaseAddress, \
(XENH_CONTROL_OFFSET), \
XEnhance_ReadReg((InstancePtr)->Config.BaseAddress, \
(XENH_CONTROL_OFFSET)) | (XENH_CTL_SW_EN_MASK))
XENH_CTL_SW_EN_MASK
#define XENH_CTL_SW_EN_MASK
Enable Mask.
Definition: xenhance_hw.h:112
XEnhance_WriteReg
#define XEnhance_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xenhance_hw.h:290
XENH_CONTROL_OFFSET
#define XENH_CONTROL_OFFSET
Control Offset.
Definition: xenhance_hw.h:71
XEnhance_ReadReg
#define XEnhance_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xenhance_hw.h:270
InstancePtr
XEnhance InstancePtr
Instance of the Enhance Device.
Definition: enhance_selftest_example.c:72

This function macro enables the Image Enhancement core instance.

Parameters

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

Returns
  None.

Note
  C-style signature: void XEnhance_Enable(XEnhance *InstancePtr)

#define XENHANCE_H_

Prevent circular inclusions by using protection macros.

#define XENHANCE_HW_H_

Prevent circular inclusions by using protection macros.

#define XEnhance_In32 Xil_In32

Enhance Input Operation.

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

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

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

Parameters

  InstancePtr | is a pointer to the Enhance core instance to be worked on.
  IntrType | is 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().

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

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

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

Parameters

  InstancePtr | is a pointer to the Enhance core instance to be worked on.
  IntrType | is the bit-mask of the interrupts to be disabled. Bit positions of 1 will be disabled. Bit positions of 0 will keep the previous setting. This mask is formed by OR'ing 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)

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

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

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

Parameters

  InstancePtr | is a pointer to the Enhance core instance to be worked on.
  IntrType | is the bit-mask of the interrupts to be enabled. Bit positions of 1 will be enabled. Bit positions of 0 will keep the previous setting. This mask is formed by OR'ing 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)

#define XEnhance_IntrGetPending | ( |  | InstancePtr | ) |

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

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

Parameters

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

#define XEnhance_Out32 Xil_Out32

Enhance Output Operation.

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

This function macro reads the given register.

Parameters

  BaseAddress | is the base address of the Image Enhancement core.
  RegOffset | is the register offset of the core (defined at. top of this file).

Returns
  The 32-bit value of the register.

Note
  C-style signature: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().

#define XEnhance_RegUpdateDisable | ( |  | InstancePtr | ) |

Value:
XEnhance_WriteReg((InstancePtr)->Config.BaseAddress, \
(XENH_CONTROL_OFFSET), \
((XEnhance_ReadReg((InstancePtr)->Config.BaseAddress, \
(XENH_CONTROL_OFFSET))) & \
(~(XENH_CTL_RUE_MASK))))
XENH_CTL_RUE_MASK
#define XENH_CTL_RUE_MASK
Register Update Enable Mask.
Definition: xenhance_hw.h:113
XEnhance_WriteReg
#define XEnhance_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xenhance_hw.h:290
XENH_CONTROL_OFFSET
#define XENH_CONTROL_OFFSET
Control Offset.
Definition: xenhance_hw.h:71
XEnhance_ReadReg
#define XEnhance_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xenhance_hw.h:270
InstancePtr
XEnhance InstancePtr
Instance of the Enhance Device.
Definition: enhance_selftest_example.c:72

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

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

#define XEnhance_RegUpdateEnable | ( |  | InstancePtr | ) |

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

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

Parameters

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

#define XEnhance_Reset | ( |  | InstancePtr | ) |

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

This function macro resets a Image Enhancement core instance.

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

Parameters

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

Returns
  None.

Note
  C-style signature: void XEnhance_Reset(XEnhance *InstancePtr)

Referenced by XEnhance_CfgInitialize().

#define XEnhance_Start XEnhance_Enable

This function macro starts the Image Enhancement core instance.

Parameters

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

Returns
  None.

Note
  C-style signature: void XEnhance_Start(XEnhance *InstancePtr)

#define XEnhance_StatusGetPending | ( |  | InstancePtr | ) |

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

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

Parameters

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

#define XEnhance_Stop XEnhance_Disable

This function macro stops the Image Enhancement core instance.

Parameters

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

Returns
  None.

Note
  C-style signature: void XEnhance_Stop(XEnhance *InstancePtr)

#define XEnhance_SyncReset | ( |  | InstancePtr | ) |

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

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

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

Returns
  None.

Note
  C-style signature: void Enhance_SyncReset(XEnhance *InstancePtr)

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

This function macro writes the given register.

Parameters

  BaseAddress | is the base address of the Image Enhancement core.
  RegOffset | is the register offset of the core (defined at top of this file).
  Data | is 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

typedef void(* XEnhance_CallBack)(void *CallBackRef)

Callback type for all interrupts except error interrupt.

Parameters

  CallBackRef | is a callback reference passed in by the upper layer when setting the callback functions, and passed back to the upper layer when the callback is invoked.

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

Callback type for Error interrupt.

Parameters

  CallBackRef | is a callback reference passed in by the upper layer when setting the callback functions, and passed back to the upper layer when the callback is invoked.
  ErrorMask | is a bit mask indicating the cause of the error. Its value equals 'OR'ing one or more XENH_IXR_*_MASK values defined in xenhance_hw.h

## Enumeration Type Documentation

anonymous enum

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

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

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

  InstancePtr | is a pointer to XEnhance instance to be worked on.
  CfgPtr | is a reference to a configuration structure containing information about the Enhance core.
  EffectiveAddr | is the base address of the core. If address translation is being used then this parameter must reflect the virtual base address. Otherwise, the physical address should be used.

Returns
  - XST_SUCCESS if initialization was successful.

Note
  None.

References XEnhance_Config::BaseAddress, XEnhance::Config, XEnhance::ErrCallBack, XEnhance::FrameDoneCallBack, InstancePtr, XEnhance::IsReady, XEnhance::ProcStartCallBack, and XEnhance_Reset.

Referenced by XEnhanceSelfTestExample().

void XEnhance_DisableDbgBypass | ( | XEnhance * | InstancePtr | ) |

This function disables Bypass mode of the Enhance core.

Parameters

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

void XEnhance_DisableDbgTestPattern | ( | XEnhance * | InstancePtr | ) |

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

Parameters

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

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.

Parameters

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

void XEnhance_EnableDbgTestPattern | ( | XEnhance * | InstancePtr | ) |

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

Parameters

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

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.

Parameters

  InstancePtr | is a pointer to XEnhance instance to be worked on.
  HSize | is a pointer to 16-bit variable in which the number of Active Pixels per Scan Line is returned. (Range is 32 to 7680).
  VSize | is a pointer to 16-bit variable in which the number of Active Lines per Frame is returned. (Range is 32 to 7680).

Returns
  None.

Note
  None.

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

u32 XEnhance_GetDbgFrameCount | ( | XEnhance * | InstancePtr | ) |

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

Parameters

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

u32 XEnhance_GetDbgLineCount | ( | XEnhance * | InstancePtr | ) |

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

Parameters

  InstancePtr | is a pointer to 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.

u32 XEnhance_GetDbgPixelCount | ( | XEnhance * | InstancePtr | ) |

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

Parameters

  InstancePtr | is a pointer to 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.

u32 XEnhance_GetEdgeStrength | ( | XEnhance * | InstancePtr | ) |

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

Parameters

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

u32 XEnhance_GetHaloSuppress | ( | XEnhance * | InstancePtr | ) |

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

Parameters

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

u32 XEnhance_GetNoiseThreshold | ( | XEnhance * | InstancePtr | ) |

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

Parameters

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

u32 XEnhance_GetVersion | ( | XEnhance * | InstancePtr | ) |

This function returns the contents of Version register.

Parameters

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

void XEnhance_IntrHandler | ( | void * | InstancePtr | ) |

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

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

int XEnhance_IsDbgByPassEnabled | ( | XEnhance * | InstancePtr | ) |

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

Parameters

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

int XEnhance_IsDbgTestPatternEnabled | ( | XEnhance * | InstancePtr | ) |

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

Parameters

  InstancePtr | is 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_Config * XEnhance_LookupConfig | ( | u16 | DeviceId | ) |

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

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

int XEnhance_SelfTest | ( | XEnhance * | InstancePtr | ) |

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

Parameters

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

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

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

Parameters

  InstancePtr | is a pointer to XEnhance instance to be worked on.
  HSize | is number of Active Pixels per scan line to be set. Range of HSize is 32 to 7680.
  VSize | is number of Active Lines per frame to be set. Range of VSize is 32 to 7680.

Returns
  None.

Note
  None.

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

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

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

  InstancePtr | is a pointer to the XEnhance instance to be worked on.
  HandlerType | specifies which callback is to be attached.
  CallBackFunc | is the address of the callback function.
  CallBackRef | is a user data item that will be passed to the callback function when it is invoked.

Returns
  - XST_SUCCESS when handler is installed.
  - XST_INVALID_PARAM when HandlerType is invalid.

Note
  Invoking this function for a handler that already has been installed replaces it with the new handler.

References XEnhance::ErrCallBack, XEnhance::ErrRef, XEnhance::FrameDoneCallBack, XEnhance::FrameDoneRef, XEnhance::IsReady, XEnhance::ProcStartCallBack, XEnhance::ProcStartRef, XENH_HANDLER_ERROR, XENH_HANDLER_FRAMEDONE, and XENH_HANDLER_PROCSTART.

void XEnhance_SetEdgeStrength | ( | XEnhance * | InstancePtr,
|  | u32 | Strength
| ) |  |

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

  InstancePtr | is a pointer to XEnhance instance to be worked on.
  Strength | is 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.

void XEnhance_SetHaloSuppress | ( | XEnhance * | InstancePtr,
|  | u32 | Suppress
| ) |  |

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

  InstancePtr | is a pointer to XEnhance instance to be worked on.
  Suppress | is the value to set the Suppression value.

Returns
  None.

Note
  None.

References XENH_HALO_SUPPRESS_OFFSET, XENH_HALOSUPPRESS_MAX, and XEnhance_WriteReg.

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.

Parameters

  InstancePtr | is a pointer to XEnhance instance to be worked on.
  Threshold | is the value to set the Noise Threshold.

Returns
  None.

Note
  None.

References XENH_NOISE_THRESHOLD_OFFSET, XENH_NOISETHRES_MAX, and XEnhance_WriteReg.

void XEnhance_Setup | ( | XEnhance * | InstancePtr | ) |

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

Parameters

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