}
中断:
interrupt VectorNumber_Vapi void API_ISR(void)
{
CPMUAPICTL_APIF =1; //This flag can only be cleared by writing a 1
count++;
if(count>10) //定时10ms,时基单位1ms
{
PORTD_PD0=~PORTD_PD0;
count=0;
}
}
中断:
interrupt VectorNumber_Vapi void API_ISR(void)
{
CPMUAPICTL_APIF =1; //This flag can only be cleared by writing a 1
count++;
if(count>5) //定时10ms,时基单位1ms
{
PORTD_PD0=~PORTD_PD0;
count=0;
}