Subversion Repositories HomeAutomation

Rev

Rev 24 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 24 Rev 25
-
 
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
 
1
#ifndef TICK_H
13
#ifndef TICK_H
2
#define TICK_H
14
#define TICK_H
3
 
15
 
4
#include "..\Include\stackTasks.h"
16
#include "..\Include\stackTasks.h"
5
 
17
 
6
typedef unsigned long TICK;
18
typedef unsigned long TICK;
7
 
19
 
8
#if !defined(TICKS_PER_SECOND)
20
#if !defined(TICKS_PER_SECOND)
9
    #error TICKS_PER_SECOND must be defined.
21
    #error TICKS_PER_SECOND must be defined.
10
#endif
22
#endif
11
 
23
 
12
#if !defined(TICK_PRESCALE_VALUE)
24
#if !defined(TICK_PRESCALE_VALUE)
13
    #error TICK_PRESCALE_VALUE must be defined.
25
    #error TICK_PRESCALE_VALUE must be defined.
14
#endif
26
#endif
15
 
27
 
16
#define TICK_PERIOD_MS          10
28
#define TICK_PERIOD_MS          10
17
#define TICK_SECOND             ((TICK)TICKS_PER_SECOND)
29
#define TICK_SECOND             ((TICK)TICKS_PER_SECOND)
18
 
30
 
19
 
31
 
20
/*
32
/*
21
 * Only Tick.c defines TICK_INCLUDE and thus defines Seconds
33
 * Only Tick.c defines TICK_INCLUDE and thus defines Seconds
22
 * and TickValue storage.
34
 * and TickValue storage.
23
 */
35
 */
24
#ifndef TICK_INCLUDE
36
#ifndef TICK_INCLUDE
25
extern TICK TickCount;
37
extern TICK TickCount;
26
#endif
38
#endif
27
 
39
 
28
void tickInit(void);
40
void tickInit(void);
29
TICK tickGet(void);
41
TICK tickGet(void);
30
void tickUpdate(void);
42
void tickUpdate(void);
31
 
43
 
32
#endif
44
#endif
33
 
45