We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 05695fb commit 7d72a79Copy full SHA for 7d72a79
libraries/SrcWrapper/src/stm32/analog.cpp
@@ -1006,8 +1006,9 @@ uint16_t adc_read_value(PinName pin, uint32_t resolution)
1006
return 0;
1007
}
1008
1009
- LL_ADC_SetCommonPathInternalCh(__LL_ADC_COMMON_INSTANCE(AdcHandle.Instance), LL_ADC_PATH_INTERNAL_NONE);
1010
-
+ if (__LL_ADC_COMMON_INSTANCE(AdcHandle.Instance) != 0U) {
+ LL_ADC_SetCommonPathInternalCh(__LL_ADC_COMMON_INSTANCE(AdcHandle.Instance), LL_ADC_PATH_INTERNAL_NONE);
1011
+ }
1012
return uhADCxConvertedValue;
1013
1014
#endif /* HAL_ADC_MODULE_ENABLED && !HAL_ADC_MODULE_ONLY*/
0 commit comments