Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
burrbull committed Mar 5, 2022
1 parent f8a442f commit 0b134cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gpio/outport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ macro_rules! out_port {
Self { $($d),+ }
}
const fn value_for_write_bsrr(val: u32) -> u32 {
$(let $d = ((val >> $i) & 0b1) != 0;)+
$(let $d = (val & (1 << $i)) != 0;)+
let r = 0;
$(let r = r | (1 << (if $d { $N } else { $N + 16 }));)+
r
Expand Down

0 comments on commit 0b134cb

Please sign in to comment.