This repository was archived by the owner on Nov 7, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +13
-4
lines changed
Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -19,5 +19,9 @@ exclude = [
1919 " Makefile"
2020]
2121
22+ [features ]
23+ default = [" nightly" ]
24+ nightly = [" tock-registers" ]
25+
2226[dependencies ]
23- tock-registers = { version = " 0.7.x" , default-features = false } # Use it as interface-only library.
27+ tock-registers = { version = " 0.7.x" , default-features = false , optional = true } # Use it as interface-only library.
Original file line number Diff line number Diff line change @@ -12,7 +12,8 @@ Low level access to Cortex-A processors.
1212
1313## Minimum Supported Rust Version
1414
15- Requires a recent nightly of Rust.
15+ Requires a recent nightly of Rust if the (default) ` nightly ` feature is enabled. Without this the
16+ register access module is not available.
1617
1718## Usage
1819
Original file line number Diff line number Diff line change 4747//! code.
4848//!
4949//! ```rust
50+ //! # #[cfg(feature = "nightly")]
5051//! use cortex_a::{asm, registers::*};
52+ //! # #[cfg(feature = "nightly")]
5153//! use tock_registers::interfaces::Writeable; // <-- Trait needed to use `write()` and `set()`.
5254//!
5355//! // Some parts omitted for brevity.
5456//!
57+ //! # #[cfg(feature = "nightly")]
5558//! unsafe fn prepare_el2_to_el1_transition(
5659//! virt_boot_core_stack_end_exclusive_addr: u64,
5760//! virt_kernel_init_addr: u64,
8285//! ARMv8, for ARMv8-A architecture
8386//! profile](https://static.docs.arm.com/ddi0487/ca/DDI0487C_a_armv8_arm.pdf?_ga=2.266626254.1122218691.1534883460-1326731866.1530967873).
8487
85- #![ feature( core_intrinsics) ]
86- #![ feature( custom_inner_attributes) ]
88+ #![ cfg_attr ( feature = "nightly" , feature ( core_intrinsics) ) ]
89+ #![ cfg_attr ( feature = "nightly" , feature ( custom_inner_attributes) ) ]
8790#![ no_std]
8891
8992pub mod asm;
93+ #[ cfg( feature = "nightly" ) ]
9094pub mod registers;
You can’t perform that action at this time.
0 commit comments