00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00031 #ifndef _TIMER_H_
00032 #define _TIMER_H_
00033
00034 #include <aversive/parts.h>
00035
00036 #include <aversive.h>
00037 #include <timer_declarations.h>
00038 #include <timer_definitions.h>
00039 #include <timer_prescaler.h>
00040
00041 #include <timer_config.h>
00042
00043
00045 void timer_init(void);
00046
00047
00048
00049 #if defined TIMER0_ENABLED && defined TIMER0_AVAILABLE
00050 DECLARE_TIMER_FUNCS(0)
00051 #endif
00052
00053 #if defined TIMER1_ENABLED && defined TIMER1_AVAILABLE
00054 DECLARE_TIMER_FUNCS(1)
00055 #endif
00056
00057 #if defined TIMER2_ENABLED && defined TIMER2_AVAILABLE
00058 DECLARE_TIMER_FUNCS(2)
00059 #endif
00060
00061 #if defined TIMER3_ENABLED && defined TIMER3_AVAILABLE
00062 DECLARE_TIMER_FUNCS(3)
00063 #endif
00064
00065
00066
00067 #if defined TIMER0_ENABLED && defined TIMER0_AVAILABLE
00068 DEFINE_TIMER_US_CONVERSIONS(0)
00069 #endif
00070
00071 #if defined TIMER1_ENABLED && defined TIMER1_AVAILABLE
00072 DEFINE_TIMER_US_CONVERSIONS(1)
00073 #endif
00074
00075 #if defined TIMER2_ENABLED && defined TIMER2_AVAILABLE
00076 DEFINE_TIMER_US_CONVERSIONS(2)
00077 #endif
00078
00079 #if defined TIMER3_ENABLED && defined TIMER3_AVAILABLE
00080 DEFINE_TIMER_US_CONVERSIONS(3)
00081 #endif
00082
00083 #endif