mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-10-02 14:44:32 +00:00
Move wake on sense to nfct
This commit is contained in:
parent
c4f6509cf2
commit
3b5993cf48
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user