summaryrefslogtreecommitdiffstatshomepage
path: root/ports/stm32/adc.h
diff options
context:
space:
mode:
authorHerwin Grobben <h.grobben@aemics.nl>2021-01-26 14:49:56 +0100
committerDamien George <damien@micropython.org>2022-02-01 16:21:01 +1100
commit8f68e26f79ee325669fb7dc7bbd092fccd5b038f (patch)
tree9b958a5127f0872a099dab9c044c2a88f2d278aa /ports/stm32/adc.h
parent60e05ae84ec08c06e3f9d9051339811641479a94 (diff)
downloadmicropython-8f68e26f79ee325669fb7dc7bbd092fccd5b038f.tar.gz
micropython-8f68e26f79ee325669fb7dc7bbd092fccd5b038f.zip
stm32: Add support for G4 MCUs, and add NUCLEO_G474RE board defn.
This commit adds support for the STM32G4 series of MCUs, and a board definition for NUCLEO_G474RE. This board has the REPL on LPUART1 which is connected to the on-board ST-link USB-UART.
Diffstat (limited to 'ports/stm32/adc.h')
-rw-r--r--ports/stm32/adc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/ports/stm32/adc.h b/ports/stm32/adc.h
index 9101b9db83..db706ea494 100644
--- a/ports/stm32/adc.h
+++ b/ports/stm32/adc.h
@@ -48,6 +48,8 @@ static inline void adc_deselect_vbat(ADC_TypeDef *adc, uint32_t channel) {
adc_common = ADC_COMMON_REGISTER(0);
#elif defined(STM32F7)
adc_common = ADC123_COMMON;
+ #elif defined(STM32G4)
+ adc_common = ADC12_COMMON;
#elif defined(STM32H7A3xx) || defined(STM32H7A3xxQ) || defined(STM32H7B3xx) || defined(STM32H7B3xxQ)
adc_common = ADC12_COMMON;
#elif defined(STM32H7)