#include "xvtc.h"
#include "xenv.h"
Go to the source code of this file.
The VTC device detects and generates video sync signals to Video IP cores like MVI Video Scaler. Please see xvtc.h for more details of the driver.
MODIFICATION HISTORY:
Ver Who Date Changes ----- ---- -------- ----------------------------------------------- 1.00a xd 08/05/08 First release 1.01a xd 07/23/10 Added GIER; Added more h/w generic info into xparameters.h; Feed callbacks with pending interrupt info. Added Doxygen & Version support
Definition in file xvtc.c.
int XVtc_CfgInitialize | ( | XVtc * | InstancePtr, | |
XVtc_Config * | CfgPtr, | |||
u32 | EffectiveAddr | |||
) |
This function initializes a VTC device.
This function must be called prior to using a VTC device. Initialization of a VTC includes setting up the instance data, and ensuring the hardware is in a quiescent state.
InstancePtr | is a pointer to the VTC device instance to be worked on. | |
CfgPtr | points to the configuration structure associated with the VTC device. | |
EffectiveAddr | is the base address of the device. If address translation is being used, then this parameter must reflect the virtual base address. Otherwise, the physical address should be used. |
void XVtc_Disable | ( | XVtc * | InstancePtr, | |
u32 | Type | |||
) |
This function disables a VTC device.
InstancePtr | is a pointer to the VTC device instance to be worked on. | |
Type | indicates which module (Detector and/or Generator) to disable. Valid values could be obtained by bit ORing of XVTC_EN_DETECTOR and XVTC_EN_GENERATOR |
void XVtc_Enable | ( | XVtc * | InstancePtr, | |
u32 | Type | |||
) |
This function enables a VTC device.
InstancePtr | is a pointer to the VTC device instance to be worked on. | |
Type | indicates which module (Detector and/or Generator) to enable. Valid values could be obtained by bit ORing of XVTC_EN_DETECTOR and XVTC_EN_GENERATOR. |
void XVtc_GetDelay | ( | XVtc * | InstancePtr, | |
int * | VertDelayPtr, | |||
int * | HoriDelayPtr | |||
) |
This function gets the Generator delay setting used by a VTC device.
InstancePtr | is a pointer to the VTC device instance to be worked on. | |
VertDelayPtr | will point to a value indicating the number of total lines per frame to delay the generator output after this function returns. | |
HoriDelayPtr | will point to a value indicating the number of total clock cycles per line to delay the generator output after this function returns. |
void XVtc_GetDetector | ( | XVtc * | InstancePtr, | |
XVtc_VtcSignal * | SignalCfgPtr | |||
) |
This function gets the VTC signal setting used by the Detector module in a VTC device.
InstancePtr | is a pointer to the VTC device instance to be worked on. | |
SignalCfgPtr | is a pointer to a VTC signal configuration which will be populated with the setting used by the Detector module in the VTC device once this function returns. |
void XVtc_GetDetectorHoriOffset | ( | XVtc * | InstancePtr, | |
XVtc_HoriOffsets * | HoriOffsets | |||
) |
This function gets the VBlank/VSync Horizontal Offsets detected by the Detector in a VTC device.
InstancePtr | is a pointer to the VTC device instance to be worked on. | |
HoriOffsets | points to a VBlank/VSync Horizontal Offset configuration structure that will be populated with the setting detected on the Detector in the given VTC device after this function returns. |
void XVtc_GetFSync | ( | XVtc * | InstancePtr, | |
u16 | FrameSyncIndex, | |||
u16 * | VertStartPtr, | |||
u16 * | HoriStartPtr | |||
) |
This function gets the SYNC setting of a Frame Sync used by VTC device.
InstancePtr | is a pointer to the VTC device instance to be worked on. | |
FrameSyncIndex | indicates the index number of the frame sync. The valid range is from 0 to 15. | |
VertStartPtr | will point to the value that indicates the vertical line count during which the Frame Sync is active once this function returns. | |
HoriStartPtr | will point to the value that indicates the horizontal cycle count during which the Frame Sync is active once this function returns. |
void XVtc_GetGenerator | ( | XVtc * | InstancePtr, | |
XVtc_VtcSignal * | SignalCfgPtr | |||
) |
This function gets the VTC signal setting used by the Generator module in a VTC device.
InstancePtr | is a pointer to the VTC device instance to be worked on. | |
SignalCfgPtr | is a pointer to a VTC signal configuration which will be populated with the setting used by the Generator module in the VTC device once this function returns. |
void XVtc_GetGeneratorHoriOffset | ( | XVtc * | InstancePtr, | |
XVtc_HoriOffsets * | HoriOffsets | |||
) |
This function gets the VBlank/VSync Horizontal Offsets currently used by the Generator in a VTC device.
InstancePtr | is a pointer to the VTC device instance to be worked on. | |
HoriOffsets | points to a VBlank/VSync Horizontal Offset configuration structure that will be populated with the setting currently used on the Generator in the given VTC device after this function returns. |
void XVtc_GetPolarity | ( | XVtc * | InstancePtr, | |
XVtc_Polarity * | PolarityPtr | |||
) |
This function gets the output polarity setting used by a VTC device.
InstancePtr | is a pointer to the VTC device instance to be worked on. | |
PolarityPtr | points to a Polarity configuration structure that will be populated with the setting used on the VTC device after this function returns. |
void XVtc_GetSkipLine | ( | XVtc * | InstancePtr, | |
int * | GeneratorChromaSkipPtr | |||
) |
This function gets the line skip setting used by the Generator in a VTC device.
InstancePtr | is a pointer to the VTC device instance to be worked on. | |
GeneratorChromaSkipPtr | will point to the value indicating whether 1 line is skipped between active chroma for the Generator module after this function returns. value 1 means that 1 line is skipped, and 0 means that no lines are skipped |
void XVtc_GetSkipPixel | ( | XVtc * | InstancePtr, | |
int * | GeneratorChromaSkipPtr | |||
) |
This function gets the pixel skip setting used by the Generator in a VTC device.
InstancePtr | is a pointer to the VTC device instance to be worked on. | |
GeneratorChromaSkipPtr | will point to the value indicating whether 1 pixel is skipped between active chroma for the Generator module after this function returns. value 1 means that 1 pixel is skipped, and 0 means that no pixels are skipped |
void XVtc_GetSource | ( | XVtc * | InstancePtr, | |
XVtc_SourceSelect * | SourcePtr | |||
) |
This function gets the source select setting used by a VTC device.
InstancePtr | is a pointer to the VTC device instance to be worked on | |
SourcePtr | points to a source select configuration structure that will be populated with the setting used on the VTC device after this function returns |
void XVtc_GetVersion | ( | XVtc * | InstancePtr, | |
u16 * | Major, | |||
u16 * | Minor, | |||
u16 * | Revision | |||
) |
This function returns the version of a VTC device.
InstancePtr | is a pointer to the VTC device instance to be worked on. | |
Major | points to an unsigned 16-bit variable that will be assigned with the major version number after this function returns. Value range is from 0x0 to 0xF. | |
Minor | points to an unsigned 16-bit variable that will be assigned with the minor version number after this function returns. Value range is from 0x00 to 0xFF. | |
Revision | points to an unsigned 16-bit variable that will be assigned with the revision version number after this function returns. Value range is from 0xA to 0xF. |
void XVtc_SetDelay | ( | XVtc * | InstancePtr, | |
int | VertDelay, | |||
int | HoriDelay | |||
) |
This function sets up the Generator delay setting of a VTC device.
InstancePtr | is a pointer to the VTC device instance to be worked on. | |
VertDelay | indicates the number of total lines per frame to delay the generator output. The valid range is from 0 to 4095. | |
HoriDelay | indicates the number of total clock cycles per line to delay the generator output. The valid range is from 0 to 4095. |
void XVtc_SetFSync | ( | XVtc * | InstancePtr, | |
u16 | FrameSyncIndex, | |||
u16 | VertStart, | |||
u16 | HoriStart | |||
) |
This function sets up the SYNC setting of a Frame Sync used by VTC device.
InstancePtr | is a pointer to the VTC device instance to be worked on. | |
FrameSyncIndex | indicates the index number of the frame sync. The valid range is from 0 to 15. | |
VertStart | indicates the vertical line count during which the Frame Sync is active. The valid range is from 0 to 4095. | |
HoriStart | indicates the horizontal cycle count during which the Frame Sync is active. The valid range is from 0 to 4095. |
void XVtc_SetGenerator | ( | XVtc * | InstancePtr, | |
XVtc_VtcSignal * | SignalCfgPtr | |||
) |
This function sets up VTC signal to be used by the Generator module in a VTC device.
InstancePtr | is a pointer to the VTC device instance to be worked on. | |
SignalCfgPtr | is a pointer to the VTC signal configuration to be used by the Generator module in the VTC device. |
void XVtc_SetGeneratorHoriOffset | ( | XVtc * | InstancePtr, | |
XVtc_HoriOffsets * | HoriOffsets | |||
) |
This function sets the VBlank/VSync Horizontal Offsets for the Generator in a VTC device.
InstancePtr | is a pointer to the VTC device instance to be worked on. | |
HoriOffsets | points to a VBlank/VSync Horizontal Offset configuration with the setting to use on the VTC device. |
void XVtc_SetPolarity | ( | XVtc * | InstancePtr, | |
XVtc_Polarity * | PolarityPtr | |||
) |
void XVtc_SetSkipLine | ( | XVtc * | InstancePtr, | |
int | GeneratorChromaSkip | |||
) |
This function sets up the line skip setting of the Generator in a VTC device.
InstancePtr | is a pointer to the VTC device instance to be worked on. | |
GeneratorChromaSkip | indicates whether to skip 1 line between active chroma for the Generator module. Use Non-0 value for this parameter to skip 1 line, and 0 to not skip lines |
void XVtc_SetSkipPixel | ( | XVtc * | InstancePtr, | |
int | GeneratorChromaSkip | |||
) |
This function sets up the pixel skip setting of the Generator in a VTC device.
InstancePtr | is a pointer to the VTC device instance to be worked on. | |
GeneratorChromaSkip | indicates whether to skip 1 pixel between active chroma for the Generator module. Use Non-0 value for this parameter to skip 1 pixel, and 0 to not skip pixels |
void XVtc_SetSource | ( | XVtc * | InstancePtr, | |
XVtc_SourceSelect * | SourcePtr | |||
) |