2019-05-05 20:56:23 +08:00
|
|
|
/// The classic no-op
|
|
|
|
#[inline]
|
|
|
|
pub fn nop() {
|
|
|
|
unsafe { asm!("nop" :::: "volatile") }
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Wait For Event
|
|
|
|
#[inline]
|
|
|
|
pub fn wfe() {
|
|
|
|
unsafe { asm!("wfe" :::: "volatile") }
|
|
|
|
}
|
2019-05-24 01:05:06 +08:00
|
|
|
|
2019-11-16 06:54:26 +08:00
|
|
|
/// Send Event
|
|
|
|
#[inline]
|
|
|
|
pub fn sev() {
|
|
|
|
unsafe { asm!("sev" :::: "volatile") }
|
|
|
|
}
|
|
|
|
|
2019-05-24 01:05:06 +08:00
|
|
|
/// Data Memory Barrier
|
|
|
|
#[inline]
|
|
|
|
pub fn dmb() {
|
|
|
|
unsafe { asm!("dmb" :::: "volatile") }
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Data Synchronization Barrier
|
|
|
|
#[inline]
|
|
|
|
pub fn dsb() {
|
|
|
|
unsafe { asm!("dsb" :::: "volatile") }
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Instruction Synchronization Barrier
|
|
|
|
#[inline]
|
|
|
|
pub fn isb() {
|
|
|
|
unsafe { asm!("isb" :::: "volatile") }
|
|
|
|
}
|