|
libteak
|
Timer utilities. More...
#include <teak/types.h>Macros | |
| #define | TMR_CONTROL_BREAKPOINT (1 << 11) |
| Cause a trap when the timer reaches 0. Remember to enable autoclear. | |
Functions | |
| u32 | timerRead (u16 index) |
| Safely reads the 32-bit counter value of a timer. | |
| void | timerStart (u16 index, u16 config, u32 reload_value) |
| Starts a timer with the specified starting value. | |
| static void | timerStop (u16 index) |
| Stops a timer. | |
Timer utilities.
| u32 timerRead | ( | u16 | index | ) |
Safely reads the 32-bit counter value of a timer.
| index | Timer index (0 or 1). |
| void timerStart | ( | u16 | index, |
| u16 | config, | ||
| u32 | reload_value | ||
| ) |
Starts a timer with the specified starting value.
| index | Timer index (0 or 1). |
| config | Configuration flags. |
| reload_value | Starting value. In mode reload, it is also used as reload value. It is ignored in freerun mode. |
|
inlinestatic |
Stops a timer.
| index | Timer index (0 or 1). |