Skip to content

Commit 90b8818

Browse files
committed
52840 considerations
1 parent e0e4482 commit 90b8818

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

nrf-hal-common/src/nvmc.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use core::ops::Deref;
44

55
#[cfg(any(feature = "52840"))]
6-
use crate::pac::nvmc::*;
6+
use crate::pac::nvmc;
77
#[cfg(any(feature = "9160"))]
88
use crate::pac::nvmc_ns as nvmc;
99
#[cfg(any(feature = "52840"))]
@@ -34,14 +34,23 @@ where
3434
}
3535

3636
fn enable_erase(&self) {
37+
#[cfg(any(feature = "52840"))]
38+
self.nvmc.config.write(|w| w.wen().een());
39+
#[cfg(any(feature = "9160"))]
3740
self.nvmc.configns.write(|w| w.wen().een());
3841
}
3942

4043
fn enable_write(&self) {
44+
#[cfg(any(feature = "52840"))]
45+
self.nvmc.config.write(|w| w.wen().wen());
46+
#[cfg(any(feature = "9160"))]
4147
self.nvmc.configns.write(|w| w.wen().wen());
4248
}
4349

4450
fn reset(&self) {
51+
#[cfg(any(feature = "52840"))]
52+
self.nvmc.config.reset();
53+
#[cfg(any(feature = "9160"))]
4554
self.nvmc.configns.reset();
4655
}
4756

0 commit comments

Comments
 (0)