Fixes for new PACs.

This commit is contained in:
Dario Nieuwenhuis 2025-01-06 13:22:44 +01:00
parent 41dcebe446
commit 209183ebea
3 changed files with 9 additions and 9 deletions

View File

@ -17,7 +17,7 @@ log = [ "dep:log" ]
defmt = { version = "0.3", optional = true }
log = { version = "0.4.14", optional = true }
nrf-pac = { git = "https://github.com/embassy-rs/nrf-pac", rev = "52e3a757f06035c94291bfc42b0c03f71e4d677e" }
nrf-pac = "0.1.0"
cortex-m = "0.7.7"
embassy-time = { version = "0.4.0", path = "../embassy-time" }

View File

@ -624,10 +624,10 @@ impl<'d> Flex<'d> {
pub fn set_drive_strength(&mut self, strength: Drive) {
self.pin.pad_ctrl().modify(|w| {
w.set_drive(match strength {
Drive::_2mA => pac::pads::vals::Drive::_2MA,
Drive::_4mA => pac::pads::vals::Drive::_4MA,
Drive::_8mA => pac::pads::vals::Drive::_8MA,
Drive::_12mA => pac::pads::vals::Drive::_12MA,
Drive::_2mA => pac::pads::vals::Drive::_2M_A,
Drive::_4mA => pac::pads::vals::Drive::_4M_A,
Drive::_8mA => pac::pads::vals::Drive::_8M_A,
Drive::_12mA => pac::pads::vals::Drive::_12M_A,
});
});
}

View File

@ -230,10 +230,10 @@ impl<'l, PIO: Instance> Pin<'l, PIO> {
pub fn set_drive_strength(&mut self, strength: Drive) {
self.pin.pad_ctrl().modify(|w| {
w.set_drive(match strength {
Drive::_2mA => pac::pads::vals::Drive::_2MA,
Drive::_4mA => pac::pads::vals::Drive::_4MA,
Drive::_8mA => pac::pads::vals::Drive::_8MA,
Drive::_12mA => pac::pads::vals::Drive::_12MA,
Drive::_2mA => pac::pads::vals::Drive::_2M_A,
Drive::_4mA => pac::pads::vals::Drive::_4M_A,
Drive::_8mA => pac::pads::vals::Drive::_8M_A,
Drive::_12mA => pac::pads::vals::Drive::_12M_A,
});
});
}