~ruther/avr-device

c314463726a2867b038b243f818b1f999c8ca22a — Liam Perlaki 4 years ago 67d2554
Use llvm_asm!() instead of asm!()

The asm!() feature was changed to a new syntax which this project did not yet
adopt.  The old asm!() is now available as llvm_asm!().  Switch to that to
support nightly build.

See PR #27 for details.
2 files changed, 4 insertions(+), 4 deletions(-)

M src/interrupt.rs
M src/lib.rs
M src/interrupt.rs => src/interrupt.rs +3 -3
@@ 14,7 14,7 @@ pub use bare_metal::{CriticalSection, Mutex, Nr};
/// Disables all interrupts
pub fn disable() {
    unsafe {
        asm!(
        llvm_asm!(
            "cli" :::: "volatile"
        );
    }


@@ 28,7 28,7 @@ pub fn disable() {
/// - Do not call this function inside an [crate::interrupt::free] critical section
pub fn enable() {
    unsafe {
        asm!(
        llvm_asm!(
            "sei" :::: "volatile"
        );
    }


@@ 45,7 45,7 @@ where

    // Store current state
    unsafe {
        asm!(
        llvm_asm!(
            "in $0,0x35"
            : "=r"(sreg)
            :

M src/lib.rs => src/lib.rs +1 -1
@@ 16,7 16,7 @@
//! * `atmega64`
//! * `attiny85`
#![no_std]
#![feature(asm)]
#![feature(llvm_asm)]

pub mod interrupt;


Do not follow this link