Skip to content

Commit 92dbb3f

Browse files
committed
chore(U0): ADC support
Signed-off-by: Frederic Pillon <[email protected]>
1 parent a848f50 commit 92dbb3f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

libraries/SrcWrapper/src/stm32/analog.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -909,8 +909,8 @@ uint16_t adc_read_value(PinName pin, uint32_t resolution)
909909
#endif
910910
AdcHandle.Init.DiscontinuousConvMode = DISABLE; /* Parameter discarded because sequencer is disabled */
911911
#if !defined(STM32C0xx) && !defined(STM32F0xx) && !defined(STM32G0xx) && \
912-
!defined(STM32L0xx) && !defined(STM32WBAxx) && !defined(STM32WLxx) && \
913-
!defined(ADC_SUPPORT_2_5_MSPS)
912+
!defined(STM32L0xx) && !defined(STM32U0xx) && !defined(STM32WBAxx) && \
913+
!defined(STM32WLxx) && !defined(ADC_SUPPORT_2_5_MSPS)
914914
AdcHandle.Init.NbrOfDiscConversion = 0; /* Parameter discarded because sequencer is disabled */
915915
#endif
916916
AdcHandle.Init.ExternalTrigConv = ADC_SOFTWARE_START; /* Software start to trig the 1st conversion manually, without external event */
@@ -934,7 +934,7 @@ uint16_t adc_read_value(PinName pin, uint32_t resolution)
934934
#if defined(STM32F0xx)
935935
AdcHandle.Init.SamplingTimeCommon = samplingTime;
936936
#endif
937-
#if defined(STM32C0xx) || defined(STM32G0xx) || defined(STM32U5xx) || \
937+
#if defined(STM32C0xx) || defined(STM32G0xx) || defined(STM32U0xx) || defined(STM32U5xx) || \
938938
defined(STM32WBAxx) || defined(STM32WLxx) || defined(ADC_SUPPORT_2_5_MSPS)
939939
AdcHandle.Init.SamplingTimeCommon1 = samplingTime; /* Set sampling time common to a group of channels. */
940940
AdcHandle.Init.SamplingTimeCommon2 = samplingTime; /* Set sampling time common to a group of channels, second common setting possible.*/
@@ -999,8 +999,8 @@ uint16_t adc_read_value(PinName pin, uint32_t resolution)
999999
#endif
10001000
#if !defined(STM32C0xx) && !defined(STM32F0xx) && !defined(STM32F1xx) && \
10011001
!defined(STM32F2xx) && !defined(STM32G0xx) && !defined(STM32L0xx) && \
1002-
!defined(STM32L1xx) && !defined(STM32WBAxx) && !defined(STM32WBxx) && \
1003-
!defined(STM32WLxx) && !defined(ADC1_V2_5)
1002+
!defined(STM32L1xx) && !defined(STM32U0xx) && !defined(STM32WBAxx) && \
1003+
!defined(STM32WBxx) && !defined(STM32WLxx) && !defined(ADC1_V2_5)
10041004
AdcChannelConf.Offset = 0; /* Parameter discarded because offset correction is disabled */
10051005
#endif
10061006
#if defined (STM32H7xx) || defined(STM32MP1xx)

0 commit comments

Comments
 (0)