Compare commits
5 Commits
6fec9ca38f
...
c057499975
Author | SHA1 | Date |
---|---|---|
Geert Stappers | c057499975 | |
Geert Stappers | 61a8e0d144 | |
Geert Stappers | c113fc881e | |
Geert Stappers | ba9e78840c | |
Geert Stappers | 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",
|
||||||
|
@ -29,7 +29,7 @@ all-mcus = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
avr-config = { version = "2.0", features = ["cpu-frequency"] }
|
avr-config = { version = "2.0", features = ["cpu-frequency"] }
|
||||||
avr_delay = { git = "https://github.com/avr-rust/delay", version = "0.4" }
|
avr_delay = { git = "https://github.com/avr-rust/delay", rev = "849918a8dfb2" }
|
||||||
avr-std-stub = { version = "1.0", optional = true }
|
avr-std-stub = { version = "1.0", optional = true }
|
||||||
const_env--value = "0.1"
|
const_env--value = "0.1"
|
||||||
target-cpu-macro = "0.1"
|
target-cpu-macro = "0.1"
|
||||||
|
|
|
@ -10,8 +10,7 @@ RUN mkdir -p /code && chown avr-rust:avr-rust /code
|
||||||
USER avr-rust
|
USER avr-rust
|
||||||
|
|
||||||
# Install Rustup along with nightly
|
# Install Rustup along with nightly
|
||||||
# TODO: Unpin from Jan 2021 nightly. The nightlies broke midway through the month.
|
RUN wget -q https://sh.rustup.rs -O /tmp/rustup.sh && sh /tmp/rustup.sh -y --profile minimal --default-toolchain nightly -c rust-src --quiet
|
||||||
RUN wget -q https://sh.rustup.rs -O /tmp/rustup.sh && sh /tmp/rustup.sh -y --profile minimal --default-toolchain nightly-2021-01-05 -c rust-src --quiet
|
|
||||||
ENV PATH=/home/avr-rust/.cargo/bin:$PATH
|
ENV PATH=/home/avr-rust/.cargo/bin:$PATH
|
||||||
|
|
||||||
COPY --chown=avr-rust:avr-rust . /code/ruduino
|
COPY --chown=avr-rust:avr-rust . /code/ruduino
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
"linker-flavor": "gcc",
|
"linker-flavor": "gcc",
|
||||||
"linker-is-gnu": true,
|
"linker-is-gnu": true,
|
||||||
"llvm-target": "avr-unknown-unknown",
|
"llvm-target": "avr-unknown-unknown",
|
||||||
"no-compiler-rt": true,
|
|
||||||
"os": "unknown",
|
"os": "unknown",
|
||||||
"position-independent-executables": false,
|
"position-independent-executables": false,
|
||||||
"exe-suffix": ".elf",
|
"exe-suffix": ".elf",
|
||||||
|
|
|
@ -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