aboutsummaryrefslogtreecommitdiff
path: root/src/asm.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/asm.rs')
-rw-r--r--src/asm.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/asm.rs b/src/asm.rs
index 1de0d32..a70cd93 100644
--- a/src/asm.rs
+++ b/src/asm.rs
@@ -49,3 +49,8 @@ pub unsafe fn wfi() {
() => {}
}
}
+
+/// A no-operation. Useful to stop delay loops being elided.
+pub fn nop() {
+ asm!("nop" :::: "volatile");
+}