XilinxProcessorIPLib/drivers/v_hdmitxss/examples/xhdmi_example/PassThroughVersal/xhdmi_menu.c
static XHdmi_MenuType XHdmi_FrameRateMenu(XHdmi_Menu *InstancePtr, u8 Input) {
	// Variables
	XHdmi_MenuType 	Menu;
	XVidC_FrameRate FrameRate;

	// Default
	Menu = XHDMI_FRAMERATE_MENU;
	FrameRate = XVIDC_FR_UNKNOWN;

	switch (Input) {

			// 24 Hz
		case 1 :
			FrameRate = XVIDC_FR_24HZ;
			break;

			// 25 Hz
		case 2 :
			FrameRate = XVIDC_FR_25HZ;
			break;

			// 30 Hz
		case 3 :
			FrameRate = XVIDC_FR_30HZ;
			break;

			// 50 Hz
		case 4 :
			FrameRate = XVIDC_FR_50HZ;
			break;

			// 60 Hz
		case 5 :
			FrameRate = XVIDC_FR_60HZ;
			break;

			// 100 Hz
		case 6 :
			FrameRate = XVIDC_FR_100HZ;
			break;

			// 120 Hz
		case 7 :
			FrameRate = XVIDC_FR_120HZ;
			break;

			// Exit
		case 99 :
			xil_printf("Returning to main menu.\r\n");
			Menu = XHDMI_MAIN_MENU;
			break;

		default :
			xil_printf("Unknown option\r\n");
			XHdmi_DisplayFrameRateMenu();
			break;
	}

	if (FrameRate != XVIDC_FR_UNKNOWN) {
		UpdateFrameRate(&Hdmiphy1, &HdmiTxSs, FrameRate);
		InstancePtr->WaitForColorbar = (TRUE);
	}

	return Menu;
}
/*****************************************************************************/
/**
*
* This function implements the HDMI frame rate menu state.
*
* @param input is the value used for the next menu state decoder.
*
* @return The next menu state.
*
******************************************************************************/
This function implements the HDMI frame rate menu state.
This function implements the HDMI frame rate menu state .
static XHdmi_MenuType XHdmi_FrameRateMenu(XHdmi_Menu *InstancePtr, u8 Input) {
	XHdmi_MenuType 	Menu;
	XVidC_FrameRate FrameRate;
	Menu = XHDMI_FRAMERATE_MENU;
	FrameRate = XVIDC_FR_UNKNOWN;
	switch (Input) {
		case 1 :
			FrameRate = XVIDC_FR_24HZ;
			break;
		case 2 :
			FrameRate = XVIDC_FR_25HZ;
			break;
		case 3 :
			FrameRate = XVIDC_FR_30HZ;
			break;
		case 4 :
			FrameRate = XVIDC_FR_50HZ;
			break;
		case 5 :
			FrameRate = XVIDC_FR_60HZ;
			break;
		case 6 :
			FrameRate = XVIDC_FR_100HZ;
			break;
		case 7 :
			FrameRate = XVIDC_FR_120HZ;
			break;
		case 99 :
			xil_printf("Returning to main menu.\r\n");
			Menu = XHDMI_MAIN_MENU;
			break;
		default :
			xil_printf("Unknown option\r\n");
			XHdmi_DisplayFrameRateMenu();
			break;
	}
	if (FrameRate != XVIDC_FR_UNKNOWN) {
		UpdateFrameRate(&Hdmiphy1, &HdmiTxSs, FrameRate);
		InstancePtr->WaitForColorbar = (TRUE);
	}
	return Menu;
}
static XHdmi_MenuType XHdmi_FrameRateMenu ( XHdmi_Menu * InstancePtr , u8 Input ) { XHdmi_MenuType Menu ; XVidC_FrameRate FrameRate ; Menu = XHDMI_FRAMERATE_MENU ; FrameRate = XVIDC_FR_UNKNOWN ; switch ( Input ) { case 1 : FrameRate = XVIDC_FR_24HZ ; break ; case 2 : FrameRate = XVIDC_FR_25HZ ; break ; case 3 : FrameRate = XVIDC_FR_30HZ ; break ; case 4 : FrameRate = XVIDC_FR_50HZ ; break ; case 5 : FrameRate = XVIDC_FR_60HZ ; break ; case 6 : FrameRate = XVIDC_FR_100HZ ; break ; case 7 : FrameRate = XVIDC_FR_120HZ ; break ; case 99 : xil_printf ( " \r \n " ) ; Menu = XHDMI_MAIN_MENU ; break ; default : xil_printf ( " \r \n " ) ; XHdmi_DisplayFrameRateMenu ( ) ; break ; } if ( FrameRate != XVIDC_FR_UNKNOWN ) { UpdateFrameRate ( & Hdmiphy1 , & HdmiTxSs , FrameRate ) ; InstancePtr -> WaitForColorbar = ( TRUE ) ; } return Menu ; }
This function implements the HDMI frame rate menu state.
This function implements the HDMI frame rate menu state .
// Variables // Default // 24 Hz // 25 Hz // 30 Hz // 50 Hz // 60 Hz // 100 Hz // 120 Hz // Exit