Switching from llvm_asm!() to asm!()
Macro llvm_asm is replace by asm. This a reason to increase the version number.
This commit is contained in:
parent
6fec9ca38f
commit
a33d38a755
|
@ -6,7 +6,7 @@ members = [
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "ruduino"
|
name = "ruduino"
|
||||||
version = "0.3.3"
|
version = "0.4.0"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
authors = [
|
authors = [
|
||||||
"The AVR-Rust Project Developers",
|
"The AVR-Rust Project Developers",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
//! Routines for managing interrupts.
|
//! Routines for managing interrupts.
|
||||||
|
|
||||||
|
use core::arch::asm;
|
||||||
use core::prelude::v1::*;
|
use core::prelude::v1::*;
|
||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
|
|
||||||
|
@ -22,7 +23,7 @@ pub fn without_interrupts<F, T>(f: F) -> T
|
||||||
impl DisableInterrupts {
|
impl DisableInterrupts {
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub fn new() -> DisableInterrupts {
|
pub fn new() -> DisableInterrupts {
|
||||||
unsafe { llvm_asm!("CLI") }
|
unsafe { asm!("CLI") }
|
||||||
DisableInterrupts(PhantomData)
|
DisableInterrupts(PhantomData)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,7 +31,7 @@ impl DisableInterrupts {
|
||||||
impl Drop for DisableInterrupts {
|
impl Drop for DisableInterrupts {
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
unsafe { llvm_asm!("SEI") }
|
unsafe { asm!("SEI") }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//! Definitions of register addresses and bits within those registers
|
//! Definitions of register addresses and bits within those registers
|
||||||
|
|
||||||
#![feature(llvm_asm)]
|
#![feature(asm_experimental_arch)]
|
||||||
#![feature(associated_type_defaults)]
|
#![feature(associated_type_defaults)]
|
||||||
#![feature(lang_items)]
|
#![feature(lang_items)]
|
||||||
#![feature(proc_macro_hygiene)]
|
#![feature(proc_macro_hygiene)]
|
||||||
|
|
Loading…
Reference in New Issue