tpg: xtpg.h File Reference

| tpg Xilinx SDK Drivers API Documentation

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

Data Structures | Macros | Typedefs | Functions
xtpg.h File Reference

## Data Structures
struct | XTpg_Config
| This typedef contains configuration information for a TPG core. More...
struct | XTpg
| The XTpg driver instance data structure. More...

## Macros
#define | XTPG_H_
| Prevent circular inclusions by using protection macros. More...
Motion Speed Ranges
#define | XTPG_MOTION_SPEED_MIN 0
| Motion Speed minimum value. More...
#define | XTPG_MOTION_SPEED_MAX 255
| Motion Speed maximum value. More...
Active Size Ranges
#define | XTPG_VSIZE_FIRST 32
| Vertical Size starting value. More...
#define | XTPG_VSIZE_LAST 7680
| Vertical Size ending value. More...
#define | XTPG_HSIZE_FIRST 32
| Horizontal Size starting value. More...
#define | XTPG_HSIZE_LAST 7680
| Horizontal Size ending value. More...
Macros for operating a TPG core
#define | XTpg_Enable(InstancePtr)
| This function macro enables the TPG core. More...
#define | XTpg_Disable(InstancePtr)
| This function macro disables the TPG core. More...
#define | XTpg_Start XTpg_Enable
| This function macro enables/starts the TPG core. More...
#define | XTpg_Stop XTpg_Disable
| This function macro disables/stops the TPG core. More...
#define | XTpg_RegUpdateEnable(InstancePtr)
| This function macro commits all the register value changes made so far by the software to the TPG core. More...
#define | XTpg_RegUpdateDisable(InstancePtr)
| This function macro prevents the TPG core from committing recent changes made so far by the software. More...
#define | XTpg_SyncReset(InstancePtr)
| This function macro resets a TPG core at the end of the frame being processed. More...
#define | XTpg_Reset(InstancePtr)
| This function macro resets a TPG core. More...
#define | XTpg_IntrEnable(InstancePtr, IntrType)
| This function macro enables individual interrupts of the TPG core by updating the IRQ_ENABLE register. More...
#define | XTpg_IntrDisable(InstancePtr, IntrType)
| This function macro disables individual interrupts of the TPG core by updating the IRQ_ENABLE register. More...
#define | XTpg_StatusGetPending(InstancePtr)
| This function macro returns the pending interrupt status of the TPG core read from the Status register. More...
#define | XTpg_IntrGetPending(InstancePtr)
| This function macro returns the pending interrupts of the TPG core for the interrupts that have been enabled. More...
#define | XTpg_IntrClear(InstancePtr, IntrType)
| This function macro clears/acknowledges pending interrupts of the TPG core in the Status register. More...

## Typedefs
typedef void(* | XTpg_CallBack )(void *CallBackRef)
| Callback type for all interrupts except error interrupt. More...
typedef void(* | XTpg_ErrorCallBack )(void *CallBackRef, u32 ErrorMask)
| Callback type for Error interrupt. More...

## Enumerations
Handler Types
enum | { XTPG_HANDLER_PROCSTART = 1, XTPG_HANDLER_FRAMEDONE, XTPG_HANDLER_ERROR }
| These constants specify different types of handlers and used to differentiate interrupt requests from core. More...
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 }
| These constants specify different types of background patterns supported by the core. More...
ComponentMask
enum | XTpg_ComponentMask { XTPG_NOMASK, XTPG_MASKOUT_RED, XTPG_MASKOUT_GREEN, XTPG_MASKOUT_BLUE = 0x4 }
| These constants specify mask outs for a particular color component. More...
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 }
| These constants specify Bayer phase combinations of the core. More...

