From a33d38a7554f2c362fcfb54044d204c19fd9ac1a Mon Sep 17 00:00:00 2001 From: Geert Stappers Date: Wed, 8 Jun 2022 11:32:07 +0200 Subject: [PATCH] Switching from llvm_asm!() to asm!() Macro llvm_asm is replace by asm. This a reason to increase the version number. --- Cargo.toml | 2 +- src/interrupt.rs | 5 +++-- src/lib.rs | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 405ccc5..fd4766c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ members = [ [package] name = "ruduino" -version = "0.3.3" +version = "0.4.0" edition = "2018" authors = [ "The AVR-Rust Project Developers", diff --git a/src/interrupt.rs b/src/interrupt.rs index 8c438b5..3196347 100644 --- a/src/interrupt.rs +++ b/src/interrupt.rs @@ -1,5 +1,6 @@ //! Routines for managing interrupts. +use core::arch::asm; use core::prelude::v1::*; use core::marker::PhantomData; @@ -22,7 +23,7 @@ pub fn without_interrupts(f: F) -> T impl DisableInterrupts { #[inline(always)] pub fn new() -> DisableInterrupts { - unsafe { llvm_asm!("CLI") } + unsafe { asm!("CLI") } DisableInterrupts(PhantomData) } } @@ -30,7 +31,7 @@ impl DisableInterrupts { impl Drop for DisableInterrupts { #[inline(always)] fn drop(&mut self) { - unsafe { llvm_asm!("SEI") } + unsafe { asm!("SEI") } } } diff --git a/src/lib.rs b/src/lib.rs index 73e1bda..247229c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,6 @@ //! Definitions of register addresses and bits within those registers -#![feature(llvm_asm)] +#![feature(asm_experimental_arch)] #![feature(associated_type_defaults)] #![feature(lang_items)] #![feature(proc_macro_hygiene)]