想问一下 我用的是S3C44B0的板子,可是总进不了中断,不知道是什么原因,请大家指教一下.
程序如下:
#include"inc/44b.h" #include"inc/option.h" #define uchar unsigned char #define uint unsigned int volatile uchar flag; void __irq Time_Do();
void Init() { flag=0; pISR_TIMER1=(unsigned int)Time_Do; rINTMSK=~(BIT_GLOBAL|BIT_TIMER1); rINTCON=0X05; rTCFG0=0X00F; rTCFG1=0X04; rTCNTB1=0XFFFF; rTCON=0X02; rTCON=0X01; while(flag==0); rTCON=0X0; rINTMSK=BIT_GLOBAL; } void __irq Time_Do(void) { rINTMSK=BIT_TIMER1; flag++; } Main() { Init(); while(1); } |