From afbb568306851c28bb76cf86db847e6e442dac86 Mon Sep 17 00:00:00 2001 From: krzysztof-cabaj Date: Sat, 19 Nov 2022 16:55:27 -0500 Subject: [PATCH] cpu/stm32/l4: add ADC support for l496zg --- cpu/stm32/include/periph/l4/periph_cpu.h | 5 +++-- cpu/stm32/periph/adc_l4.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cpu/stm32/include/periph/l4/periph_cpu.h b/cpu/stm32/include/periph/l4/periph_cpu.h index 8402a775dd..58479d5b70 100644 --- a/cpu/stm32/include/periph/l4/periph_cpu.h +++ b/cpu/stm32/include/periph/l4/periph_cpu.h @@ -27,7 +27,8 @@ extern "C" { /** * @brief Available number of ADC devices */ -#if defined(CPU_MODEL_STM32L476RG) || defined(CPU_MODEL_STM32L475VG) +#if defined(CPU_MODEL_STM32L476RG) || defined(CPU_MODEL_STM32L475VG) || \ + defined(CPU_MODEL_STM32L496ZG) #define ADC_DEVS (3U) #elif defined(CPU_MODEL_STM32L452RE) || defined(CPU_MODEL_STM32L432KC) || \ defined(CPU_MODEL_STM32L4R5ZI) @@ -36,7 +37,7 @@ extern "C" { #if defined(CPU_MODEL_STM32L476RG) || defined(CPU_MODEL_STM32L475VG) || \ defined(CPU_MODEL_STM32L452RE) || defined(CPU_MODEL_STM32L432KC) || \ - defined(CPU_MODEL_STM32L4R5ZI) + defined(CPU_MODEL_STM32L496ZG) || defined(CPU_MODEL_STM32L4R5ZI) /** * @brief ADC voltage regulator start-up time [us] */ diff --git a/cpu/stm32/periph/adc_l4.c b/cpu/stm32/periph/adc_l4.c index 33f25a628a..a6c3bba8fa 100644 --- a/cpu/stm32/periph/adc_l4.c +++ b/cpu/stm32/periph/adc_l4.c @@ -42,7 +42,8 @@ /** * @brief map CPU specific register/value names */ -#if defined(CPU_MODEL_STM32L476RG) || defined(CPU_MODEL_STM32L4R5ZI) +#if defined(CPU_MODEL_STM32L476RG) || defined(CPU_MODEL_STM32L4R5ZI) || \ + defined(CPU_MODEL_STM32L496ZG) #define ADC_CR_REG CR #define ADC_ISR_REG ISR #define ADC_PERIPH_CLK AHB2