Skip to content

Commit 6ba3763

Browse files
committed
chore(U0): ADC support
Signed-off-by: Frederic Pillon <[email protected]>
1 parent 4d52db1 commit 6ba3763

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
@@ -891,8 +891,8 @@ uint16_t adc_read_value(PinName pin, uint32_t resolution)
891891
#endif
892892
AdcHandle.Init.DiscontinuousConvMode = DISABLE; /* Parameter discarded because sequencer is disabled */
893893
#if !defined(STM32C0xx) && !defined(STM32F0xx) && !defined(STM32G0xx) && \
894-
!defined(STM32L0xx) && !defined(STM32WBAxx) && !defined(STM32WLxx) && \
895-
!defined(ADC_SUPPORT_2_5_MSPS)
894+
!defined(STM32L0xx) && !defined(STM32U0xx) && !defined(STM32WBAxx) && \
895+
!defined(STM32WLxx) && !defined(ADC_SUPPORT_2_5_MSPS)
896896
AdcHandle.Init.NbrOfDiscConversion = 0; /* Parameter discarded because sequencer is disabled */
897897
#endif
898898
AdcHandle.Init.ExternalTrigConv = ADC_SOFTWARE_START; /* Software start to trig the 1st conversion manually, without external event */
@@ -916,7 +916,7 @@ uint16_t adc_read_value(PinName pin, uint32_t resolution)
916916
#if defined(STM32F0xx)
917917
AdcHandle.Init.SamplingTimeCommon = samplingTime;
918918
#endif
919-
#if defined(STM32C0xx) || defined(STM32G0xx) || defined(STM32U5xx) || \
919+
#if defined(STM32C0xx) || defined(STM32G0xx) || defined(STM32U0xx) || defined(STM32U5xx) || \
920920
defined(STM32WBAxx) || defined(STM32WLxx) || defined(ADC_SUPPORT_2_5_MSPS)
921921
AdcHandle.Init.SamplingTimeCommon1 = samplingTime; /* Set sampling time common to a group of channels. */
922922
AdcHandle.Init.SamplingTimeCommon2 = samplingTime; /* Set sampling time common to a group of channels, second common setting possible.*/
@@ -981,8 +981,8 @@ uint16_t adc_read_value(PinName pin, uint32_t resolution)
981981
#endif
982982
#if !defined(STM32C0xx) && !defined(STM32F0xx) && !defined(STM32F1xx) && \
983983
!defined(STM32F2xx) && !defined(STM32G0xx) && !defined(STM32L0xx) && \
984-
!defined(STM32L1xx) && !defined(STM32WBAxx) && !defined(STM32WBxx) && \
985-
!defined(STM32WLxx) && !defined(ADC1_V2_5)
984+
!defined(STM32L1xx) && !defined(STM32U0xx) && !defined(STM32WBAxx) && \
985+
!defined(STM32WBxx) && !defined(STM32WLxx) && !defined(ADC1_V2_5)
986986
AdcChannelConf.Offset = 0; /* Parameter discarded because offset correction is disabled */
987987
#endif
988988
#if defined (STM32H7xx) || defined(STM32MP1xx)

0 commit comments

Comments
 (0)