diff options
author | Dropeffect GmbH <code@dropeffect.com> | 2024-05-02 10:39:38 +0100 |
---|---|---|
committer | KevinOConnor <kevin@koconnor.net> | 2024-05-14 11:53:38 -0400 |
commit | 8f510da12bf51a58205ebd81873ec8efbaa32c43 (patch) | |
tree | a8271198bd70764e0236913f63782bd7511635dd /src | |
parent | 79930ed99a1fc284f41af5755908aa1fab948ce1 (diff) | |
download | kutter-8f510da12bf51a58205ebd81873ec8efbaa32c43.tar.gz kutter-8f510da12bf51a58205ebd81873ec8efbaa32c43.tar.xz kutter-8f510da12bf51a58205ebd81873ec8efbaa32c43.zip |
stm32g4: Fix ADC3 common interface registers name to ADC345_COMMON
Use ADC345_COMMON instead of ADC3_COMMON for stm32g4 ADC3 channel.
Signed-off-by: Amr Elsayed from Dropeffect GmbH <code@dropeffect.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/stm32/stm32h7_adc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/stm32/stm32h7_adc.c b/src/stm32/stm32h7_adc.c index e9dc8f84..3c217ca2 100644 --- a/src/stm32/stm32h7_adc.c +++ b/src/stm32/stm32h7_adc.c @@ -189,7 +189,11 @@ gpio_adc_setup(uint32_t pin) if (chan >= 2 * ADCIN_BANK_SIZE) { chan -= 2 * ADCIN_BANK_SIZE; adc = ADC3; +#if CONFIG_MACH_STM32G4 + adc_common = ADC345_COMMON; +#else adc_common = ADC3_COMMON; +#endif } else #endif #ifdef ADC2 |