aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32
diff options
context:
space:
mode:
authoreverdrone <[email protected]>2025-11-15 18:07:10 +0100
committereverdrone <[email protected]>2025-11-15 18:07:10 +0100
commit3fb16229c7a237c29731aa05d5f29e8ea2eb015f (patch)
treeaf4ce47253e40f406d1c633adaa062876814dee8 /embassy-stm32
parent5926690bfbd366beca13c8b5d0ab4b7a3519aa44 (diff)
use try_into and unwrap
Diffstat (limited to 'embassy-stm32')
-rw-r--r--embassy-stm32/src/sai/mod.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/embassy-stm32/src/sai/mod.rs b/embassy-stm32/src/sai/mod.rs
index 58e3b832a..ce4bc43c3 100644
--- a/embassy-stm32/src/sai/mod.rs
+++ b/embassy-stm32/src/sai/mod.rs
@@ -696,12 +696,7 @@ impl<'d, T: Instance, W: word::Word> Sai<'d, T, W> {
696 w.set_fspol(config.frame_sync_polarity.fspol()); 696 w.set_fspol(config.frame_sync_polarity.fspol());
697 w.set_fsdef(config.frame_sync_definition.fsdef()); 697 w.set_fsdef(config.frame_sync_definition.fsdef());
698 w.set_fsall(config.frame_sync_active_level_length.0 as u8 - 1); 698 w.set_fsall(config.frame_sync_active_level_length.0 as u8 - 1);
699 699 w.set_frl((config.frame_length - 1).try_into().unwrap());
700 if config.frame_length > 256 {
701 panic!("Frame length cannot be greater than 256");
702 }
703
704 w.set_frl((config.frame_length - 1) as u8);
705 }); 700 });
706 701
707 ch.slotr().modify(|w| { 702 ch.slotr().modify(|w| {