#include "xil_assert.h"
#include "xstatus.h"
#include "xtpg_hw.h"
Classes | |
struct | XTpg_Config |
struct | XTpg |
Motion Speed Ranges | |
#define | XTPG_MOTION_SPEED_MIN 0 |
#define | XTPG_MOTION_SPEED_MAX 255 |
Active Size Ranges | |
#define | XTPG_VSIZE_FIRST 32 |
#define | XTPG_VSIZE_LAST 7680 |
#define | XTPG_HSIZE_FIRST 32 |
#define | XTPG_HSIZE_LAST 7680 |
Macros for operating a TPG core | |
#define | XTpg_Enable(InstancePtr) |
#define | XTpg_Disable(InstancePtr) |
#define | XTpg_Start XTpg_Enable |
#define | XTpg_Stop XTpg_Disable |
#define | XTpg_RegUpdateEnable(InstancePtr) |
#define | XTpg_RegUpdateDisable(InstancePtr) |
#define | XTpg_SyncReset(InstancePtr) |
#define | XTpg_Reset(InstancePtr) |
#define | XTpg_IntrEnable(InstancePtr, IntrType) |
#define | XTpg_IntrDisable(InstancePtr, IntrType) |
#define | XTpg_StatusGetPending(InstancePtr) |
#define | XTpg_IntrGetPending(InstancePtr) |
#define | XTpg_IntrClear(InstancePtr, IntrType) |
Handler Types | |
enum | { XTPG_HANDLER_PROCSTART = 1, XTPG_HANDLER_FRAMEDONE, XTPG_HANDLER_ERROR } |
BackgroundPattern | |
enum | XTpg_BackgroundPattern { XTPG_PASS_THROUGH, XTPG_H_RAMP, XTPG_V_RAMP, XTPG_T_RAMP, XTPG_RED_PLANE, XTPG_GREEN_PLANE, XTPG_BLUE_PLANE, XTPG_BLACK_PLANE, XTPG_WHITE_PLANE, XTPG_COLOR_BARS, XTPG_ZONE_PLATE, XTPG_TARAN_BARS, XTPG_CROSS_HATCH, XTPG_HV_RAMP = 0xE, XTPG_BLACK_AND_WHITE_CHECKERBOARD } |
ComponentMask | |
enum | XTpg_ComponentMask { XTPG_NOMASK, XTPG_MASKOUT_RED, XTPG_MASKOUT_GREEN, XTPG_MASKOUT_BLUE = 0x4 } |
Bayer phase combinations | |
enum | XTpg_BayerPhaseCombination { XTPG_BAYER_PHASE_RGRG, XTPG_BAYER_PHASE_GRGR, XTPG_BAYER_PHASE_GBGB, XTPG_BAYER_PHASE_BGBG, XTPG_BAYER_PHASE_TURNOFF } |
Defines | |
#define | XTPG_H_ |
Typedefs | |
typedef void(*) | XTpg_CallBack (void *CallBackRef) |
typedef void(*) | XTpg_ErrorCallBack (void *CallBackRef, u32 ErrorMask) |
Functions | |
XTpg_Config * | XTpg_LookupConfig (u16 DeviceId) |
int | XTpg_CfgInitialize (XTpg *InstancePtr, XTpg_Config *CfgPtr, u32 EffectiveAddr) |
void | XTpg_Setup (XTpg *InstancePtr) |
u32 | XTpg_GetVersion (XTpg *InstancePtr) |
void | XTpg_SetActiveSize (XTpg *InstancePtr, u16 HSize, u16 VSize) |
void | XTpg_GetActiveSize (XTpg *InstancePtr, u16 *HSize, u16 *VSize) |
void | XTpg_SetPattern (XTpg *InstancePtr, u32 Pattern) |
u32 | XTpg_GetPattern (XTpg *InstancePtr) |
void | XTpg_SetBackground (XTpg *InstancePtr, enum XTpg_BackgroundPattern Pattern) |
u32 | XTpg_GetBackground (XTpg *InstancePtr) |
void | XTpg_EnableCrossHair (XTpg *InstancePtr) |
void | XTpg_DisableCrossHair (XTpg *InstancePtr) |
void | XTpg_EnableMotion (XTpg *InstancePtr) |
void | XTpg_DisableMotion (XTpg *InstancePtr) |
void | XTpg_EnableBox (XTpg *InstancePtr) |
void | XTpg_DisableBox (XTpg *InstancePtr) |
void | XTpg_SetComponentMask (XTpg *InstancePtr, enum XTpg_ComponentMask Mask) |
u32 | XTpg_GetComponentMask (XTpg *InstancePtr) |
void | XTpg_EnableStuckPixel (XTpg *InstancePtr) |
void | XTpg_DisableStuckPixel (XTpg *InstancePtr) |
void | XTPg_EnableNoise (XTpg *InstancePtr) |
void | XTPg_DisableNoise (XTpg *InstancePtr) |
void | XTpg_SetMotionSpeed (XTpg *InstancePtr, u32 MotionSpeed) |
u32 | XTpg_GetMotionSpeed (XTpg *InstancePtr) |
void | XTpg_SetCrosshairPosition (XTpg *InstancePtr, u16 HPos, u16 VPos) |
void | XTpg_GetCrosshairPosition (XTpg *InstancePtr, u16 *HPos, u16 *VPos) |
void | XTpg_SetZPlateHStart (XTpg *InstancePtr, u16 ZPlateHStart) |
u16 | XTpg_GetZPlateHStart (XTpg *InstancePtr) |
void | XTpg_SetZPlateHSpeed (XTpg *InstancePtr, u16 ZPlateHSpeed) |
u16 | XTpg_GetZPlateHSpeed (XTpg *InstancePtr) |
void | XTpg_SetZPlateVStart (XTpg *InstancePtr, u16 ZPlateVStart) |
u16 | XTpg_GetZPlateVStart (XTpg *InstancePtr) |
void | XTpg_SetZPlateVSpeed (XTpg *InstancePtr, u16 ZPlateVSpeed) |
u16 | XTpg_GetZPlateVSpeed (XTpg *InstancePtr) |
int | XTpg_SetBoxSize (XTpg *InstancePtr, u32 BoxSize) |
u32 | XTpg_GetBoxSize (XTpg *InstancePtr) |
void | XTpg_SetBoxColor (XTpg *InstancePtr, u16 Blue, u16 Green, u16 Red) |
void | XTpg_GetBoxColor (XTpg *InstancePtr, u16 *Blue, u16 *Green, u16 *Red) |
void | XTpg_SetStuckPixelThreshold (XTpg *InstancePtr, u32 PixelThreshold) |
u32 | XTpg_GetStuckPixelThreshold (XTpg *InstancePtr) |
void | XTpg_SetNoiseGain (XTpg *InstancePtr, u32 NoiseGain) |
u32 | XTpg_GetNoiseGain (XTpg *InstancePtr) |
void | XTpg_SetBayerPhase (XTpg *InstancePtr, enum XTpg_BayerPhaseCombination BayerPhaseComb) |
u32 | XTpg_GetBayerPhase (XTpg *InstancePtr) |
int | XTpg_SelfTest (XTpg *InstancePtr) |
void | XTpg_IntrHandler (void *InstancePtr) |
int | XTpg_SetCallBack (XTpg *InstancePtr, u32 HandlerType, void *CallBackFunc, void *CallBackRef) |
#define XTpg_Disable | ( | InstancePtr | ) |
Value:
XTpg_WriteReg((InstancePtr)->Config.BaseAddress, \ (XTPG_CONTROL_OFFSET), \ (XTpg_ReadReg((InstancePtr)->Config.BaseAddress, \ (XTPG_CONTROL_OFFSET)) & \ (~(XTPG_CTL_SW_EN_MASK))))
InstancePtr | is a pointer to the XTpg instance to be worked on. |
#define XTpg_Enable | ( | InstancePtr | ) |
Value:
XTpg_WriteReg((InstancePtr)->Config.BaseAddress, \ (XTPG_CONTROL_OFFSET), \ (XTpg_ReadReg((InstancePtr)->Config.BaseAddress, \ (XTPG_CONTROL_OFFSET)) | (XTPG_CTL_SW_EN_MASK)))
InstancePtr | is a pointer to the XTpg instance to be worked on. |
#define XTPG_H_ |
Prevent circular inclusions by using protection macros
#define XTPG_HSIZE_FIRST 32 |
Horizontal Size starting value
#define XTPG_HSIZE_LAST 7680 |
Horizontal Size ending value
#define XTpg_IntrClear | ( | InstancePtr, | |||
IntrType | ) |
Value:
XTpg_WriteReg((InstancePtr)->Config.BaseAddress, \ (XTPG_STATUS_OFFSET),\ (IntrType) & ((u32)(XTPG_IXR_ALLINTR_MASK)))
InstancePtr | is a pointer to the XTpg instance to be worked on. | |
IntrType | is the pending interrupts to clear/acknowledge. Use OR'ing of XTPG_IXR_*_MASK constants defined in xtpg_hw.h to create this parameter value. |
#define XTpg_IntrDisable | ( | InstancePtr, | |||
IntrType | ) |
Value:
XTpg_WriteReg((InstancePtr)->Config.BaseAddress, (XTPG_IRQ_EN_OFFSET),\ XTpg_ReadReg((InstancePtr)->Config.BaseAddress, \ (XTPG_IRQ_EN_OFFSET)) & ((~(IntrType)) & \ (XTPG_IXR_ALLINTR_MASK)))
InstancePtr | is a pointer to the XTpg 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 XTPG_IXR_*_MASK bits defined in xtpg_hw.h. |
#define XTpg_IntrEnable | ( | InstancePtr, | |||
IntrType | ) |
Value:
XTpg_WriteReg((InstancePtr)->Config.BaseAddress, (XTPG_IRQ_EN_OFFSET),\ ((IntrType) & (XTPG_IXR_ALLINTR_MASK)) | \ (XTpg_ReadReg((InstancePtr)->Config.BaseAddress, \ (XTPG_IRQ_EN_OFFSET))))
InstancePtr | is a pointer to the XTpg 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 XTPG_IXR_*_MASK bits defined in xtpg_hw.h. |
#define XTpg_IntrGetPending | ( | InstancePtr | ) |
Value:
XTpg_ReadReg((InstancePtr)->Config.BaseAddress, \ (XTPG_IRQ_EN_OFFSET)) &\ (XTpg_ReadReg((InstancePtr)->Config.BaseAddress, \ (XTPG_STATUS_OFFSET)) & ((u32)XTPG_IXR_ALLINTR_MASK))
InstancePtr | is a pointer to the XTpg instance to be worked on. |
#define XTPG_MOTION_SPEED_MAX 255 |
Motion Speed maximum value
#define XTPG_MOTION_SPEED_MIN 0 |
Motion Speed minimum value
#define XTpg_RegUpdateDisable | ( | InstancePtr | ) |
Value:
XTpg_WriteReg((InstancePtr)->Config.BaseAddress, \ (XTPG_CONTROL_OFFSET), \ (XTpg_ReadReg((InstancePtr)->Config.BaseAddress, \ (XTPG_CONTROL_OFFSET)) & (~(XTPG_CTL_RUE_MASK))))
This function only works when the TPG core is enabled.
InstancePtr | is a pointer to the XTpg instance to be worked on. |
#define XTpg_RegUpdateEnable | ( | InstancePtr | ) |
Value:
XTpg_WriteReg((InstancePtr)->Config.BaseAddress, \ (XTPG_CONTROL_OFFSET), \ (XTpg_ReadReg((InstancePtr)->Config.BaseAddress, \ (XTPG_CONTROL_OFFSET)) | (XTPG_CTL_RUE_MASK)))
This function only works when the TPG core is enabled.
InstancePtr | is a pointer to the XTpg instance to be worked on. |
#define XTpg_Reset | ( | InstancePtr | ) |
Value:
XTpg_WriteReg((InstancePtr)->Config.BaseAddress, \ (XTPG_CONTROL_OFFSET), (XTPG_CTL_RESET_MASK))
InstancePtr | is a pointer to the XTpg instance to be worked on. |
#define XTpg_Start XTpg_Enable |
This function macro enables/starts the TPG core.
InstancePtr | is a pointer to the XTpg instance to be worked on. |
#define XTpg_StatusGetPending | ( | InstancePtr | ) |
Value:
XTpg_ReadReg((InstancePtr)->Config.BaseAddress, \ (XTPG_STATUS_OFFSET)) & \ (XTPG_IXR_ALLINTR_MASK)
InstancePtr | is a pointer to the XTpg instance to be worked on. |
#define XTpg_Stop XTpg_Disable |
This function macro disables/stops the TPG core.
InstancePtr | is a pointer to the XTpg instance to be worked on. |
#define XTpg_SyncReset | ( | InstancePtr | ) |
Value:
XTpg_WriteReg(((InstancePtr)->Config.BaseAddress), \ (XTPG_CONTROL_OFFSET), (XTPG_CTL_AUTORESET_MASK))
On the next rising-edge of SOF following a call to XTpg_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 XTpg instance to be worked on. |
#define XTPG_VSIZE_FIRST 32 |
Vertical Size starting value
#define XTPG_VSIZE_LAST 7680 |
Vertical Size ending value
typedef void(*) XTpg_CallBack(void *CallBackRef) |
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(*) XTpg_ErrorCallBack(void *CallBackRef, u32 ErrorMask) |
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 XTPG_IXR_*_MASK values defined in xtpg_hw.h. |
anonymous enum |
These constants specify different types of background patterns supported by the core.
These constants specify Bayer phase combinations of the core.
enum XTpg_ComponentMask |
int XTpg_CfgInitialize | ( | XTpg * | InstancePtr, | |
XTpg_Config * | CfgPtr, | |||
u32 | EffectiveAddr | |||
) |
This function initializes the TPG core. This function must be called prior to using the TPG core. Initialization of the TPG includes setting up the instance data and ensuring the hardware is in a quiescent state.
InstancePtr | is a pointer to the XTpg instance. | |
CfgPtr | is a reference to a structure containing information about a specific XTpg instace. | |
EffectiveAddr | is the core base address in the virtual memory address space. The caller is responsible for keeping the address mapping from EffectiveAddr to the core physical base address unchanged once this function is invoked. Unexpected errors may occur if the address mapping changes after this function is called. If address translation is not used, pass in the physical address instead. |
void XTpg_DisableBox | ( | XTpg * | InstancePtr | ) |
This function disables the Moving Box feature in the Pattern Control Register of the TPG core.
InstancePtr | is a pointer to the XTpg instance. |
void XTpg_DisableCrossHair | ( | XTpg * | InstancePtr | ) |
This function disables the drawing of Cross Hairs feature in the Pattern Control Register of the TPG core.
InstancePtr | is a pointer to the XTpg instance. |
void XTpg_DisableMotion | ( | XTpg * | InstancePtr | ) |
This function disables the Motion feature in the Pattern Control register of the TPG core.
InstancePtr | is a pointer to the XTpg instance. |
void XTPg_DisableNoise | ( | XTpg * | InstancePtr | ) |
This function disables the Noise on the output by disabling this feature in Pattern Control register of the TPG core.
InstancePtr | is a pointer to the XTpg instance. |
void XTpg_DisableStuckPixel | ( | XTpg * | InstancePtr | ) |
This function disables the Stuck Pixel feature in the Pattern Control register of the TPG core.
InstancePtr | is a pointer to the XTpg instance. |
void XTpg_EnableBox | ( | XTpg * | InstancePtr | ) |
This function enables the Moving Box feature in the Pattern Control Register of the TPG core.
InstancePtr | is a pointer to the XTpg instance. |
void XTpg_EnableCrossHair | ( | XTpg * | InstancePtr | ) |
This function enables the drawing of Cross Hairs feature in the Pattern Control Register of the TPG core.
InstancePtr | is a pointer to the XTpg instance. |
void XTpg_EnableMotion | ( | XTpg * | InstancePtr | ) |
This function enables the Motion Feature in the Pattern Control register of the TPG core.
InstancePtr | is a pointer to the XTpg instance. |
void XTPg_EnableNoise | ( | XTpg * | InstancePtr | ) |
This function enables the Noise on the output by setting value in Pattern Control register of the TPG core.
InstancePtr | is a pointer to the XTpg instance. |
void XTpg_EnableStuckPixel | ( | XTpg * | InstancePtr | ) |
This function enables the Stuck Pixel Feature in the Pattern Control Register of the TPG core.
InstancePtr | is a pointer to the XTpg instance. |
void XTpg_GetActiveSize | ( | XTpg * | 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 Size register.
InstancePtr | is a pointer to the XTpg instance. | |
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). |
u32 XTpg_GetBackground | ( | XTpg * | InstancePtr | ) |
This function gets the background pattern for TPG core.
InstancePtr | is a pointer to the XTpg instance. |
u32 XTpg_GetBayerPhase | ( | XTpg * | InstancePtr | ) |
This function returns the Bayer phase value which indicates starting pixel position.
InstancePtr | is a pointer to the XTpg instance. |
void XTpg_GetBoxColor | ( | XTpg * | InstancePtr, | |
u16 * | Blue, | |||
u16 * | Green, | |||
u16 * | Red | |||
) |
This function gets the color components of the box in the Box Color register of the TPG core.
InstancePtr | is a pointer to the XTpg instance. | |
Blue | is a pointer to 16 bit color component of the box in which blue or Y (for YCbCr mode) is returned. | |
Green | is a pointer to 16 bit color component of the box in which Green or Cr (for YCbCr mode) is returned. | |
Red | is a pointer to 16 bit color component of the box in which Red or Cb (for YCbCr mode) is returned. |
u32 XTpg_GetBoxSize | ( | XTpg * | InstancePtr | ) |
This function gets the Box Size in pixel.
InstancePtr | is a pointer to the XTpg instance. |
u32 XTpg_GetComponentMask | ( | XTpg * | InstancePtr | ) |
This function returns the color component mask status in the Pattern Control Register.
InstancePtr | is a pointer to the XTpg instance. |
void XTpg_GetCrosshairPosition | ( | XTpg * | InstancePtr, | |
u16 * | HPos, | |||
u16 * | VPos | |||
) |
This function gets the cross hair positions.
InstancePtr | is a pointer to the XTpg instance. | |
HPos | is the row of the frame that will have horizontal line of Cross Hairs is returned. | |
VPos | is the column of the frame that will have vertical line of Cross Hairs is returned. |
u32 XTpg_GetMotionSpeed | ( | XTpg * | InstancePtr | ) |
This function gets the Motion Speed.
InstancePtr | is a pointer to the XTpg instance. |
u32 XTpg_GetNoiseGain | ( | XTpg * | InstancePtr | ) |
This function gets the noise gain of each component of TPG core.
InstancePtr | is a pointer to the XTpg instance. |
u32 XTpg_GetPattern | ( | XTpg * | InstancePtr | ) |
This function returns the contents of the Pattern Control Register.
InstancePtr | is a pointer to the XTpg instance. |
u32 XTpg_GetStuckPixelThreshold | ( | XTpg * | InstancePtr | ) |
This function gets the stuck pixel threshold in the STUCK_PIXEL_THRESH register of the TPG core.
InstancePtr | is a pointer to the XTpg instance. |
u32 XTpg_GetVersion | ( | XTpg * | InstancePtr | ) |
This function returns the contents of the Version register of the TPG core.
InstancePtr | is a pointer to the XTpg instance to be worked on. |
u16 XTpg_GetZPlateHSpeed | ( | XTpg * | InstancePtr | ) |
This function gets how fast (the speed of) horizontal component changes.
InstancePtr | is a pointer to the XTpg instance. |
u16 XTpg_GetZPlateHStart | ( | XTpg * | InstancePtr | ) |
This function gets a starting point in the ROM based sinusoidal values for the horizontal component.
InstancePtr | is a pointer to the XTpg instance. |
u16 XTpg_GetZPlateVSpeed | ( | XTpg * | InstancePtr | ) |
This function gets how fast (the speed of) the vertical component changes.
InstancePtr | is a pointer to the XTpg instance. |
u16 XTpg_GetZPlateVStart | ( | XTpg * | InstancePtr | ) |
This function gets a starting point in the ROM based sinusoidal values for the vertical component.
InstancePtr | is a pointer to the XTpg instance. |
void XTpg_IntrHandler | ( | void * | InstancePtr | ) |
This function is the interrupt handler for the TPG driver.
This handler reads the pending interrupt from the STATUS register, determines the source of the interrupts and calls the respective callbacks for the interrupts that are enabled in IRQ_ENABLE register, and finally clears the interrupts.
The application is responsible for connecting this function to the interrupt system. Application beyond this driver is also responsible for providing callbacks to handle interrupts and installing the callbacks using XTpg_SetCallBack() during initialization phase.
InstancePtr | is a pointer to the XTpg instance that just interrupted. |
XTpg_Config* XTpg_LookupConfig | ( | u16 | DeviceId | ) |
This function returns a reference to an XTpg_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 xtpg_g.c file.
DeviceId | is the unique Device ID of the device for the lookup operation. |
int XTpg_SelfTest | ( | XTpg * | InstancePtr | ) |
This function reads Version register of TPG core and compares with zero as part of self test.
InstancePtr | is a pointer to the TPG instance. |
void XTpg_SetActiveSize | ( | XTpg * | InstancePtr, | |
u16 | HSize, | |||
u16 | VSize | |||
) |
This function sets the active H/V sizes in the Active Size register.
InstancePtr | is a pointer to the XTpg instance. | |
HSize | specifies the number of Active Pixels per Scan Line that needs to be set (Range is 32 to 7680). | |
VSize | specifies the number of Active Lines per Frame that needs to be set (Range is 32 to 7680). |
void XTpg_SetBackground | ( | XTpg * | InstancePtr, | |
enum XTpg_BackgroundPattern | Pattern | |||
) |
This function sets the background pattern in the Pattern Control Register.
InstancePtr | is a pointer to the XTpg instance. | |
Pattern | is the pattern to be generated. The enum values to be used for the patterns are :
|
void XTpg_SetBayerPhase | ( | XTpg * | InstancePtr, | |
enum XTpg_BayerPhaseCombination | BayerPhaseComb | |||
) |
This function specifies or sets whether the starting position pixel(0,0) of the Bayer sampling grid is on a red-green or blue-green line and whether the first pixel is green or not.
InstancePtr | is a pointer to the XTpg instance. | |
BayerPhaseComb | is Bayer phase value to be set to identify starting pixel position. The enum values of Bayer phase are
|
void XTpg_SetBoxColor | ( | XTpg * | InstancePtr, | |
u16 | Blue, | |||
u16 | Green, | |||
u16 | Red | |||
) |
This function sets the color components of the box in the Box Color register of the TPG core.
InstancePtr | is a pointer to the XTpg instance. | |
Blue | is the color component of the box which needs to be set. | |
Green | is the color component of the box which needs to be set. | |
Red | is the color component of the box which needs to be set. |
int XTpg_SetBoxSize | ( | XTpg * | InstancePtr, | |
u32 | BoxSize | |||
) |
This function sets the Box Size.
InstancePtr | is a pointer to the XTpg instance. | |
BoxSize | is size of the box in pixel. |
int XTpg_SetCallBack | ( | XTpg * | InstancePtr, | |
u32 | HandlerType, | |||
void * | CallBackFunc, | |||
void * | CallBackRef | |||
) |
This function installs an asynchronous callback function for the given HandlerType.
HandlerType Callback Function Type ----------------------- ---------------------- XTPG_HANDLER_FRAMEDONE FrameDoneCallBack XTPG_HANDLER_PROCSTART ProcStartCallBack XTPG_HANDLER_ERROR ErrCallBack
InstancePtr | is a pointer to the XTpg 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. |
void XTpg_SetComponentMask | ( | XTpg * | InstancePtr, | |
enum XTpg_ComponentMask | Mask | |||
) |
This function masks out the specified color component by setting the Pattern Control Register of the TPG core.
InstancePtr | is a pointer to the XTpg instance. | |
Mask | specifies the ComponentMask that needs to be set. the enum values as
|
void XTpg_SetCrosshairPosition | ( | XTpg * | InstancePtr, | |
u16 | HPos, | |||
u16 | VPos | |||
) |
This function sets the Cross Hairs Positions.
InstancePtr | is a pointer to the XTpg instance. | |
HPos | is the row of the frame that will have horizontal line of Cross Hairs that need to be set. | |
VPos | is the column of the frame that will have vertical line of Cross Hairs that need to be set. |
void XTpg_SetMotionSpeed | ( | XTpg * | InstancePtr, | |
u32 | MotionSpeed | |||
) |
This function sets the Motion Speed.
InstancePtr | is a pointer to the XTpg instance. | |
MotionSpeed | is how fast the temporal features of supported test pattern changes from frame to frame which need to be set. Range is 0 to 255. |
void XTpg_SetNoiseGain | ( | XTpg * | InstancePtr, | |
u32 | NoiseGain | |||
) |
This function sets the noise gain in Noise Gain register of the TPG core.
InstancePtr | is a pointer to the XTpg instance. | |
NoiseGain | is a value to increase the noise added to each component which needs to be set. |
void XTpg_SetPattern | ( | XTpg * | InstancePtr, | |
u32 | Pattern | |||
) |
This function sets the Pattern Control Register of TPG core.
InstancePtr | is a pointer to the XTpg instance. | |
Pattern | is the 32 bit value to be written to the Pattern Control Register. |
void XTpg_SetStuckPixelThreshold | ( | XTpg * | InstancePtr, | |
u32 | PixelThreshold | |||
) |
This function sets the stuck pixel threshold in STUCK_PIXEL_THRESH register of the TPG core.
InstancePtr | is a pointer to the XTpg instance. | |
PixelThreshold | is an upper limit for PRNG for insertion of stuck pixel which needs to be set. |
void XTpg_Setup | ( | XTpg * | InstancePtr | ) |
This function sets the input/output frame size in Active Size register and enables the register update.
InstancePtr | is a pointer to the XTpg instance. |
void XTpg_SetZPlateHSpeed | ( | XTpg * | InstancePtr, | |
u16 | ZPlateHSpeed | |||
) |
This function sets how fast (the speed of) the horizontal component changes.
InstancePtr | is a pointer to the XTpg instance. | |
ZPlateHSpeed | is the speed of the horizontal component changes which need to be set. |
void XTpg_SetZPlateHStart | ( | XTpg * | InstancePtr, | |
u16 | ZPlateHStart | |||
) |
This function sets a starting point in the ROM based sinusoidal values for the horizontal component.
InstancePtr | is a pointer to the XTpg instance. | |
ZPlateHStart | is starting point in the ROM based sinusoidal value for horizontal component. |
void XTpg_SetZPlateVSpeed | ( | XTpg * | InstancePtr, | |
u16 | ZPlateVSpeed | |||
) |
This function sets how fast (the speed of) the vertical component changes.
InstancePtr | is a pointer to the XTpg instance. | |
ZPlateVSpeed | is the speed of the vertical component changes which need to be set. |
void XTpg_SetZPlateVStart | ( | XTpg * | InstancePtr, | |
u16 | ZPlateVStart | |||
) |
This function sets a starting point in the ROM based sinusoidal values for the vertical component.
InstancePtr | is a pointer to the XTpg instance. | |
ZPlateVStart | is starting point in the ROM based sinusoidal value for vertical component which need to be set. |
Copyright @ 1995-2014 Xilinx, Inc. All rights reserved.