mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-25 08:12:30 +00:00
Remove wrong modulo
This commit is contained in:
parent
5cba97821f
commit
ac76a713e1
@ -688,7 +688,7 @@ pub(crate) trait SealedPin {
|
||||
let crlh = if n < 8 { 0 } else { 1 };
|
||||
match r.cr(crlh).read().mode(n % 8) {
|
||||
vals::Mode::INPUT => match r.cr(crlh).read().cnf_in(n % 8) {
|
||||
vals::CnfIn::PULL => match r.odr().read().odr(n % 8) {
|
||||
vals::CnfIn::PULL => match r.odr().read().odr(n) {
|
||||
vals::Odr::LOW => Pull::Down,
|
||||
vals::Odr::HIGH => Pull::Up,
|
||||
},
|
||||
@ -699,7 +699,7 @@ pub(crate) trait SealedPin {
|
||||
}
|
||||
#[cfg(gpio_v2)]
|
||||
{
|
||||
match r.pupdr().read().pupdr(n % 8) {
|
||||
match r.pupdr().read().pupdr(n) {
|
||||
vals::Pupdr::FLOATING => Pull::None,
|
||||
vals::Pupdr::PULLDOWN => Pull::Down,
|
||||
vals::Pupdr::PULLUP => Pull::Up,
|
||||
|
Loading…
Reference in New Issue
Block a user