diff --git a/hal/src/peripherals/eic/d11/pin.rs b/hal/src/peripherals/eic/d11/pin.rs index c85ad0e64eb..9b3148fe5df 100644 --- a/hal/src/peripherals/eic/d11/pin.rs +++ b/hal/src/peripherals/eic/d11/pin.rs @@ -55,7 +55,7 @@ where self.chan .eic .evctrl() - .modify(|r, w| unsafe { w.bits(r.bits() | 1 << P::ChId::ID) }); + .modify(|r, w| unsafe { w.bits(r.bits() | (1 << P::ChId::ID)) }); } pub fn enable_interrupt(&mut self) { @@ -69,7 +69,7 @@ where self.chan .eic .wakeup() - .modify(|r, w| unsafe { w.bits(r.bits() | 1 << P::ChId::ID) }) + .modify(|r, w| unsafe { w.bits(r.bits() | (1 << P::ChId::ID)) }) } pub fn disable_interrupt(&mut self) { diff --git a/hal/src/sercom/i2c/reg.rs b/hal/src/sercom/i2c/reg.rs index 41dc725499b..8d02510c461 100644 --- a/hal/src/sercom/i2c/reg.rs +++ b/hal/src/sercom/i2c/reg.rs @@ -543,5 +543,5 @@ fn encode_write_address(addr_7_bits: u8) -> u16 { } fn encode_read_address(addr_7_bits: u8) -> u16 { - (addr_7_bits as u16) << 1 | 1 + ((addr_7_bits as u16) << 1) | 1 }