补充一下,原函数代码如下:
/*******************************************************************************
* Function Name : SVPWMEOCEvent
* Description : Routine to be performed inside the end of conversion ISR
store the first sampled value and compute the bus voltage and temperature
sensor sampling and disable the ext. adc triggering.
* Input : None
* Output : Return false after first EOC, return true after second EOC
* Return : None
*******************************************************************************/
u8 SVPWMEOCEvent(void)
{
if (bDistEnab == 1)
{
// Diabling the Injectec conversion for ADC1
ADC_ExternalTrigInjectedConvCmd(ADC1,DISABLE);
}
// Store the Bus Voltage and temperature sampled values
h_ADCTemp = ADC_GetInjectedConversionValue(ADC2,ADC_InjectedChannel_1);
h_ADCBusvolt = ADC_GetInjectedConversionValue(ADC2,ADC_InjectedChannel_2);
return ((u8)(1));
}
|