
4.2.19 HAL_ADC_GetValue Function Name uint32_t HAL_ADC_GetValue (ADC_HandleTypeDef * hadc) Function Description Get ADC regular group conversion result. Parameters : hadc: ADC handle Return values : Converted value Notes : Reading DR register automatically clears EOC (end of conversion of regular group) flag. 库里的这个函数没有提到ADC的通道啊? 我目前开了两个通道,通道1和通道2,定义转换结果变量是ADC_Value,目前返回值是通道2的值 HAL_ADC_Start (&hadc1); HAL_ADC_PollForConversion(&hadc1,1000); ADC_Value=HAL_ADC_GetValue(&hadc1); HAL_ADC_Stop(&hadc1); |
循环读取,读1 关1 开2读2 关2 开1 读1![]() |