Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 32 lines (23 sloc) 0.58 kb
90ea291 @triffid time to save again, looking good so far
authored
1 #ifndef _TIMER_H
2 #define _TIMER_H
3
4 #include <stdint.h>
096d7df @triffid Merge release-candidate-triffid branch
authored
5 #include <avr/io.h>
90ea291 @triffid time to save again, looking good so far
authored
6
7 // time-related constants
8 #define US * (F_CPU / 1000000)
9 #define MS * (F_CPU / 1000)
10
096d7df @triffid Merge release-candidate-triffid branch
authored
11 /*
12 clock stuff
13 */
f22e691 @madscifi Convert the clock_flag variable into 3 separate varables.
madscifi authored
14 extern volatile uint8_t clock_flag_10ms;
15 extern volatile uint8_t clock_flag_250ms;
16 extern volatile uint8_t clock_flag_1s;
90ea291 @triffid time to save again, looking good so far
authored
17
f22e691 @madscifi Convert the clock_flag variable into 3 separate varables.
madscifi authored
18 // If the specific bit is set, execute the following block exactly once
19 // and then clear the flag.
20 #define ifclock(F) for (;F;F=0 )
4c47901 @triffid tons of commenting and tidying, fixes to heater PID loop
authored
21
096d7df @triffid Merge release-candidate-triffid branch
authored
22 /*
23 timer stuff
24 */
25 void timer_init(void) __attribute__ ((cold));
90ea291 @triffid time to save again, looking good so far
authored
26
27 void setTimer(uint32_t delay);
28
096d7df @triffid Merge release-candidate-triffid branch
authored
29 void timer_stop(void);
90ea291 @triffid time to save again, looking good so far
authored
30
31 #endif /* _TIMER_H */
Something went wrong with that request. Please try again.