mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-13 07:48:30 +00:00
add a wfi api
This commit is contained in:
parent
df3529d595
commit
def8da571b
1 changed files with 8 additions and 2 deletions
|
|
@ -1,11 +1,9 @@
|
|||
pub mod api;
|
||||
pub mod i2c_lib;
|
||||
pub mod trng;
|
||||
|
||||
use core::sync::atomic::{AtomicU32, Ordering};
|
||||
|
||||
use bao1x_api::*;
|
||||
pub use i2c_lib::*;
|
||||
use num_traits::*;
|
||||
static REFCOUNT: AtomicU32 = AtomicU32::new(0);
|
||||
|
||||
|
|
@ -98,6 +96,14 @@ impl Hal {
|
|||
)
|
||||
.expect("Couldn't setup preemption state");
|
||||
}
|
||||
|
||||
pub fn wfi(&self) {
|
||||
xous::send_message(
|
||||
self.conn,
|
||||
xous::Message::new_blocking_scalar(HalOpcode::Wfi.to_usize().unwrap(), 0, 0, 0, 0),
|
||||
)
|
||||
.expect("Couldn't setup preemption state");
|
||||
}
|
||||
}
|
||||
|
||||
impl UdmaGlobalConfig for UdmaGlobal {
|
||||
|
|
|
|||
Loading…
Reference in a new issue