File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -916,7 +916,7 @@ uint16_t adc_read_value(PinName pin)
916
916
!defined (STM32WBxx) && !defined (STM32F373xC) && !defined (STM32F378xx)
917
917
AdcChannelConf.Offset = 0 ; /* Parameter discarded because offset correction is disabled */
918
918
#endif
919
- #if defined (STM32H7xx)
919
+ #if defined (STM32H7xx) || defined(STM32MP1xx)
920
920
AdcChannelConf.OffsetRightShift = DISABLE; /* No Right Offset Shift */
921
921
AdcChannelConf.OffsetSignedSaturation = DISABLE; /* Signed saturation feature is not used */
922
922
#endif
@@ -929,12 +929,13 @@ uint16_t adc_read_value(PinName pin)
929
929
930
930
#if defined(STM32F0xx) || defined(STM32F1xx) || defined(STM32F3xx) || \
931
931
defined (STM32G0xx) || defined (STM32G4xx) || defined (STM32H7xx) || \
932
- defined (STM32L0xx) || defined (STM32L4xx) || defined (STM32WBxx)
932
+ defined (STM32L0xx) || defined (STM32L4xx) || defined (STM32MP1xx) || \
933
+ defined (STM32WBxx)
933
934
/* ##-2.1- Calibrate ADC then Start the conversion process ####################*/
934
935
#if defined(STM32F0xx) || defined(STM32G0xx) || defined(STM32F1xx) || \
935
936
defined (STM32F373xC) || defined (STM32F378xx)
936
937
if (HAL_ADCEx_Calibration_Start (&AdcHandle) != HAL_OK)
937
- #elif defined (STM32H7xx)
938
+ #elif defined (STM32H7xx) || defined(STM32MP1xx)
938
939
if (HAL_ADCEx_Calibration_Start (&AdcHandle, ADC_CALIB_OFFSET, ADC_SINGLE_ENDED) != HAL_OK)
939
940
#else
940
941
if (HAL_ADCEx_Calibration_Start (&AdcHandle, ADC_SINGLE_ENDED) != HAL_OK)
You can’t perform that action at this time.
0 commit comments