Skip to content

Commit

Permalink
fix gpio mode change
Browse files Browse the repository at this point in the history
  • Loading branch information
burrbull committed Oct 14, 2024
1 parent 101cdf4 commit 1df3703
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ where
}
8..=15 => {
gpio.crh()
.modify(|_, w| unsafe { w.mode(N - 16).bits(speed as u8) });
.modify(|_, w| unsafe { w.mode(N - 8).bits(speed as u8) });
}
_ => unreachable!(),
}
Expand Down Expand Up @@ -979,8 +979,8 @@ where
}
8..=15 => {
gpio.crh().modify(|_, w| unsafe {
w.mode(N - 16).bits(MODE::MODE as u8);
w.cnf(N - 16).bits(MODE::CNF as u8)
w.mode(N - 8).bits(MODE::MODE as u8);
w.cnf(N - 8).bits(MODE::CNF as u8)
});
}
_ => unreachable!(),
Expand Down

0 comments on commit 1df3703

Please sign in to comment.