Timers
Detailed Description
Timer library, set reset and check expiry of timers.
Init library at CPU reset with Timers_Init.
Use Timer_Set, Timer_Reset, Timer_HasExpired and Timer_MillisecondsLeft in main program loop.
Call Timers_DecreaseAll from timer interrupt. Resolution will be equal to the update value used when updating the timers.
\
\
Files
Typedefs
Functions
Typedef Documentation
|
Timer value is in milliseconds.
|
|
Timer value is in milliseconds.
|
Function Documentation
void Timers_Init |
( |
void |
|
) |
|
|
|
Init timer library, reset all timers Must be called before any other timer functions are called |
unsigned char Timers_GotoToIdle |
( |
void |
|
) |
|
|
|
Wait for timers to be updated before going to power save Call this function before going to power save |
bool Timer_HasExpired |
( |
const TimerId_t |
TimerId |
) |
|
|
|
Returns status of a timer - Parameters:
-
- Return values:
-
!0 | if timer has expired |
0 | if timer has not expired |
|
|
Resets a timer Resets and cancels a timer - Parameters:
-
|
|
Starts timer Starts timer, if timer is already running it will be set with new timeout. - Parameters:
-
TimerId | Id of timer |
Timeout | Milliseconds before timer expires |
|
|
Returns milliseconds before timer expires - Parameters:
-
- Returns:
- Milliseconds left before timer expires, 0 if timer is not running
|
|
Start a timer. It will expire immediatly but still have a timeout after first expiry. - Parameters:
-
TimerId | Id of timer |
Timeout | Milliseconds per |
|
Copyright 2002 Jörgen
Birkler. For accelR8 Accelerometer on
Mon Jan 19 21:43:20 2004 by Doxygen 1.3.5.