English
Language : 

ZAURA Datasheet, PDF (92/99 Pages) –
ZAURA RF Wireless Library
Programmer’s Reference Manual
80
ZAURA_RF_GetTicks
Description The ZAURA_RF_GetTicks function is used to measure short intervals
(less than 1 second) instead of wasting CPU cycles in a synchronous
delay loop. This allows the application to perform simple tasks while
waiting for some other operation to complete.
Syntax
UINT16 ZAURA_RF_GetTicks(UINT16 Start)
Parameters
Start
A 16-bit timestamp indicating the beginning of an interval.
Returns
16-bit count of the number of timer ticks have elapsed since the inter-
val began. (Max: 0x7FFF).
Example
/*
* Check for console input for up to 700ms.
*/
UINT16 Start = ZAURA_RF_ReadTimer();
while( ZAURA_RF_GetTicks(Start) <
ZAURA_RF_ms_TO_TICKS(700) )
{
if( ZAURA_RF_UartEOL )
{
ZAURA_RF_ProcessCmdLine();
break;
}
}
Timer API Functions
RM006003-1011