如题:
HAL_StatusTypeDef HAL_ADC_PollForConversion (ADC_HandleTypeDef* hadc)
{
uint32_t count = 0;
assert_param (IS_ADC_ALL_INSTANCE (hadc-" Instansce) ) ;
while (1)
{
if (HAL_IS_BIT_SET (hadc-" Instance-" IF, ADC_IF_ADC) )
{
count++;
__HAL_ADC_CLEAR_FLAG (hadc, ADC_IF_ADC) ;
if (count == 4)
{
break;
}
}
}
return HAL_OK;
}