- #define __TC_C
- #include "tc.h"
- void TC0_Init(void)
- {
- unsigned long a;
- a=*(volatile unsigned *)(TC0+TCSR);
- *(volatile unsigned *)(TC0+TCCMR)=0X4002;
- *(volatile unsigned *)(TC0+TCCCR)=0X1;
- *(volatile unsigned *)(TC0+TCIER)=0X10; //INT enable
- *(volatile unsigned *)(TC0+TCRC)=0x2710;//0X300;
- }