|
Data Structures | |
struct | typeTMR |
Files | |
file | timer.h |
Additional _timers for ROBOTC. | |
Defines | |
#define | MAX_TIMERS 10 |
Functions | |
int | TMRnewTimer () |
bool | TMRisExpired (int timerIdx) |
void | TMRreset (int timerIdx) |
void | TMRreset (int timerIdx, long duration) |
void | TMRsetup (int timerIdx, long duration) |
void | TMRexpire (int timerIdx) |
Variables | |
typeTMR | _timers [MAX_TIMERS] |
Timer Library
#define MAX_TIMERS 10 |
void TMRexpire | ( | int | timerIdx ) |
bool TMRisExpired | ( | int | timerIdx ) |
Check if the timer has expired.
timerIdx | the timer to be checked. |
int TMRnewTimer | ( | ) |
Create a new timer. It's an index to the next available timer in the array of timer structs.
void TMRreset | ( | int | timerIdx, |
long | duration | ||
) |
void TMRreset | ( | int | timerIdx ) |
Reset the timer, will also mark "expired" flag as false.
This function will also check if the TMRtask is running and start it up if this isn't the case.
timerIdx | the timer to be checked. |
void TMRsetup | ( | int | timerIdx, |
long | duration | ||
) |
Configure the duration of the timer.
timerIdx | the timer to be checked. |
duration | the amount of time the timer should run for before expiring. |