From 04dd1d9e775af75f8a122d9f00c17444b7a183a5 Mon Sep 17 00:00:00 2001 From: Dion Dokter Date: Mon, 14 Apr 2025 14:57:28 +0200 Subject: [PATCH] Add the ADC5 to the DMA codegen for the STM32g4x3 and g4x4 --- embassy-stm32/build.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/embassy-stm32/build.rs b/embassy-stm32/build.rs index d965d8732..bb1f1c047 100644 --- a/embassy-stm32/build.rs +++ b/embassy-stm32/build.rs @@ -1412,6 +1412,13 @@ fn main() { signals.insert(("adc", "ADC4"), quote!(crate::adc::RxDma)); } + if chip_name.starts_with("stm32g4") { + let line_number = chip_name.chars().skip(8).next().unwrap(); + if line_number == '3' || line_number == '4' { + signals.insert(("adc", "ADC5"), quote!(crate::adc::RxDma)); + } + } + for p in METADATA.peripherals { if let Some(regs) = &p.registers { // FIXME: stm32u5a crash on Cordic driver