From 97172c36b76d07fd45d96eff34be7913f0063f03 Mon Sep 17 00:00:00 2001 From: Adam Greig Date: Fri, 18 Apr 2025 14:41:56 +0100 Subject: [PATCH] STM32: Fix G4 build without defmt feature --- embassy-stm32/src/opamp.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/embassy-stm32/src/opamp.rs b/embassy-stm32/src/opamp.rs index 82de4a89b..28ae2a3eb 100644 --- a/embassy-stm32/src/opamp.rs +++ b/embassy-stm32/src/opamp.rs @@ -435,11 +435,13 @@ impl<'d, T: Instance> OpAmp<'d, T> { T::regs().csr().modify(|w| match pair { OpAmpDifferentialPair::P => { - defmt::info!("p calibration. offset: {}", mid); + #[cfg(feature = "defmt")] + defmt::debug!("opamp p calibration. offset: {}", mid); w.set_trimoffsetp(mid); } OpAmpDifferentialPair::N => { - defmt::info!("n calibration. offset: {}", mid); + #[cfg(feature = "defmt")] + defmt::debug!("opamp n calibration. offset: {}", mid); w.set_trimoffsetn(mid); } });