Exemplo n.º 1
0
/***************************************************************************//**
 * @brief Main function.
 *
 * @return Returns 0.
*******************************************************************************/
int main()
{
	UINT32 StartCount;

	MajorRev     = 1;
	MinorRev     = 1;
	RcRev        = 1;
	DriverEnable = TRUE;
	LastEnable   = FALSE;

	Xil_ICacheEnable();
	Xil_DCacheEnable();

#ifdef XPAR_AXI_IIC_0_BASEADDR
	HAL_PlatformInit(XPAR_AXI_IIC_0_BASEADDR,	/* Perform any required platform init */
					 XPAR_SCUTIMER_DEVICE_ID,	/* including hardware reset to HDMI devices */
					 XPAR_SCUGIC_SINGLE_DEVICE_ID,
					 XPAR_SCUTIMER_INTR);
#else
	HAL_PlatformInit(XPAR_AXI_IIC_MAIN_BASEADDR,	/* Perform any required platform init */
					 XPAR_SCUTIMER_DEVICE_ID,	/* including hardware reset to HDMI devices */
					 XPAR_SCUGIC_SINGLE_DEVICE_ID,
					 XPAR_SCUTIMER_INTR);
#endif

	Xil_ExceptionEnable();

	SetVideoResolution(RESOLUTION_640x480);
	InitHdmiAudioPcore();

	APP_PrintRevisions();       /* Display S/W and H/W revisions */

	DBG_MSG("To change the video resolution press:\r\n");
	DBG_MSG("  '0' - 640x480;  '1' - 800x600;  '2' - 1024x768; '3' - 1280x720 \r\n");
	DBG_MSG("  '4' - 1360x768; '5' - 1600x900; '6' - 1920x1080.\r\n");

	ADIAPI_TransmitterInit();   /* Initialize ADI repeater software and h/w */

	ADIAPI_TransmitterSetPowerMode(REP_POWER_UP);

	StartCount = HAL_GetCurrentMsCount();

	while(1)
	{
		if (ATV_GetElapsedMs (StartCount, NULL) >= HDMI_CALL_INTERVAL_MS)
		{
			StartCount = HAL_GetCurrentMsCount();
			if (APP_DriverEnabled())
			{
				ADIAPI_TransmitterMain();
			}
		}
		APP_ChangeResolution();
	}

	Xil_DCacheDisable();
	Xil_ICacheDisable();

	return(0);
}
Exemplo n.º 2
0
/***************************************************************************//**
 * @brief Main function.
 *
 * @return Returns 0.
*******************************************************************************/
int main()
{
	UINT32 StartCount;

	MajorRev     = 1;
	MinorRev     = 1;
	RcRev        = 1;
	DriverEnable = TRUE;
	LastEnable   = FALSE;

	Xil_ICacheEnable();
	Xil_DCacheEnable();

	HAL_PlatformInit(XPAR_AXI_IIC_0_BASEADDR,	/* Perform any required platform init */
					 XPAR_SCUTIMER_DEVICE_ID,	/* including hardware reset to HDMI devices */
					 XPAR_SCUGIC_SINGLE_DEVICE_ID,
					 XPAR_SCUTIMER_INTR);

	Xil_ExceptionEnable();

	/* Set the default values for 1080P 60Hz */
	CLKGEN_SetRate(148500000, 200000000);
	InitHdmiVideoPcore(1920,
					   1080,
					   280,
					   45,
					   44,
					   5,
					   88,
					   4);
	InitHdmiAudioPcore();

	APP_PrintRevisions();       /* Display S/W and H/W revisions */

	ADIAPI_TransmitterInit();   /* Initialize ADI repeater software and h/w */

	ADIAPI_TransmitterSetPowerMode(REP_POWER_UP);

	StartCount = HAL_GetCurrentMsCount();

	while(1)
	{
		if (ATV_GetElapsedMs (StartCount, NULL) >= HDMI_CALL_INTERVAL_MS)
		{
			StartCount = HAL_GetCurrentMsCount();
			if (APP_DriverEnabled())
			{
				ADIAPI_TransmitterMain();
			}
		}
	}

	Xil_DCacheDisable();
	Xil_ICacheDisable();

	return(0);
}
Exemplo n.º 3
0
void SCREEN_Init(UINT32 resolution)
{

	UINT32 StartCount;

		MajorRev     = 1;
		MinorRev     = 1;
		RcRev        = 1;
		DriverEnable = TRUE;
		LastEnable   = FALSE;

		Xil_ICacheEnable();
		Xil_DCacheEnable();

	#ifdef XPAR_AXI_IIC_0_BASEADDR
		HAL_PlatformInit(XPAR_AXI_IIC_0_BASEADDR,	/* Perform any required platform init */
						 XPAR_SCUTIMER_DEVICE_ID,	/* including hardware reset to HDMI devices */
						 XPAR_SCUGIC_SINGLE_DEVICE_ID,
						 XPAR_SCUTIMER_INTR);
	#else
		HAL_PlatformInit(XPAR_AXI_IIC_MAIN_BASEADDR,	/* Perform any required platform init */
						 XPAR_SCUTIMER_DEVICE_ID,	/* including hardware reset to HDMI devices */
						 XPAR_SCUGIC_SINGLE_DEVICE_ID,
						 XPAR_SCUTIMER_INTR);
	#endif

		Xil_ExceptionEnable();

		SetVideoResolution( resolution);
		InitHdmiAudioPcore();

		APP_PrintRevisions();       /* Display S/W and H/W revisions */

//		DBG_MSG("To change the video resolution press:\r\n");
//		DBG_MSG("  '0' - 640x480;  '1' - 800x600;  '2' - 1024x768; '3' - 1280x720 \r\n");
//		DBG_MSG("  '4' - 1360x768; '5' - 1600x900; '6' - 1920x1080.\r\n");

		ADIAPI_TransmitterInit();   /* Initialize ADI repeater software and h/w */

		ADIAPI_TransmitterSetPowerMode(REP_POWER_UP);

		StartCount = HAL_GetCurrentMsCount();

}