#pragma vector=ADC_VECTOR
__interrupt void ADC12ISR(void)
{
static unsigned int index = 0;
A0Results[index] = ADC12MEM0; // Move A0 results, IFG is cleared
A1Results[index] = ADC12MEM1; // Move A1 results, IFG is cleared
if(index++ >= (Num_of_Results-1))
{
ADC_Flag = 1; //ADC取样完成标志位置位
index = 0; //清零索引
}
} |