aboutsummaryrefslogtreecommitdiff
path: root/src/interrupt.rs
diff options
context:
space:
mode:
authorGravatar Stian Eklund <stian.eklund@gmail.com> 2020-04-28 22:11:31 +0200
committerGravatar Stian Eklund <stian.eklund@gmail.com> 2020-04-28 22:11:31 +0200
commitba7496c5bffeb31cc206f24de3c35b6cf7ae962c (patch)
tree04dd19ddf5afd42fbe27516f170fa1d755a69017 /src/interrupt.rs
parente41b27331c70865b89b5584b13c0b469de30daff (diff)
downloadcortex-m-ba7496c5bffeb31cc206f24de3c35b6cf7ae962c.tar.gz
cortex-m-ba7496c5bffeb31cc206f24de3c35b6cf7ae962c.tar.zst
cortex-m-ba7496c5bffeb31cc206f24de3c35b6cf7ae962c.zip
Use llmv_asm! macro for inline assembly
\ fixes #204 the `asm!` macro will soon be deprecated. This changes all of the `asm!` calls to `llvm_asm!` To my knowledge doing a direct replacement should be fine.
Diffstat (limited to 'src/interrupt.rs')
-rw-r--r--src/interrupt.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interrupt.rs b/src/interrupt.rs
index 2d53865..4d5ef0f 100644
--- a/src/interrupt.rs
+++ b/src/interrupt.rs
@@ -10,7 +10,7 @@ pub fn disable() {
match () {
#[cfg(all(cortex_m, feature = "inline-asm"))]
() => unsafe {
- asm!("cpsid i" ::: "memory" : "volatile");
+ llvm_asm!("cpsid i" ::: "memory" : "volatile");
},
#[cfg(all(cortex_m, not(feature = "inline-asm")))]
@@ -37,7 +37,7 @@ pub fn disable() {
pub unsafe fn enable() {
match () {
#[cfg(all(cortex_m, feature = "inline-asm"))]
- () => asm!("cpsie i" ::: "memory" : "volatile"),
+ () => llvm_asm!("cpsie i" ::: "memory" : "volatile"),
#[cfg(all(cortex_m, not(feature = "inline-asm")))]
() => {