获取通道这里是什么意思?
Int16U GetADCChanel(Int8U chanel) {
// Configure chanel
ADC_RegularChannelConfig(ADC1, chanel, 1, ADC_SampleTime_55Cycles5);
// Start the conversion
ADC_SoftwareStartConvCmd(ADC1, ENABLE);
// Wait until conversion completion
while(ADC_GetFlagStatus(ADC1, ADC_FLAG_EOC) == RESET);
// Get the conversion value
return ADC_GetConversionValue(ADC1);
}
|