Skip to content

Commit 0b134cb

Browse files
committed
fix
1 parent f8a442f commit 0b134cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gpio/outport.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ macro_rules! out_port {
2828
Self { $($d),+ }
2929
}
3030
const fn value_for_write_bsrr(val: u32) -> u32 {
31-
$(let $d = ((val >> $i) & 0b1) != 0;)+
31+
$(let $d = (val & (1 << $i)) != 0;)+
3232
let r = 0;
3333
$(let r = r | (1 << (if $d { $N } else { $N + 16 }));)+
3434
r

0 commit comments

Comments
 (0)