fremoclock
1_3A01
FREMO Clock - Software for UTG
|
A timer module. More...
Go to the source code of this file.
Functions | |
int8_t | CheckTimer (uint32_t *pulTimer) |
Check if timer is elapsed, incactive or still busy. More... | |
void | SetTimer (uint32_t *pulTimer, uint32_t ulValue) |
Set a timer. More... | |
int8_t | AddTimer (uint32_t *pulTimer, uint32_t ulValue) |
Add time period to an already initialized timer. More... | |
void | ResetTimer (uint32_t *pulTimer) |
Reset a timer. More... | |
void | WaitTimer (uint16_t usValue) |
Wait for usValue milliseconds. More... | |
Variables | |
static const uint32_t | MAX_TIMEDIFF = ((UINT32_MAX / 2) - 1) |
Maximum time difference. More... | |
A timer module.
Defines a timer module that can handle an unlimited number of (software) timers. Only one hardware timer (HwTimer interface) is used.
For description and examples see Timer.md.
History:
Definition in file Timer.c.
int8_t AddTimer | ( | uint32_t * | pulTimer, |
uint32_t | ulValue | ||
) |
int8_t CheckTimer | ( | uint32_t * | pulTimer | ) |
Check if timer is elapsed, incactive or still busy.
When a timer has elapsed, the state of this timer is set to inactive.
pulTimer | Reference to timer |
Definition at line 28 of file Timer.c.
void ResetTimer | ( | uint32_t * | pulTimer | ) |
void SetTimer | ( | uint32_t * | pulTimer, |
uint32_t | ulValue | ||
) |
void WaitTimer | ( | uint16_t | usValue | ) |
Wait for usValue milliseconds.
This function doesn't returns before the timer is elapsed.
usValue | Timer value in [ms] |
Definition at line 121 of file Timer.c.