mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-24 15:14:00 -06:00
stm32: Support for STM32F401 (#3853)
This module adds support for the STM32F401 microcontrollers Signed-off-by: Marco D'Alessio <marco@wrecklab.com>
This commit is contained in:
parent
60e4cddf36
commit
ef4d9c3abd
3 changed files with 17 additions and 9 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue