Fixes for new PACs.
This commit is contained in:
parent
41dcebe446
commit
209183ebea
@ -17,7 +17,7 @@ log = [ "dep:log" ]
|
|||||||
defmt = { version = "0.3", optional = true }
|
defmt = { version = "0.3", optional = true }
|
||||||
log = { version = "0.4.14", 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"
|
cortex-m = "0.7.7"
|
||||||
|
|
||||||
embassy-time = { version = "0.4.0", path = "../embassy-time" }
|
embassy-time = { version = "0.4.0", path = "../embassy-time" }
|
||||||
|
|||||||
@ -624,10 +624,10 @@ impl<'d> Flex<'d> {
|
|||||||
pub fn set_drive_strength(&mut self, strength: Drive) {
|
pub fn set_drive_strength(&mut self, strength: Drive) {
|
||||||
self.pin.pad_ctrl().modify(|w| {
|
self.pin.pad_ctrl().modify(|w| {
|
||||||
w.set_drive(match strength {
|
w.set_drive(match strength {
|
||||||
Drive::_2mA => pac::pads::vals::Drive::_2MA,
|
Drive::_2mA => pac::pads::vals::Drive::_2M_A,
|
||||||
Drive::_4mA => pac::pads::vals::Drive::_4MA,
|
Drive::_4mA => pac::pads::vals::Drive::_4M_A,
|
||||||
Drive::_8mA => pac::pads::vals::Drive::_8MA,
|
Drive::_8mA => pac::pads::vals::Drive::_8M_A,
|
||||||
Drive::_12mA => pac::pads::vals::Drive::_12MA,
|
Drive::_12mA => pac::pads::vals::Drive::_12M_A,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -230,10 +230,10 @@ impl<'l, PIO: Instance> Pin<'l, PIO> {
|
|||||||
pub fn set_drive_strength(&mut self, strength: Drive) {
|
pub fn set_drive_strength(&mut self, strength: Drive) {
|
||||||
self.pin.pad_ctrl().modify(|w| {
|
self.pin.pad_ctrl().modify(|w| {
|
||||||
w.set_drive(match strength {
|
w.set_drive(match strength {
|
||||||
Drive::_2mA => pac::pads::vals::Drive::_2MA,
|
Drive::_2mA => pac::pads::vals::Drive::_2M_A,
|
||||||
Drive::_4mA => pac::pads::vals::Drive::_4MA,
|
Drive::_4mA => pac::pads::vals::Drive::_4M_A,
|
||||||
Drive::_8mA => pac::pads::vals::Drive::_8MA,
|
Drive::_8mA => pac::pads::vals::Drive::_8M_A,
|
||||||
Drive::_12mA => pac::pads::vals::Drive::_12MA,
|
Drive::_12mA => pac::pads::vals::Drive::_12M_A,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user