aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authori509VCB <[email protected]>2025-04-03 04:00:37 +0000
committerGitHub <[email protected]>2025-04-03 04:00:37 +0000
commita10de5f408a3902a6c5b1b85d520cd1846fc0e7b (patch)
tree0604aaf0c3029f519db8dbde9a88a7d88ec6f067
parenta137a160671d3ede48519e5faf316f31f6f6cbd3 (diff)
parent03061a081783f54ea6614d70dfd7f4b3d5256cbb (diff)
Merge pull request #4037 from optlink/mspm0-pf
mspm0: Fix `set_pf_unchecked()` assertion
-rw-r--r--embassy-mspm0/src/gpio.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/embassy-mspm0/src/gpio.rs b/embassy-mspm0/src/gpio.rs
index 2edadbc5a..f9dcade4f 100644
--- a/embassy-mspm0/src/gpio.rs
+++ b/embassy-mspm0/src/gpio.rs
@@ -208,8 +208,8 @@ impl<'d> Flex<'d> {
208 /// or technical reference manual for additional details. 208 /// or technical reference manual for additional details.
209 #[inline] 209 #[inline]
210 pub fn set_pf_unchecked(&mut self, pf: u8) { 210 pub fn set_pf_unchecked(&mut self, pf: u8) {
211 // Per SLAU893, PF is only 5 bits 211 // Per SLAU893 and SLAU846B, PF is only 6 bits
212 assert!((pf & 0x3F) != 0, "PF is out of range"); 212 assert_eq!(pf & 0xC0, 0, "PF is out of range");
213 213
214 let pincm = pac::IOMUX.pincm(self.pin.pin_cm() as usize); 214 let pincm = pac::IOMUX.pincm(self.pin.pin_cm() as usize);
215 215