xiltimer
Vitis Drivers API Documentation
XilTimer APIs

Macros

#define MAX_COUNT   0xFFFFFFFFU
 The ScuTimer typically operates with a 32-bit counter, and this value represents the maximum possible count that can be stored in that counter. More...
 
#define REG_SHIFT   16U
 the shift amount used when concatenating two registers to form a 64-bit value. More...
 
#define XCntrVal   u16
 the type used to represent the value of a timer counter. More...
 

Functions

void XilTimer_Sleep (unsigned long delay, XTimer_DelayType DelayType)
 This API contains common delay implementation using library API's. More...
 
void sleep (unsigned int seconds)
 This API gives delay in sec. More...
 
void msleep (unsigned long mseconds)
 This API gives delay in msec. More...
 
void usleep (unsigned long useconds)
 This API gives delay in usec. More...
 
void __attribute__ ((constructor))
 This API initializes the xiltimer library through constructor. More...
 
void XTimer_SetHandler (XTimer_TickHandler FuncPtr, void *CallBackRef, u8 Priority)
 This routine installs an asynchronous callback function for the given FuncPtr. More...
 
void XTimer_SetInterval (unsigned long delay)
 This API sets the elapse interval for the timer instance. More...
 
void XTimer_ClearTickInterrupt (void)
 This API clears the interrupt status of the tick timer instance. More...
 

Macro Definition Documentation

#define MAX_COUNT   0xFFFFFFFFU

The ScuTimer typically operates with a 32-bit counter, and this value represents the maximum possible count that can be stored in that counter.

#define REG_SHIFT   16U

the shift amount used when concatenating two registers to form a 64-bit value.

the shift amount is 32, indicating a 16-bit register width.

#define XCntrVal   u16

the type used to represent the value of a timer counter.

Depending on the architecture being targeted, it is a 16-bit unsigned integer (u16).

Function Documentation

void __attribute__ ( (constructor)  )

This API initializes the xiltimer library through constructor.

Returns
none

References XilSleepTimer_Init(), and XilTickTimer_Init().

void msleep ( unsigned long  mseconds)

This API gives delay in msec.

Parameters
msecondsDelay time in milliseconds
Returns
none
Note
none

References XilTimer_Sleep(), and XTIMER_DELAY_MSEC.

void sleep ( unsigned int  seconds)

This API gives delay in sec.

Parameters
secondsDelay time in seconds
Returns
none
Note
none

References XilTimer_Sleep(), and XTIMER_DELAY_SEC.

void usleep ( unsigned long  useconds)

This API gives delay in usec.

Parameters
usecondsDelay time in microseconds
Returns
none
Note
none

References XilTimer_Sleep(), and XTIMER_DELAY_USEC.

void XilTimer_Sleep ( unsigned long  delay,
XTimer_DelayType  DelayType 
)

This API contains common delay implementation using library API's.

Returns
none
Note
none

References XTimerTag::XTimer_ModifyInterval.

Referenced by msleep(), sleep(), and usleep().

void XTimer_ClearTickInterrupt ( void  )

This API clears the interrupt status of the tick timer instance.

Returns
none
Note
none

References XTimerTag::XTickTimer_ClearInterrupt.

void XTimer_SetHandler ( XTimer_TickHandler  FuncPtr,
void *  CallBackRef,
u8  Priority 
)

This routine installs an asynchronous callback function for the given FuncPtr.

Parameters
FuncPtris the address of the callback function.
CallBackRefis a user data item that will be passed to the callback function when it is invoked.
Priority- Priority for the interrupt
Returns
None

References XTimerTag::CallBackRef, XTimerTag::Handler, and XTimerTag::XTimer_TickIntrHandler.

void XTimer_SetInterval ( unsigned long  delay)

This API sets the elapse interval for the timer instance.

Parameters
delayDelay time in milliseconds
Returns
none
Note
none

References XTimerTag::XTimer_TickInterval.