refactor: simplify timer bits handling

This commit is contained in:
Liu Hancheng 2025-01-04 21:38:22 +08:00
parent 7d74d15b18
commit 03dd50316c

View File

@ -414,8 +414,10 @@ macro_rules! impl_waveform_chx {
) )
.await .await
} }
#[cfg(not(any(stm32l0, bdma, gpdma)))] #[cfg(not(any(stm32l0)))]
TimerBits::Bits32 => { TimerBits::Bits32 => {
#[cfg(any(bdma, gpdma))]
panic("unsupported timer bits");
Transfer::new_write( Transfer::new_write(
&mut dma, &mut dma,
req, req,
@ -425,10 +427,6 @@ macro_rules! impl_waveform_chx {
) )
.await .await
} }
#[cfg(any(stm32l0, bdma, gpdma))]
_ => {
panic!("unsupported timer bits")
}
}; };
}; };