好的,其实程序很简单,
主程序:
void main(void) {
/* put your own code here */
// TaskFlag=1;
Initial();
for(;;) {
EnableInterrupts;
// wait(5000) ;
// RtiCntttt++;
// while (!TaskFlag){}
// TaskFlag=0;
} /* wait forever */
/* please make sure that you never leave this function */
}
中断服务例程:
#pragma CODE_SEG NON_BANKED
void RealTime_INT(void){
//清实时中断标志位
// CRGFLG&=CRGFLG_RTIF_MASK;
CRGFLG_RTIF=1;