Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
usbalbin committed Dec 15, 2024
1 parent 2811a92 commit 42ac0f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -780,10 +780,8 @@ macro_rules! gpio_trait {
fn foo(x: crate::pac::gpioa::RegisterBlock, n: u8) {
x.bsrr().write(|w| w.br(n).set_bit());
x.odr().read().odr(n).is_low();

}


/// Implement `private::{Moder, Ospeedr, Otyper, Pupdr}` traits for each opaque register structs
macro_rules! r_trait {
(
Expand Down
6 changes: 2 additions & 4 deletions src/i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,7 @@ where
self.i2c.cr2().modify(|_, w| {
if i == 0 {
w.add10().bit7();
w.sadd()
.set(u16::from(crate::unwrap!(addr.checked_shl(1))));
w.sadd().set(u16::from(crate::unwrap!(addr.checked_shl(1))));
w.rd_wrn().write();
w.start().start();
}
Expand Down Expand Up @@ -420,8 +419,7 @@ where
self.i2c.cr2().modify(|_, w| {
if i == 0 {
w.add10().bit7();
w.sadd()
.set(u16::from(crate::unwrap!(addr.checked_shl(1))));
w.sadd().set(u16::from(crate::unwrap!(addr.checked_shl(1))));
w.rd_wrn().read();
w.start().start();
}
Expand Down

0 comments on commit 42ac0f1

Please sign in to comment.