timer_i196.h
Go to the documentation of this file.00001 #error This code must be revised for the new timer API
00002
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067 #ifndef TIMER_I196_H
00068 #define TIMER_I196_H
00069
00074 #define TIMER_RETRIGGER (TIMER2 -= TICKS_RATE)
00075
00076 #define TIMER_INIT \
00077 TIMER2 = (65535 - TICKS_RATE); \
00078 INT_MASK1 |= INT1F_T2OVF; \
00079 ATOMIC( \
00080 WSR = 1; \
00081 IOC3 |= IOC3F_T2_ENA; \
00082 WSR = 0; \
00083 )
00084
00085 #define DEFINE_TIMER_ISR \
00086 INTERRUPT(0x38) void TM2_OVFL_interrupt(void); \
00087 INTERRUPT(0x38) void TM2_OVFL_interrupt(void)
00088
00089 #endif