diff --git a/embassy-stm32/src/timer/simple_pwm.rs b/embassy-stm32/src/timer/simple_pwm.rs index 8d3c9a131..757536c2d 100644 --- a/embassy-stm32/src/timer/simple_pwm.rs +++ b/embassy-stm32/src/timer/simple_pwm.rs @@ -414,8 +414,10 @@ macro_rules! impl_waveform_chx { ) .await } - #[cfg(not(any(stm32l0, bdma, gpdma)))] + #[cfg(not(any(stm32l0)))] TimerBits::Bits32 => { + #[cfg(any(bdma, gpdma))] + panic("unsupported timer bits"); Transfer::new_write( &mut dma, req, @@ -425,10 +427,6 @@ macro_rules! impl_waveform_chx { ) .await } - #[cfg(any(stm32l0, bdma, gpdma))] - _ => { - panic!("unsupported timer bits") - } }; };