From 7c5f963d1fd3b49064be8a75975ac5a72ba84356 Mon Sep 17 00:00:00 2001 From: xoviat Date: Sat, 21 Oct 2023 07:32:04 -0500 Subject: [PATCH] stm32: fix opamp bug in docs build --- embassy-stm32/src/opamp.rs | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/embassy-stm32/src/opamp.rs b/embassy-stm32/src/opamp.rs index e0fad26e..cb55cbe1 100644 --- a/embassy-stm32/src/opamp.rs +++ b/embassy-stm32/src/opamp.rs @@ -101,18 +101,22 @@ pub trait InvertingPin: sealed::InvertingPin {} #[cfg(opamp_f3)] macro_rules! impl_opamp_output { ($inst:ident, $adc:ident, $ch:expr) => { - impl<'d, 'p, P: NonInvertingPin> crate::adc::sealed::AdcPin - for OpAmpOutput<'d, 'p, crate::peripherals::$inst, P> - { - fn channel(&self) -> u8 { - $ch - } - } + foreach_adc!( + ($adc, $common_inst:ident, $adc_clock:ident) => { + impl<'d, 'p, P: NonInvertingPin> crate::adc::sealed::AdcPin + for OpAmpOutput<'d, 'p, crate::peripherals::$inst, P> + { + fn channel(&self) -> u8 { + $ch + } + } - impl<'d, 'p, P: NonInvertingPin> crate::adc::AdcPin - for OpAmpOutput<'d, 'p, crate::peripherals::$inst, P> - { - } + impl<'d, 'p, P: NonInvertingPin> crate::adc::AdcPin + for OpAmpOutput<'d, 'p, crate::peripherals::$inst, P> + { + } + }; + ); }; }