Skip to content

Commit 03dd503

Browse files
committed
refactor: simplify timer bits handling
1 parent 7d74d15 commit 03dd503

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

embassy-stm32/src/timer/simple_pwm.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -414,8 +414,10 @@ macro_rules! impl_waveform_chx {
414414
)
415415
.await
416416
}
417-
#[cfg(not(any(stm32l0, bdma, gpdma)))]
417+
#[cfg(not(any(stm32l0)))]
418418
TimerBits::Bits32 => {
419+
#[cfg(any(bdma, gpdma))]
420+
panic("unsupported timer bits");
419421
Transfer::new_write(
420422
&mut dma,
421423
req,
@@ -425,10 +427,6 @@ macro_rules! impl_waveform_chx {
425427
)
426428
.await
427429
}
428-
#[cfg(any(stm32l0, bdma, gpdma))]
429-
_ => {
430-
panic!("unsupported timer bits")
431-
}
432430
};
433431
};
434432

0 commit comments

Comments
 (0)