Subversion Repositories HomeAutomation

Rev

Details | Last modification | View Log | SVN | RSS feed

Rev Author Line No. Line
51 johboh 1
/*********************************************************************
2
 *
3
 *                  Ticker header file
4
 *
5
 *********************************************************************
6
 * FileName:        Tick.h
7
 *
8
 * Author               Date    Comment
9
 *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10
 * Johan Böhlin     21-10-06    Original        (Rev 1.0)
11
 ********************************************************************/
12
 
13
#ifndef TICK_H
14
#define TICK_H
15
 
16
#include "..\Include\stackTasks.h"
17
 
18
typedef unsigned long TICK;
19
 
20
#if !defined(TICKS_PER_SECOND)
21
    #error TICKS_PER_SECOND must be defined.
22
#endif
23
 
24
#if !defined(TICK_PRESCALE_VALUE)
25
    #error TICK_PRESCALE_VALUE must be defined.
26
#endif
27
 
28
#define TICK_PERIOD_MS          10
29
#define TICK_SECOND             ((TICK)TICKS_PER_SECOND)
30
 
31
 
32
/*
33
 * Only Tick.c defines TICK_INCLUDE and thus defines Seconds
34
 * and TickValue storage.
35
 */
36
#ifndef TICK_INCLUDE
37
extern TICK TickCount;
38
#endif
39
 
40
void tickInit(void);
41
TICK tickGet(void);
42
void tickUpdate(void);
43
 
44
#endif