Subversion Repositories HomeAutomation

Rev

Rev 127 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 127 Rev 219
Line 11... Line 11...
11
/*-----------------------------------------------------------------------------
11
/*-----------------------------------------------------------------------------
12
 * Defines
12
 * Defines
13
 *---------------------------------------------------------------------------*/
13
 *---------------------------------------------------------------------------*/
14
#define TIMEBASE_PRESCALE (64)
14
#define TIMEBASE_PRESCALE (64)
15
#define TIMEBASE_HITS_PER_1MS (F_OSC/TIMEBASE_PRESCALE/1000)
15
#define TIMEBASE_HITS_PER_1MS (F_OSC/TIMEBASE_PRESCALE/1000)
-
 
16
 
-
 
17
#if TIMEBASE_HITS_PER_1MS > 255
-
 
18
#undef TIMEBASE_PRESCALE
-
 
19
#define TIMEBASE_PRESCALE (256)
-
 
20
#undef TIMEBASE_HITS_PER_1MS
-
 
21
#define TIMEBASE_HITS_PER_1MS (F_OSC/TIMEBASE_PRESCALE/1000)    // behöver denna definieras om ifall prescalern definierats om?
-
 
22
#endif
-
 
23
 
16
#define TIMEBASE_RELOAD ((uint8_t)(0xff-TIMEBASE_HITS_PER_1MS+1))
24
#define TIMEBASE_RELOAD ((uint8_t)(0xff-TIMEBASE_HITS_PER_1MS+1))
17
 
25
 
18
 
26
 
19
/*-----------------------------------------------------------------------------
27
/*-----------------------------------------------------------------------------
20
 * Public Function Prototypes
28
 * Public Function Prototypes