timer_at91.h
Go to the documentation of this file.00001
00040 #ifndef DRV_AT91_TIMER_H
00041 #define DRV_AT91_TIMER_H
00042
00043 #include "hw/hw_cpu.h"
00044
00045 #include "cfg/cfg_timer.h"
00046 #include <cfg/compiler.h>
00047
00055 #define TIMER_ON_PIT 1
00056
00057 #define TIMER_DEFAULT TIMER_ON_PIT
00058
00059
00060
00061
00062
00063 #if (CONFIG_TIMER == TIMER_ON_PIT)
00064
00065 void timer_handler(void);
00066
00067 #define DEFINE_TIMER_ISR void timer_handler(void)
00068 #define TIMER_TICKS_PER_SEC 1000
00069 #define TIMER_HW_CNT (CLOCK_FREQ / (16 * TIMER_TICKS_PER_SEC) - 1)
00070
00072 #define TIMER_HW_HPTICKS_PER_SEC (CLOCK_FREQ / 16)
00073
00075 typedef uint32_t hptime_t;
00076 #else
00077
00078 #error Unimplemented value for CONFIG_TIMER
00079 #endif
00080
00081
00082 #endif