Skip to content

Commit

Permalink
cpu/stm32/l4: add ADC support for l496zg
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztof-cabaj committed Nov 21, 2022
1 parent 27b306e commit a76b99b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions cpu/stm32/include/periph/l4/periph_cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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]
*/
Expand Down
3 changes: 2 additions & 1 deletion cpu/stm32/periph/adc_l4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a76b99b

Please sign in to comment.