Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,26 @@ matrix:
rust: stable
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)

# MSRV
- env: TARGET=thumbv6m-none-eabi
rust: 1.31.0
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)

# MSRV
- env: TARGET=thumbv7m-none-eabi
rust: 1.31.0
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)

# MSRV
- env: TARGET=thumbv7em-none-eabi
rust: 1.31.0
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)

# MSRV
- env: TARGET=thumbv7em-none-eabihf
rust: 1.31.0
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)

- env: TARGET=thumbv6m-none-eabi
rust: nightly
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ links = "cortex-m" # prevent multiple versions of this crate to be linked toget

[dependencies]
aligned = "0.3.1"
bare-metal = "0.2.0"
bare-metal = { version = "0.2.0", features = ["const-fn"] }
volatile-register = "0.2.0"

[features]
const-fn = []
cm7-r0p1 = []
const-fn = ["bare-metal/const-fn"]
inline-asm = []
4 changes: 2 additions & 2 deletions ci/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ main() {
cargo check --target $TARGET

if [ $TRAVIS_RUST_VERSION = nightly ]; then
cargo check --target $TARGET --features 'const-fn inline-asm'
cargo check --target $TARGET --features 'inline-asm'
fi

case $TARGET in
thumbv7em-none-eabi*)
cargo check --target $TARGET --features cm7-r0p1

if [ $TRAVIS_RUST_VERSION = nightly ]; then
cargo check --target $TARGET --features 'cm7-r0p1 const-fn inline-asm'
cargo check --target $TARGET --features 'cm7-r0p1 inline-asm'
fi
;;

Expand Down
7 changes: 3 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@
//!
//! The disadvantage is that `inline-asm` requires a nightly toolchain.
//!
//! ## `const-fn`
//! # Minimum Supported Rust Version (MSRV)
//!
//! Enabling this feature turns the `Mutex.new` constructor into a `const fn`.
//!
//! This feature requires a nightly toolchain.
//! 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))]
#![deny(missing_docs)]
Expand Down