Details | Last modification | View Log | SVN | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 24 | johboh | 1 | #ifndef TICK_H |
| 2 | #define TICK_H |
||
| 3 | |||
| 4 | #include "..\Include\stackTasks.h" |
||
| 5 | |||
| 6 | typedef unsigned long TICK; |
||
| 7 | |||
| 8 | #if !defined(TICKS_PER_SECOND) |
||
| 9 | #error TICKS_PER_SECOND must be defined. |
||
| 10 | #endif |
||
| 11 | |||
| 12 | #if !defined(TICK_PRESCALE_VALUE) |
||
| 13 | #error TICK_PRESCALE_VALUE must be defined. |
||
| 14 | #endif |
||
| 15 | |||
| 16 | #define TICK_PERIOD_MS 10 |
||
| 17 | #define TICK_SECOND ((TICK)TICKS_PER_SECOND) |
||
| 18 | |||
| 19 | |||
| 20 | /* |
||
| 21 | * Only Tick.c defines TICK_INCLUDE and thus defines Seconds |
||
| 22 | * and TickValue storage. |
||
| 23 | */ |
||
| 24 | #ifndef TICK_INCLUDE |
||
| 25 | extern TICK TickCount; |
||
| 26 | #endif |
||
| 27 | |||
| 28 | void tickInit(void); |
||
| 29 | TICK tickGet(void); |
||
| 30 | void tickUpdate(void); |
||
| 31 | |||
| 32 | #endif |