#include "xtimebase.h"
#include "xenv.h"
Go to the source code of this file.
The TimeBase device detects and generates video sync signals to Video IP cores like MVI Scaler. Please see xtimebase.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 xtimebase.c.
int XTimeBase_CfgInitialize | ( | XTimeBase * | InstancePtr, | |
XTimeBase_Config * | CfgPtr, | |||
u32 | EffectiveAddr | |||
) |
This function initializes a TimeBase device.
This function must be called prior to using a TimeBase device. Initialization of a TimeBase includes setting up the instance data, and ensuring the hardware is in a quiescent state.
InstancePtr | is a pointer to the TimeBase device instance to be worked on. | |
CfgPtr | points to the configuration structure associated with the TimeBase 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. |
Definition at line 113 of file xtimebase.c.
void XTimeBase_Disable | ( | XTimeBase * | InstancePtr, | |
u32 | Type | |||
) |
This function disables a TimeBase device.
InstancePtr | is a pointer to the TimeBase 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 XTB_EN_DETECTOR and XTB_EN_GENERATOR |
Definition at line 191 of file xtimebase.c.
void XTimeBase_Enable | ( | XTimeBase * | InstancePtr, | |
u32 | Type | |||
) |
This function enables a TimeBase device.
InstancePtr | is a pointer to the TimeBase 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 XTB_EN_DETECTOR and XTB_EN_GENERATOR. |
Definition at line 156 of file xtimebase.c.
void XTimeBase_GetDelay | ( | XTimeBase * | InstancePtr, | |
int * | VertDelayPtr, | |||
int * | HoriDelayPtr | |||
) |
This function gets the Generator delay setting used by a TimeBase device.
InstancePtr | is a pointer to the TimeBase 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. |
Definition at line 566 of file xtimebase.c.
void XTimeBase_GetDetector | ( | XTimeBase * | InstancePtr, | |
XTimeBase_TimeBaseSignal * | SignalCfgPtr | |||
) |
This function gets the TimeBase signal setting used by the Detector module in a TimeBase device.
InstancePtr | is a pointer to the TimeBase device instance to be worked on. | |
SignalCfgPtr | is a pointer to a TimeBase signal configuration which will be populated with the setting used by the Detector module in the TimeBase device once this function returns. |
Definition at line 845 of file xtimebase.c.
void XTimeBase_GetGenerator | ( | XTimeBase * | InstancePtr, | |
XTimeBase_TimeBaseSignal * | SignalCfgPtr | |||
) |
This function gets the TimeBase signal setting used by the Generator module in a TimeBase device.
InstancePtr | is a pointer to the TimeBase device instance to be worked on. | |
SignalCfgPtr | is a pointer to a TimeBase signal configuration which will be populated with the setting used by the Generator module in the TimeBase device once this function returns. |
Definition at line 765 of file xtimebase.c.
void XTimeBase_GetPolarity | ( | XTimeBase * | InstancePtr, | |
XTimeBase_Polarity * | PolarityPtr | |||
) |
This function gets the output polarity setting used by a TimeBase device.
InstancePtr | is a pointer to the TimeBase device instance to be worked on. | |
PolarityPtr | points to a Polarity configuration structure that will be populated with the setting used on the TimeBase device after this function returns. |
Definition at line 280 of file xtimebase.c.
void XTimeBase_GetSkip | ( | XTimeBase * | InstancePtr, | |
int * | GeneratorChromaSkipPtr | |||
) |
This function gets the skip setting used by the Generator in a TimeBase device.
InstancePtr | is a pointer to the TimeBase 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 |
Definition at line 496 of file xtimebase.c.
void XTimeBase_GetSource | ( | XTimeBase * | InstancePtr, | |
XTimeBase_SourceSelect * | SourcePtr | |||
) |
This function gets the source select setting used by a TimeBase device.
InstancePtr | is a pointer to the TimeBase device instance to be worked on. | |
SourcePtr | points to a source select configuration structure that will be populated with the setting used on the TimeBase device after this function returns. |
Definition at line 402 of file xtimebase.c.
void XTimeBase_GetSync | ( | XTimeBase * | InstancePtr, | |
u16 | FrameSyncIndex, | |||
u16 * | VertStartPtr, | |||
u16 * | HoriStartPtr | |||
) |
This function gets the SYNC setting of a Frame Sync used by TimeBase device.
InstancePtr | is a pointer to the TimeBase 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. |
Definition at line 647 of file xtimebase.c.
void XTimeBase_GetVersion | ( | XTimeBase * | InstancePtr, | |
u16 * | Major, | |||
u16 * | Minor, | |||
u16 * | Revision | |||
) |
This function returns the version of a TimeBase device.
InstancePtr | is a pointer to the TimeBase 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. |
Definition at line 934 of file xtimebase.c.
void XTimeBase_SetDelay | ( | XTimeBase * | InstancePtr, | |
int | VertDelay, | |||
int | HoriDelay | |||
) |
This function sets up the Generator delay setting of a TimeBase device.
InstancePtr | is a pointer to the TimeBase 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. |
Definition at line 531 of file xtimebase.c.
void XTimeBase_SetGenerator | ( | XTimeBase * | InstancePtr, | |
XTimeBase_TimeBaseSignal * | SignalCfgPtr | |||
) |
This function sets up TimeBase signal to be used by the Generator module in a TimeBase device.
InstancePtr | is a pointer to the TimeBase device instance to be worked on. | |
SignalCfgPtr | is a pointer to the TimeBase signal configuration to be used by the Generator module in the TimeBase device. |
Definition at line 685 of file xtimebase.c.
void XTimeBase_SetPolarity | ( | XTimeBase * | InstancePtr, | |
XTimeBase_Polarity * | PolarityPtr | |||
) |
This function sets up the output polarity of a TimeBase device.
InstancePtr | is a pointer to the TimeBase device instance to be worked on. | |
PolarityPtr | points to a Polarity configuration structure w/ the setting to use on the TimeBase device. |
Definition at line 225 of file xtimebase.c.
void XTimeBase_SetSkip | ( | XTimeBase * | InstancePtr, | |
int | GeneratorChromaSkip | |||
) |
This function sets up the skip setting of the Generator in a TimeBase device.
InstancePtr | is a pointer to the TimeBase 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 |
Definition at line 459 of file xtimebase.c.
void XTimeBase_SetSource | ( | XTimeBase * | InstancePtr, | |
XTimeBase_SourceSelect * | SourcePtr | |||
) |
This function sets up the source selecting of a TimeBase device.
InstancePtr | is a pointer to the TimeBase device instance to be worked on. | |
SourcePtr | points to a Source Selecting configuration structure w/ the setting to use on the TimeBase device. |
Definition at line 333 of file xtimebase.c.
void XTimeBase_SetSync | ( | XTimeBase * | InstancePtr, | |
u16 | FrameSyncIndex, | |||
u16 | VertStart, | |||
u16 | HoriStart | |||
) |
This function sets up the SYNC setting of a Frame Sync used by TimeBase device.
InstancePtr | is a pointer to the TimeBase 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. |
Definition at line 602 of file xtimebase.c.