diff options
author | smark- <ing.smark@yahoo.it> | 2021-02-01 01:41:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-31 19:41:53 -0500 |
commit | ef4d9c3abd30ae8a485020fd9ff2fb4529a143b3 (patch) | |
tree | 7e361e04387b59bbfb8cbb42461552315792ca47 /src/stm32/adc.c | |
parent | 60e4cddf36e00f196e16dd514fa8e9d66670693a (diff) | |
download | kutter-ef4d9c3abd30ae8a485020fd9ff2fb4529a143b3.tar.gz kutter-ef4d9c3abd30ae8a485020fd9ff2fb4529a143b3.tar.xz kutter-ef4d9c3abd30ae8a485020fd9ff2fb4529a143b3.zip |
stm32: Support for STM32F401 (#3853)
This module adds support for the STM32F401 microcontrollers
Signed-off-by: Marco D'Alessio <marco@wrecklab.com>
Diffstat (limited to 'src/stm32/adc.c')
-rw-r--r-- | src/stm32/adc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stm32/adc.c b/src/stm32/adc.c index 0d3f33ce..915c7d34 100644 --- a/src/stm32/adc.c +++ b/src/stm32/adc.c @@ -83,7 +83,7 @@ gpio_adc_setup(uint32_t pin) // Determine which ADC block to use ADC_TypeDef *adc = ADC1; uint32_t adc_base = ADC1_BASE; -#if CONFIG_MACH_STM32F4 +#if CONFIG_MACH_STM32F405 || CONFIG_MACH_STM32F407 if (chan >= 19) { // On the STM32F4, some ADC channels are only available from ADC3 adc = ADC3; @@ -108,7 +108,7 @@ gpio_adc_setup(uint32_t pin) } if (pin == ADC_TEMPERATURE_PIN) { -#if !CONFIG_MACH_STM32F1 +#if !(CONFIG_MACH_STM32F1 || CONFIG_MACH_STM32F401) ADC123_COMMON->CCR = ADC_CCR_TSVREFE; #endif } else { |