lib/sw_services/xilplmi/src/xplmi_proc.c
u64 XPlmi_GetTimerValue(void)
{
	u64 TimerValue;
	u64 TPit1;
	u32 TPit2;

	TPit1 = XIOModule_GetValue(&IOModule, (u8)XPLMI_PIT1);
	TPit2 = XIOModule_GetValue(&IOModule, (u8)XPLMI_PIT2);

	/*
	 * Pit1 starts at 0 and preload the full value
	 * after pit2 expires. So, recasting TPit1 0 value
	 * to highest so that u64 comparison works fo
	 * Tpit1 0 and TPit1 0xfffffffe
	 */
	if (TPit1 == 0U) {
		TPit1 = XPLMI_PIT1_CYCLE_VALUE;
	}
	TimerValue = (TPit1 << 32U) | (u64)TPit2;

	return TimerValue;
}
/*****************************************************************************/
/**
 * @brief	This function is used to read the 64 bit timer value.
 * It reads from PIT1 and PIT2 and makes it 64 bit.
 *
 * @return	Returns 64 bit timer value
 *
 ******************************************************************************/
@brief       This function is used to read the 64 bit timer value.
It reads from PIT1 and PIT2 and makes it 64 bit.

@return      Returns 64 bit timer value
@brief This function is used to read the 64 bit timer value . It reads from PIT1 and PIT2 and makes it 64 bit . @return Returns 64 bit timer value
u64 XPlmi_GetTimerValue(void)
{
	u64 TimerValue;
	u64 TPit1;
	u32 TPit2;
	TPit1 = XIOModule_GetValue(&IOModule, (u8)XPLMI_PIT1);
	TPit2 = XIOModule_GetValue(&IOModule, (u8)XPLMI_PIT2);
	if (TPit1 == 0U) {
		TPit1 = XPLMI_PIT1_CYCLE_VALUE;
	}
	TimerValue = (TPit1 << 32U) | (u64)TPit2;
	return TimerValue;
}
u64 XPlmi_GetTimerValue ( void ) { u64 TimerValue ; u64 TPit1 ; u32 TPit2 ; TPit1 = XIOModule_GetValue ( & IOModule , ( u8 ) XPLMI_PIT1 ) ; TPit2 = XIOModule_GetValue ( & IOModule , ( u8 ) XPLMI_PIT2 ) ; if ( TPit1 == 0U ) { TPit1 = XPLMI_PIT1_CYCLE_VALUE ; } TimerValue = ( TPit1 << 32U ) | ( u64 ) TPit2 ; return TimerValue ; }
@brief       This function is used to read the 64 bit timer value.
@brief This function is used to read the 64 bit timer value .
/*
	 * Pit1 starts at 0 and preload the full value
	 * after pit2 expires. So, recasting TPit1 0 value
	 * to highest so that u64 comparison works fo
	 * Tpit1 0 and TPit1 0xfffffffe
	 */