lib/bsp/standalone/src/arm/cortexa9/sleep.c
unsigned sleep_A9(unsigned int seconds)
{
#if defined (SLEEP_TIMER_BASEADDR)
	Xil_SleepTTCCommon(seconds, COUNTS_PER_SECOND);
#else
	XTime tEnd, tCur;

	XTime_GetTime(&tCur);
	tEnd  = tCur + (((XTime) seconds) * COUNTS_PER_SECOND);
	do
    {
		XTime_GetTime(&tCur);
    } while (tCur < tEnd);
#endif

  return 0;
}
/*****************************************************************************/
/*
*
* This API is used to provide delays in seconds
*
* @param	seconds requested
*
* @return	0 always
*
* @note		None.
*
****************************************************************************/
This API is used to provide delays in seconds
This API is used to provide delays in seconds
unsigned sleep_A9(unsigned int seconds)
{
#if defined (SLEEP_TIMER_BASEADDR)
	Xil_SleepTTCCommon(seconds, COUNTS_PER_SECOND);
#else
	XTime tEnd, tCur;
	XTime_GetTime(&tCur);
	tEnd  = tCur + (((XTime) seconds) * COUNTS_PER_SECOND);
	do
    {
		XTime_GetTime(&tCur);
    } while (tCur < tEnd);
#endif
  return 0;
}
unsigned sleep_A9 ( unsigned int seconds ) { #if defined ( SLEEP_TIMER_BASEADDR ) Xil_SleepTTCCommon ( seconds , COUNTS_PER_SECOND ) ; #else XTime tEnd , tCur ; XTime_GetTime ( & tCur ) ; tEnd = tCur + ( ( ( XTime ) seconds ) * COUNTS_PER_SECOND ) ; do { XTime_GetTime ( & tCur ) ; } while ( tCur < tEnd ) ; #endif return 0 ; }
This API is used to provide delays in seconds
This API is used to provide delays in seconds