From ba7496c5bffeb31cc206f24de3c35b6cf7ae962c Mon Sep 17 00:00:00 2001 From: Stian Eklund Date: Tue, 28 Apr 2020 22:11:31 +0200 Subject: 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. --- src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index aedb95a..7a641d2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,4 @@ +#![feature(llvm_asm)] //! Low level access to Cortex-M processors //! //! This crate provides: @@ -12,7 +13,7 @@ //! ## `inline-asm` //! //! When this feature is enabled the implementation of all the functions inside the `asm` and -//! `register` modules use inline assembly (`asm!`) instead of external assembly (FFI into separate +//! `register` modules use inline assembly (`llvm_asm!`) instead of external assembly (FFI into separate //! assembly files pre-compiled using `arm-none-eabi-gcc`). The advantages of enabling `inline-asm` //! are: //! -- cgit v1.2.3 From 7e551e6978536f7889b04d754a2e890993281a94 Mon Sep 17 00:00:00 2001 From: Stian Eklund Date: Tue, 5 May 2020 14:16:33 +0200 Subject: Use #!cfg_attr for inline_asm This fixes the previous commit where the #![feature()] flag was used by mistake. --- src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 7a641d2..89f420d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,3 @@ -#![feature(llvm_asm)] //! Low level access to Cortex-M processors //! //! This crate provides: @@ -30,7 +29,7 @@ //! This crate is guaranteed to compile on stable Rust 1.31 and up. It *might* //! compile with older versions but that may change in any new patch release. -#![cfg_attr(feature = "inline-asm", feature(asm))] +#![cfg_attr(feature = "inline-asm", feature(llvm_asm))] #![deny(missing_docs)] #![no_std] #![allow(clippy::identity_op)] -- cgit v1.2.3