ADC_HandleTypeDef* h & (h = &hadc1)
Hi I come across an ADC code as below, could anyone advise whats the meaning of pointer *h in the function argument and whats (h = &hadc1) do inside the callback function ?
main(void){
HAL_ADC_Start_IT(&hadc1);
...
while (1)
{
if (adc_valid == 1)
{
...
HAL_ADC_Start_IT(&hadc1);
}
void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* h)
{
if (h = &hadc1)
{
adc_result = HAL_ADC_GetValue(&hadc1);
adc_valid =1;
}
}
