fix masking bug in iox implementation

This commit is contained in:
bunnie 2024-04-30 17:10:28 +08:00
parent 34489d5f94
commit 436be7ae9c

View file

@ -126,7 +126,7 @@ impl Iox {
let oe_ptr = self.csr.base(); let oe_ptr = self.csr.base();
IoxValue::from( IoxValue::from(
oe_ptr.add(iox::SFR_GPIOIN_SRGI0.offset() + port as usize).read_volatile() oe_ptr.add(iox::SFR_GPIOIN_SRGI0.offset() + port as usize).read_volatile()
& !(1u32 << (pin as u32)), & (1u32 << (pin as u32)),
) )
} }
} }