From e3905eb2419b4d7bc8200a87e1dcac5c6eba9064 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 6 Oct 2021 19:48:03 -0400 Subject: stm32: Add an MACH_STM32F4x5 alias for F405, F407, and F429 chips The F405, F407, and F429 chips are in the same series and almost all code definitions should apply to all chips in that series. Implement the alias and fix defintions in adc.c and Kconfig that were only applying to a subset of that series. Signed-off-by: Kevin O'Connor --- src/stm32/adc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/stm32/adc.c') diff --git a/src/stm32/adc.c b/src/stm32/adc.c index 93a5309c..02e54fba 100644 --- a/src/stm32/adc.c +++ b/src/stm32/adc.c @@ -26,13 +26,13 @@ static const uint8_t adc_pins[] = { #if CONFIG_MACH_STM32F1 ADC_TEMPERATURE_PIN, -#elif CONFIG_MACH_STM32F2 || CONFIG_MACH_STM32F405 || CONFIG_MACH_STM32F407 +#elif CONFIG_MACH_STM32F2 || CONFIG_MACH_STM32F4x5 ADC_TEMPERATURE_PIN, 0x00, 0x00, #elif CONFIG_MACH_STM32F446 0x00, 0x00, ADC_TEMPERATURE_PIN, #endif -#if CONFIG_MACH_STM32F405 || CONFIG_MACH_STM32F407 || CONFIG_MACH_STM32F446 +#if CONFIG_MACH_STM32F4x5 || CONFIG_MACH_STM32F446 0x00, 0x00, 0x00, 0x00, GPIO('F', 6), GPIO('F', 7), GPIO('F', 8), GPIO('F', 9), GPIO('F', 10), GPIO('F', 3), 0x00, 0x00, @@ -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_STM32F405 || CONFIG_MACH_STM32F407 || CONFIG_MACH_STM32F446 +#if CONFIG_MACH_STM32F4x5 || CONFIG_MACH_STM32F446 if (chan >= 19) { // On the STM32F4, some ADC channels are only available from ADC3 adc = ADC3; -- cgit v1.2.3-70-g09d2