From 03061a081783f54ea6614d70dfd7f4b3d5256cbb Mon Sep 17 00:00:00 2001 From: Kelsey Maes Date: Wed, 2 Apr 2025 08:33:12 -0700 Subject: [PATCH] mspm0: Fix `set_pf_unchecked()` assertion --- embassy-mspm0/src/gpio.rs | 4 ++-- 1 file 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> { /// or technical reference manual for additional details. #[inline] pub fn set_pf_unchecked(&mut self, pf: u8) { - // Per SLAU893, PF is only 5 bits - assert!((pf & 0x3F) != 0, "PF is out of range"); + // Per SLAU893 and SLAU846B, PF is only 6 bits + assert_eq!(pf & 0xC0, 0, "PF is out of range"); let pincm = pac::IOMUX.pincm(self.pin.pin_cm() as usize);