interrupt void cpu_timer0_isr(void)
{ CpuTimer0.InterruptCount++; // BUZZ_CLK_GENER;
EALLOW;
GpioCtrlRegs.GPAPUD.bit.GPIO8 = 0; // Enable pullup on GPIO8
GpioCtrlRegs.GPAMUX1.bit.GPIO8 = 0; // GPIO8 = GPIO
GpioCtrlRegs.GPADIR.bit.GPIO8 = 1; // GPIO8 = output
GpioDataRegs.GPATOGGLE.bit.GPIO8 = 1; EDIS; // Acknowledge this interrupt to receive more interrupts from group 1
StopCpuTimer0(); //停止计数
DISABLE_TIMER1_INT; //不使能定时中断
ConfigCpuTimer(&CpuTimer0, 50, 1000000); //设置定时时间
StartCpuTimer0(); //重启定时器
PieCtrlRegs.PIEACK.all = PIEACK_GROUP1; //ACK标志位写1清零
}
[ 本帖最后由 a312514554 于 2012-11-15 21:41 编辑 ]