#include "string.h"
#include "xvidc.h"
#include "xv_tpg.h"
#include "xgpio.h"
#include "xvtc.h"
#include "sleep.h"
| #define XPeriph_IsVideoLocked |
( |
|
pPeriph | ) |
|
Value:(XGpio_DiscreteRead((pPeriph)->VidLockMonitorPtr, \
XPER_GPIO_CHANNEL_1))
This macro reads GPIO to check video lock status.
- Parameters
-
| pPeriph | is pointer to the peripheral Instance |
- Returns
- T/F
| #define XPeriph_SetTPGColorFormat |
( |
|
pPeriph, |
|
|
|
ColorFormat |
|
) |
| ((pPeriph)->TpgConfig.ColorFmt = ColorFormat) |
This macro sets the TPG color format.
- Parameters
-
| pPeriph | is pointer to the peripheral Instance |
| ColorFormat | is the new color format |
- Returns
- none
Referenced by XPeriph_SetTpgParams().
| #define XPeriph_SetTPGHeight |
( |
|
pPeriph, |
|
|
|
height |
|
) |
| ((pPeriph)->TpgConfig.Height = height) |
This macro sets TPG active height.
- Parameters
-
| pPeriph | is pointer to the peripheral Instance |
| height | is the new active height |
- Returns
- none
Referenced by XPeriph_SetTpgParams().
| #define XPeriph_SetTPGInterlacedMode |
( |
|
pPeriph, |
|
|
|
mode |
|
) |
| ((pPeriph)->TpgConfig.IsInterlaced = mode) |
This macro sets TPG Interlaced Mode.
- Parameters
-
| pPeriph | is pointer to the peripheral Instance |
| mode | is the interlace mode T/F |
- Returns
- none
Referenced by XPeriph_SetTpgParams().
| #define XPeriph_SetTPGPattern |
( |
|
pPeriph, |
|
|
|
Pattern |
|
) |
| ((pPeriph)->TpgConfig.Pattern = Pattern) |
This macro sets the TPG pattern.
- Parameters
-
| pPeriph | is pointer to the peripheral Instance |
| Pattern | is the new pattern id |
- Returns
- none
Referenced by XPeriph_SetTpgParams().
| #define XPeriph_SetTPGWidth |
( |
|
pPeriph, |
|
|
|
width |
|
) |
| ((pPeriph)->TpgConfig.Width = width) |
This macro sets TPG active width.
- Parameters
-
| pPeriph | Pointer to the peripheral instance whose TPG width is to be set. |
| width | The desired width value to set for the TPG. |
- Returns
- none
Referenced by XPeriph_SetTpgParams().
| void XPeriph_ConfigTpg |
( |
XPeriph * |
InstancePtr | ) |
|
This function configures TPG to user defined parameters.
- Parameters
-
| InstancePtr | is a pointer to the peripheral instance |
| void XPeriph_ConfigVtc |
( |
XPeriph * |
InstancePtr, |
|
|
XVidC_VideoStream * |
StreamPtr, |
|
|
u32 |
PixPerClk |
|
) |
| |
This function configures the Video Timing Controller (VTC) for a given peripheral instance based on the provided video stream parameters and the number of pixels per clock.
The function performs the following steps:
- Disables and resets the VTC generator.
- Sets the source selection to use generator registers for all timing parameters.
- Manually writes to the VTC control register to handle the interlace field workaround.
- Populates the XVtc_Timing structure with horizontal and vertical timing values from the provided video stream, adjusting horizontal counts by the PixPerClk value.
- Applies a workaround for known VTC offset issues by adjusting vertical porch values.
- Sets the polarity of all VTC outputs according to the video stream timing.
- Enables the VTC generator and updates the register configuration.
- Parameters
-
| InstancePtr | Pointer to the XPeriph instance to configure. |
| StreamPtr | Pointer to the XVidC_VideoStream structure containing timing information. |
| PixPerClk | Number of pixels processed per clock cycle. |
| void XPeriph_DisableTpg |
( |
XPeriph * |
InstancePtr | ) |
|
This function stops TPG IP.
- Parameters
-
| InstancePtr | is a pointer to the peripheral instance |
| int XPeriph_PowerOnInit |
( |
XPeriph * |
InstancePtr | ) |
|
| void XPeriph_ReportDeviceInfo |
( |
XPeriph * |
InstancePtr | ) |
|
This function reports system wide common peripherals included in the design.
- Parameters
-
| InstancePtr | is a pointer to the Subsystem instance to be worked on. |
Referenced by XSys_ReportSystemInfo().
| void XPeriph_ResetHlsIp |
( |
XPeriph * |
InstancePtr | ) |
|
| void XPeriph_SetTpgParams |
( |
XPeriph * |
InstancePtr, |
|
|
u16 |
width, |
|
|
u16 |
height, |
|
|
XVidC_ColorFormat |
Cformat, |
|
|
u16 |
Pattern, |
|
|
u16 |
IsInterlaced |
|
) |
| |
| void XPeriph_TpgDbgReportStatus |
( |
XPeriph * |
InstancePtr | ) |
|
This function reports TPG Status.
- Parameters
-
| InstancePtr | is a pointer to the peripheral instance |