Merge pull request #4037 from optlink/mspm0-pf

mspm0: Fix `set_pf_unchecked()` assertion
This commit is contained in:
i509VCB 2025-04-03 04:00:37 +00:00 committed by GitHub
commit a10de5f408
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);