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> + { + } + }; + ); }; }