Added system off and wake-on-field
This commit is contained in:
parent
45d9bd5757
commit
415db448c7
@ -107,6 +107,9 @@ pub mod nvmc;
|
||||
))]
|
||||
pub mod pdm;
|
||||
#[cfg(not(feature = "_nrf54l"))] // TODO
|
||||
#[cfg(feature = "nrf52840")]
|
||||
pub mod power;
|
||||
#[cfg(not(feature = "_nrf54l"))] // TODO
|
||||
pub mod ppi;
|
||||
#[cfg(not(feature = "_nrf54l"))] // TODO
|
||||
#[cfg(not(any(
|
||||
|
||||
13
embassy-nrf/src/power.rs
Normal file
13
embassy-nrf/src/power.rs
Normal file
@ -0,0 +1,13 @@
|
||||
//! Power
|
||||
|
||||
use crate::chip::pac::{NFCT, POWER};
|
||||
|
||||
/// Puts the MCU into "System Off" mode with a power usage 0f 0.4 uA
|
||||
pub fn set_system_off() {
|
||||
POWER.systemoff().write(|w| w.set_systemoff(true));
|
||||
}
|
||||
|
||||
/// Wake the system if there if an NFC field close to the nrf52840's antenna
|
||||
pub fn wake_on_nfc_sense() {
|
||||
NFCT.tasks_sense().write_value(0x01);
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user