![]() |
enhance
Xilinx SDK Drivers API Documentation
|
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 | |
#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... | |
#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().
#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().
#define XENH_ACTSIZE_NUM_LINE_SHIFT 16 |
#include <xenhance_hw.h>
Active size Shift.
Referenced by XEnhance_GetActiveSize(), XEnhance_SetActiveSize(), and XEnhance_Setup().
#define XENH_ACTSIZE_NUM_PIXEL_MASK 0x00001FFF |
#include <xenhance_hw.h>
Active size Mask.
Referenced by XEnhance_GetActiveSize(), and XEnhance_Setup().
#define XENH_CONTROL_OFFSET 0x0000 |
#include <xenhance_hw.h>
Control Offset.
Referenced by XEnhance_DisableDbgBypass(), XEnhance_DisableDbgTestPattern(), XEnhance_EnableDbgByPass(), XEnhance_EnableDbgTestPattern(), XEnhance_IsDbgByPassEnabled(), and XEnhance_IsDbgTestPatternEnabled().
#define XENH_CTL_AUTORESET_MASK 0x40000000 |
#include <xenhance_hw.h>
Software Reset - Auto-synchronize to SOF Mask.
#define XENH_CTL_BPE_MASK 0x00000010 |
#include <xenhance_hw.h>
Bypass Mask.
Referenced by XEnhance_DisableDbgBypass(), XEnhance_EnableDbgByPass(), and XEnhance_IsDbgByPassEnabled().
#define XENH_CTL_RESET_MASK 0x80000000 |
#include <xenhance_hw.h>
Software Reset - Instantaneous Mask.
#define XENH_CTL_RUE_MASK 0x00000002 |
#include <xenhance_hw.h>
Register Update Enable Mask.
#define XENH_CTL_SW_EN_MASK 0x00000001 |
#include <xenhance_hw.h>
Enable Mask.
#define XENH_CTL_TPE_MASK 0x00000020 |
#include <xenhance_hw.h>
Test Pattern Mask.
Referenced by XEnhance_DisableDbgTestPattern(), XEnhance_EnableDbgTestPattern(), and XEnhance_IsDbgTestPatternEnabled().
#define XENH_ENHANCE_STRENGTH_OFFSET 0x0104 |
#include <xenhance_hw.h>
Edge Enhancement Control Active.
Referenced by XEnhance_GetEdgeStrength(), and XEnhance_SetEdgeStrength().
#define XENH_ENHSTRENGTH_MAX 32768 |
#define XENH_ENHSTRENGTH_MIN 0 |
#include <xenhance.h>
Strength starting value.
#define XENH_ERR_EOL_EARLY_MASK 0x00000001 |
#include <xenhance_hw.h>
Frame EOL early Mask.
#define XENH_ERR_EOL_LATE_MASK 0x00000002 |
#include <xenhance_hw.h>
Frame EOL late Mask.
#define XENH_ERR_SOF_EARLY_MASK 0x00000004 |
#include <xenhance_hw.h>
Frame SOF early Mask.
#define XENH_ERR_SOF_LATE_MASK 0x00000008 |
#include <xenhance_hw.h>
Frame SOF late Mask.
#define XENH_ERROR_OFFSET 0x0008 |
#include <xenhance_hw.h>
Error Offset.
#define XENH_HALO_SUPPRESS_MASK 0x0000FFFF |
#define XENH_HALO_SUPPRESS_OFFSET 0x0108 |
#include <xenhance_hw.h>
Halo Suppression Control Active.
Referenced by XEnhance_GetHaloSuppress(), and XEnhance_SetHaloSuppress().
#define XENH_HALOSUPPRESS_MAX 32768 |
#define XENH_HALOSUPPRESS_MIN 0 |
#include <xenhance.h>
Halo Suppress starting value.
#define XENH_HSIZE_FIRST 32 |
#define XENH_HSIZE_LAST 7680 |
#define XENH_IER_OFFSET XENH_IRQ_EN_OFFSET |
#include <xenhance_hw.h>
Interrupt Enable Register corresponds to Status bits.
#define XENH_IRQ_EN_OFFSET 0x000C |
#include <xenhance_hw.h>
IRQ Enable 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
#define XENH_IXR_ALLINTR_MASK 0x00010003 |
#include <xenhance_hw.h>
OR'ing of all Mask.
#define XENH_IXR_EOF_MASK 0x00000002 |
#define XENH_IXR_PROCS_STARTED_MASK 0x00000001 |
#define XENH_IXR_SE_MASK 0x00010000 |
#define XENH_NOISE_THRESHOLD_MASK 0x0000FFFF |
#define XENH_NOISE_THRESHOLD_OFFSET 0x0100 |
#include <xenhance_hw.h>
Noise Reduction Control Active.
Referenced by XEnhance_GetNoiseThreshold(), and XEnhance_SetNoiseThreshold().
#define XENH_NOISETHRES_MAX 255 |
#define XENH_NOISETHRES_MIN 0 |
#include <xenhance.h>
Noise threshold starting value.
#define XENH_STATUS_OFFSET 0x0004 |
#include <xenhance_hw.h>
Status Offset.
#define XENH_STRENGTH_MASK 0x0000FFFF |
#define XENH_SYSDEBUG0_OFFSET 0x0014 |
#define XENH_SYSDEBUG1_OFFSET 0x0018 |
#define XENH_SYSDEBUG2_OFFSET 0x001C |
#define XENH_VER_INTERNAL_SHIFT 8 |
#include <xenhance_hw.h>
Version Internal Shift.
#define XENH_VER_MAJOR_MASK 0xFF000000 |
#include <xenhance_hw.h>
Version Major Mask.
#define XENH_VER_MAJOR_SHIFT 24 |
#include <xenhance_hw.h>
Version Major Shift.
#define XENH_VER_MINOR_MASK 0x00FF0000 |
#include <xenhance_hw.h>
Version Minor Mask.
#define XENH_VER_MINOR_SHIFT 16 |
#include <xenhance_hw.h>
Version Minor Shift.
#define XENH_VER_PID_MASK 0x00000F00 |
#include <xenhance_hw.h>
Patch ID Mask.
#define XENH_VER_REV_MASK 0x0000F000 |
#include <xenhance_hw.h>
VersionRevision Mask.
#define XENH_VER_REV_NUM_MASK 0x000000FF |
#include <xenhance_hw.h>
Revision Number Mask.
#define XENH_VER_REV_SHIFT 12 |
#include <xenhance_hw.h>
Version Revision Shift.
#define XENH_VERSION_OFFSET 0x0010 |
#include <xenhance_hw.h>
Version Offset.
Referenced by XEnhance_GetVersion(), and XEnhance_SelfTest().
#define XENH_VSIZE_FIRST 32 |
#define XENH_VSIZE_LAST 7680 |
#define XEnhance_Disable | ( | InstancePtr | ) |
#include <xenhance.h>
This function macro disables the Image Enhancement core instance.
InstancePtr | is a pointer to the Enhance core instance to be worked on. |
#define XEnhance_Enable | ( | InstancePtr | ) |
#include <xenhance.h>
This function macro enables the Image Enhancement core instance.
InstancePtr | is a pointer to the Enhance core instance to be worked on. |
#define XENHANCE_H_ |
#include <xenhance.h>
Prevent circular inclusions by using protection macros.
#define XENHANCE_HW_H_ |
#include <xenhance_hw.h>
Prevent circular inclusions by using protection macros.
#define XEnhance_In32 Xil_In32 |
#include <xenhance_hw.h>
Enhance Input Operation.
#define XEnhance_IntrClear | ( | InstancePtr, | |
IntrType | |||
) |
#include <xenhance.h>
This function macro clears/acknowledges pending interrupts of a Enhance core.
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. |
Referenced by XEnhance_IntrHandler().
#define XEnhance_IntrDisable | ( | InstancePtr, | |
IntrType | |||
) |
#include <xenhance.h>
This function macro disables the given individual interrupt(s) on the Enhance core by updating Irq_Enable register.
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. |
#define XEnhance_IntrEnable | ( | InstancePtr, | |
IntrType | |||
) |
#include <xenhance.h>
This function macro enables the given individual interrupt(s) on the Enhance core.
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. |
#define XEnhance_IntrGetPending | ( | InstancePtr | ) |
#include <xenhance.h>
This function macro returns the pending interrupts of a Enhance core.
InstancePtr | is a pointer to the Enhance core instance to be worked on. |
Referenced by XEnhance_IntrHandler().
#define XEnhance_Out32 Xil_Out32 |
#include <xenhance_hw.h>
Enhance Output Operation.
#define XEnhance_ReadReg | ( | BaseAddress, | |
RegOffset | |||
) | XEnhance_In32((BaseAddress) + (u32)(RegOffset)) |
#include <xenhance_hw.h>
This function macro reads the given register.
BaseAddress | is the base address of the Image Enhancement core. |
RegOffset | is the register offset of the core (defined at. top of this file). |
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 | ) |
#include <xenhance.h>
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.
InstancePtr | is a pointer to the Enhance core instance to be worked on. |
Referenced by XEnhance_Setup().
#define XEnhance_RegUpdateEnable | ( | InstancePtr | ) |
#include <xenhance.h>
This function macro commits all the register value changes made so far by the software to the Image Enhancement core instance.
InstancePtr | is a pointer to the Enhance core instance to be worked on. |
Referenced by XEnhance_Setup().
#define XEnhance_Reset | ( | InstancePtr | ) |
#include <xenhance.h>
This function macro resets a Image Enhancement core instance.
This reset effects the core immediately, and may cause image tearing.
InstancePtr | is a pointer to the Enhance core instance to be worked on. |
#define XEnhance_Start XEnhance_Enable |
#include <xenhance.h>
This function macro starts the Image Enhancement core instance.
InstancePtr | is a pointer to the Enhance core instance to be worked on. |
#define XEnhance_StatusGetPending | ( | InstancePtr | ) |
#include <xenhance.h>
This function macro returns the pending status of a Enhance core.
InstancePtr | is a pointer to the Enhance core instance to be worked on. |
#define XEnhance_Stop XEnhance_Disable |
#include <xenhance.h>
This function macro stops the Image Enhancement core instance.
InstancePtr | is a pointer to the Enhance core instance to be worked on. |
#define XEnhance_SyncReset | ( | InstancePtr | ) |
#include <xenhance.h>
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.
InstancePtr | is a pointer to the Enhance core instance to be worked on. |
#define XEnhance_WriteReg | ( | BaseAddress, | |
RegOffset, | |||
Data | |||
) | XEnhance_Out32((BaseAddress) + (u32)(RegOffset), (Data)) |
#include <xenhance_hw.h>
This function macro writes the given register.
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. |
Referenced by XEnhance_DisableDbgBypass(), XEnhance_DisableDbgTestPattern(), XEnhance_EnableDbgByPass(), XEnhance_EnableDbgTestPattern(), XEnhance_SetActiveSize(), XEnhance_SetEdgeStrength(), XEnhance_SetHaloSuppress(), XEnhance_SetNoiseThreshold(), and XEnhance_Setup().
typedef void(* XEnhance_CallBack) (void *CallBackRef) |
#include <xenhance.h>
Callback type for all interrupts except error interrupt.
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) |
#include <xenhance.h>
Callback type for Error interrupt.
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 |
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. |
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.
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. |
References XEnhance_Config::BaseAddress, XEnhance::Config, InstancePtr, and XEnhance::ProcStartCallBack.
Referenced by XEnhanceSelfTestExample().
void XEnhance_DisableDbgBypass | ( | XEnhance * | InstancePtr | ) |
#include <xenhance.c>
This function disables Bypass mode of the Enhance core.
InstancePtr | is a pointer to XEnhance instance to be worked on. |
References XENH_CONTROL_OFFSET, XENH_CTL_BPE_MASK, XEnhance_ReadReg, and XEnhance_WriteReg.
void XEnhance_DisableDbgTestPattern | ( | XEnhance * | InstancePtr | ) |
#include <xenhance.c>
This function disables the test Pattern mode of the Enhance core.
InstancePtr | is a pointer to XEnhance instance to be worked on. |
References XENH_CONTROL_OFFSET, XENH_CTL_TPE_MASK, XEnhance_ReadReg, and XEnhance_WriteReg.
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.
InstancePtr | is a pointer to XEnhance instance to be worked on. |
References XENH_CONTROL_OFFSET, XENH_CTL_BPE_MASK, XEnhance_ReadReg, and XEnhance_WriteReg.
void XEnhance_EnableDbgTestPattern | ( | XEnhance * | InstancePtr | ) |
#include <xenhance.c>
This function sets the test-pattern mode of the Enhance core if debug features is enabled.
InstancePtr | is a pointer to XEnhance instance to be worked on. |
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 | ||
) |
#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.
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). |
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 | ) |
#include <xenhance.c>
This function gets number of frames processed since power-up or last time the core is reset.
InstancePtr | is a pointer to XEnhance instance to be worked on. |
References XEnhance_Config::BaseAddress, XEnhance::Config, XEnhance_Config::HasDebug, XENH_SYSDEBUG0_OFFSET, and XEnhance_ReadReg.
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.
InstancePtr | is a pointer to XEnhance instance to be worked on. |
References XEnhance_Config::BaseAddress, XEnhance::Config, XEnhance_Config::HasDebug, XENH_SYSDEBUG1_OFFSET, and XEnhance_ReadReg.
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.
InstancePtr | is a pointer to XEnhance instance to be worked on. |
References XEnhance_Config::BaseAddress, XEnhance::Config, XEnhance_Config::HasDebug, XENH_SYSDEBUG2_OFFSET, and XEnhance_ReadReg.
u32 XEnhance_GetEdgeStrength | ( | XEnhance * | InstancePtr | ) |
#include <xenhance.c>
This function gets the Edge Strength value for the Enhance core.
InstancePtr | is a pointer to XEnhance instance to be worked on. |
References XEnhance_Config::BaseAddress, XEnhance::Config, XENH_ENHANCE_STRENGTH_OFFSET, XENH_STRENGTH_MASK, and XEnhance_ReadReg.
u32 XEnhance_GetHaloSuppress | ( | XEnhance * | InstancePtr | ) |
#include <xenhance.c>
This function gets the Halo Suppress value for the Enhance core.
InstancePtr | is a pointer to XEnhance instance to be worked on. |
References XEnhance_Config::BaseAddress, XEnhance::Config, XENH_HALO_SUPPRESS_MASK, XENH_HALO_SUPPRESS_OFFSET, and XEnhance_ReadReg.
u32 XEnhance_GetNoiseThreshold | ( | XEnhance * | InstancePtr | ) |
#include <xenhance.c>
This function gets the Noise Threshold value for the Enhance core.
InstancePtr | is a pointer to XEnhance instance to be worked on. |
References XENH_NOISE_THRESHOLD_MASK, XENH_NOISE_THRESHOLD_OFFSET, and XEnhance_ReadReg.
u32 XEnhance_GetVersion | ( | XEnhance * | InstancePtr | ) |
#include <xenhance.c>
This function returns the contents of Version register.
InstancePtr | is a pointer to XEnhance instance to be worked on. |
References XENH_VERSION_OFFSET, and XEnhance_ReadReg.
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.
InstancePtr | is a pointer to the XEnhance instance that just interrupted. |
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 | ) |
#include <xenhance.c>
This function gets the current status of the bypass setting of the Enhance core.
InstancePtr | is a pointer to XEnhance instance to be worked on. |
References XENH_CONTROL_OFFSET, XENH_CTL_BPE_MASK, and XEnhance_ReadReg.
int XEnhance_IsDbgTestPatternEnabled | ( | XEnhance * | InstancePtr | ) |
#include <xenhance.c>
This function gets the test-pattern mode if debug feature is enabled.
InstancePtr | is a pointer to XEnhance instance to be worked on. |
References XEnhance::Config, XEnhance_Config::HasDebug, XENH_CONTROL_OFFSET, XENH_CTL_TPE_MASK, and XEnhance_ReadReg.
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.
DeviceId | is the unique device ID of the device for the lookup operation. |
Referenced by XEnhanceSelfTestExample().
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.
InstancePtr | is a pointer to the XEnhance instance to be worked on. |
References XENH_VERSION_OFFSET, and XEnhance_ReadReg.
Referenced by XEnhanceSelfTestExample().
void XEnhance_SetActiveSize | ( | XEnhance * | InstancePtr, |
u16 | HSize, | ||
u16 | VSize | ||
) |
#include <xenhance.c>
This function sets active H/V sizes in the Active size register.
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. |
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 | ||
) |
#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
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. |
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 | ||
) |
#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.
InstancePtr | is a pointer to XEnhance instance to be worked on. |
Strength | is the value to set the Edge Strength of the core. |
References XENH_ENHANCE_STRENGTH_OFFSET, XENH_ENHSTRENGTH_MAX, and XEnhance_WriteReg.
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.
InstancePtr | is a pointer to XEnhance instance to be worked on. |
Suppress | is the value to set the Suppression value. |
References XENH_HALO_SUPPRESS_OFFSET, XENH_HALOSUPPRESS_MAX, and XEnhance_WriteReg.
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.
InstancePtr | is a pointer to XEnhance instance to be worked on. |
Threshold | is the value to set the Noise Threshold. |
References XENH_NOISE_THRESHOLD_OFFSET, XENH_NOISETHRES_MAX, and XEnhance_WriteReg.
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.
InstancePtr | is a pointer to XEnhance instance to be worked on. |
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.