2023年12月18日发(作者:)

void ADC_StartCalibration(ADC_TypeDef* ADCx){ assert_param(IS_ADC_ALL_PERIPH(ADCx)); /* Check the parameters */ ADCx->CR2 |= CR2_CAL_Set; /* Enable the selected ADC calibration process */

}五 、while(ADC_GetCalibrationStatus(ADC1)); //等待校准结束FlagStatus ADC_GetCalibrationStatus(ADC_TypeDef* ADCx){ FlagStatus bitstatus = RESET; assert_param(IS_ADC_ALL_PERIPH(ADCx)); /* Check the parameters */ if ((ADCx->CR2 & CR2_CAL_Set) != (uint32_t)RESET) /* Check the status of CAL bit */ { bitstatus = SET; /* CAL bit is set: calibration on going */ } else { bitstatus = RESET; /* CAL bit is reset: end of calibration */ } return bitstatus; /* Return the CAL bit status */}。。。