Move wake on sense to nfct

This commit is contained in:
Alexander Walter 2024-12-14 15:40:08 +01:00
parent c4f6509cf2
commit 3b5993cf48
2 changed files with 6 additions and 7 deletions

View File

@ -18,7 +18,7 @@ use embassy_sync::waitqueue::AtomicWaker;
pub use vals::{Bitframesdd as SddPat, Discardmode as DiscardMode};
use crate::interrupt::InterruptExt;
use crate::pac::nfct::vals;
use crate::pac::{nfct::vals, NFCT};
use crate::peripherals::NFCT;
use crate::util::slice_in_ram;
use crate::{interrupt, pac, Peripheral};
@ -420,3 +420,8 @@ impl<'d> NfcT<'d> {
Ok(n)
}
}
/// Wake the system if there if an NFC field close to the antenna
pub fn wake_on_nfc_sense() {
NFCT.tasks_sense().write_value(0x01);
}

View File

@ -14,9 +14,3 @@ pub fn set_system_off() {
#[cfg(any(feature = "nrf9160-s", feature = "nrf9160-ns"))]
REGULATORS.systemoff().write(|w| w.set_systemoff(true));
}
/// Wake the system if there if an NFC field close to the nrf52840's antenna
#[cfg(feature = "nrf52840")]
pub fn wake_on_nfc_sense() {
NFCT.tasks_sense().write_value(0x01);
}