00001 #ifndef _TIMER_H
00002 #define _TIMER_H
00003
00004 #include <stdint.h>
00005 #include <avr/io.h>
00006
00007
00008 #define US * (F_CPU / 1000000)
00009 #define MS * (F_CPU / 1000)
00010
00011
00012
00013
00014 extern volatile uint8_t clock_flag_10ms;
00015 extern volatile uint8_t clock_flag_250ms;
00016 extern volatile uint8_t clock_flag_1s;
00017
00018
00019
00020 #define ifclock(F) for (;F;F=0 )
00021
00022
00023
00024
00025 void timer_init(void) __attribute__ ((cold));
00026 void setTimer(uint32_t delay);
00027 void timer_stop(void);
00028
00029 #endif