这个是422输出的720p一个彩条信号,tpg里面内置了彩条信号,并且会有一个白色的小方块在移动的一个测试信号,在设置小方块颜色时,若是yuv格式,则:
XV_tpg_Set_boxColorR = G;
XV_tpg_Set_boxColorG = B;
XV_tpg_Set_boxColorB = R;
int main()
{
int Status;
XV_tpg_Config *Config;
xil_printf("Hello test in Tpg\r\n");
Config = XV_tpg_LookupConfig(XTPG_DEVICE_ID);
if (NULL == Config) {
return (XST_FAILURE);
}
Status = XV_tpg_CfgInitialize(&TpgInst,Config,Config->BaseAddress);
if(Status != XST_SUCCESS)
{
return (XST_FAILURE);
}
XV_tpg_DisableAutoRestart(&TpgInst);
XV_tpg_Set_height(&TpgInst,720);
xil_printf("the height is %d.\r\n",XV_tpg_Get_height(&TpgInst));
XV_tpg_Set_width(&TpgInst,1280);
xil_printf("the width is %d.\r\n",XV_tpg_Get_width(&TpgInst));
XV_tpg_Set_ovrlayId(&TpgInst,0);
XV_tpg_Set_colorFormat(&am