## Functions
XTpg_Config * | XTpg_LookupConfig (u16 DeviceId)
| This function returns a reference to an XTpg_Config structure based on the unique device id, DeviceId. More...
int | XTpg_CfgInitialize (XTpg *InstancePtr, XTpg_Config *CfgPtr, u32 EffectiveAddr)
| This function initializes the TPG core. More...
void | XTpg_Setup (XTpg *InstancePtr)
| This function sets the input/output frame size in Active Size register and enables the register update. More...
u32 | XTpg_GetVersion (XTpg *InstancePtr)
| This function returns the contents of the Version register of the TPG core. More...
void | XTpg_SetActiveSize (XTpg *InstancePtr, u16 HSize, u16 VSize)
| This function sets the active H/V sizes in the Active Size register. More...
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. More...
void | XTpg_SetPattern (XTpg *InstancePtr, u32 Pattern)
| This function sets the Pattern Control Register of TPG core. More...
u32 | XTpg_GetPattern (XTpg *InstancePtr)
| This function returns the contents of the Pattern Control Register. More...
void | XTpg_SetBackground (XTpg *InstancePtr, enum XTpg_BackgroundPattern Pattern)
| This function sets the background pattern in the Pattern Control Register. More...
u32 | XTpg_GetBackground (XTpg *InstancePtr)
| This function gets the background pattern for TPG core. More...
void | XTpg_EnableCrossHair (XTpg *InstancePtr)
| This function enables the drawing of Cross Hairs feature in the Pattern Control Register of the TPG core. More...
void | XTpg_DisableCrossHair (XTpg *InstancePtr)
| This function disables the drawing of Cross Hairs feature in the Pattern Control Register of the TPG core. More...
void | XTpg_EnableMotion (XTpg *InstancePtr)
| This function enables the Motion Feature in the Pattern Control register of the TPG core. More...
void | XTpg_DisableMotion (XTpg *InstancePtr)
| This function disables the Motion feature in the Pattern Control register of the TPG core. More...
void | XTpg_EnableBox (XTpg *InstancePtr)
| This function enables the Moving Box feature in the Pattern Control Register of the TPG core. More...
void | XTpg_DisableBox (XTpg *InstancePtr)
| This function disables the Moving Box feature in the Pattern Control Register of the TPG core. More...
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. More...
u32 | XTpg_GetComponentMask (XTpg *InstancePtr)
| This function returns the color component mask status in the Pattern Control Register. More...
void | XTpg_EnableStuckPixel (XTpg *InstancePtr)
| This function enables the Stuck Pixel Feature in the Pattern Control Register of the TPG core. More...
void | XTpg_DisableStuckPixel (XTpg *InstancePtr)
| This function disables the Stuck Pixel feature in the Pattern Control register of the TPG core. More...
void | XTPg_EnableNoise (XTpg *InstancePtr)
| This function enables the Noise on the output by setting value in Pattern Control register of the TPG core. More...
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. More...
void | XTpg_SetMotionSpeed (XTpg *InstancePtr, u32 MotionSpeed)
| This function sets the Motion Speed. More...
u32 | XTpg_GetMotionSpeed (XTpg *InstancePtr)
| This function gets the Motion Speed. More...
void | XTpg_SetCrosshairPosition (XTpg *InstancePtr, u16 HPos, u16 VPos)
| This function sets the Cross Hairs Positions. More...
void | XTpg_GetCrosshairPosition (XTpg *InstancePtr, u16 *HPos, u16 *VPos)
| This function gets the cross hair positions. More...
void | XTpg_SetZPlateHStart (XTpg *InstancePtr, u16 ZPlateHStart)
| This function sets a starting point in the ROM based sinusoidal values for the horizontal component. More...
u16 | XTpg_GetZPlateHStart (XTpg *InstancePtr)
| This function gets a starting point in the ROM based sinusoidal values for the horizontal component. More...
void | XTpg_SetZPlateHSpeed (XTpg *InstancePtr, u16 ZPlateHSpeed)
| This function sets how fast (the speed of) the horizontal component changes. More...
u16 | XTpg_GetZPlateHSpeed (XTpg *InstancePtr)
| This function gets how fast (the speed of) horizontal component changes. More...
void | XTpg_SetZPlateVStart (XTpg *InstancePtr, u16 ZPlateVStart)
| This function sets a starting point in the ROM based sinusoidal values for the vertical component. More...
u16 | XTpg_GetZPlateVStart (XTpg *InstancePtr)
| This function gets a starting point in the ROM based sinusoidal values for the vertical component. More...
void | XTpg_SetZPlateVSpeed (XTpg *InstancePtr, u16 ZPlateVSpeed)
| This function sets how fast (the speed of) the vertical component changes. More...
u16 | XTpg_GetZPlateVSpeed (XTpg *InstancePtr)
| This function gets how fast (the speed of) the vertical component changes. More...
int | XTpg_SetBoxSize (XTpg *InstancePtr, u32 BoxSize)
| This function sets the Box Size. More...
u32 | XTpg_GetBoxSize (XTpg *InstancePtr)
| This function gets the Box Size in pixel. More...
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. More...
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. More...
void | XTpg_SetStuckPixelThreshold (XTpg *InstancePtr, u32 PixelThreshold)
| This function sets the stuck pixel threshold in STUCK_PIXEL_THRESH register of the TPG core. More...
u32 | XTpg_GetStuckPixelThreshold (XTpg *InstancePtr)
| This function gets the stuck pixel threshold in the STUCK_PIXEL_THRESH register of the TPG core. More...
void | XTpg_SetNoiseGain (XTpg *InstancePtr, u32 NoiseGain)
| This function sets the noise gain in Noise Gain register of the TPG core. More...
u32 | XTpg_GetNoiseGain (XTpg *InstancePtr)
| This function gets the noise gain of each component of TPG core. More...
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. More...
u32 | XTpg_GetBayerPhase (XTpg *InstancePtr)
| This function returns the Bayer phase value which indicates starting pixel position. More...
int | XTpg_SelfTest (XTpg *InstancePtr)
| This function reads Version register of TPG core and compares with zero as part of self test. More...
void | XTpg_IntrHandler (void *InstancePtr)
| This function is the interrupt handler for the TPG driver. More...
int | XTpg_SetCallBack (XTpg *InstancePtr, u32 HandlerType, void *CallBackFunc, void *CallBackRef)
| This function installs an asynchronous callback function for the given HandlerType. More...