Mindstorms 3rd Party ROBOTC Drivers RobotC
[Home] [Download] [Submit a bug/suggestion] [ROBOTC Forums] [Blog] [Support this project]
Data Structures | Defines | Functions | Variables

timer.h File Reference

Additional _timers for ROBOTC. More...

Go to the source code of this file.

Data Structures

struct  typeTMR

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]

Detailed Description

Additional _timers for ROBOTC.

timer.h provides additional timers for ROBOTC. Please note that there is no roll-over checking done at all. That means that if the program runs for more than around 596 hours, it will roll over and weird stuff will happen.

The default number of timers is 10, but this can be changed by defining MAX_TIMERS before this driver is included.

License: You may use this code as you wish, provided you give credit where its due. THIS CODE WILL ONLY WORK WITH ROBOTC VERSION 3.59 AND HIGHER.

Changelog:

Author:
Xander Soldaat (xander_at_botbench.com)
Date:
31 October 2010
Version:
0.3

Definition in file timer.h.