diff options
author | 2021-12-07 12:53:40 +0100 | |
---|---|---|
committer | 2021-12-07 13:07:16 +0100 | |
commit | 3b44533324499d355445b502dfff987da8546f1c (patch) | |
tree | f3cdce4e14ce2d970c5658648aa6062af760a20c | |
parent | bcb76ef24cda4b4b06830d7e63b55cf64b3148da (diff) | |
download | cortex-m-3b44533324499d355445b502dfff987da8546f1c.tar.gz cortex-m-3b44533324499d355445b502dfff987da8546f1c.tar.zst cortex-m-3b44533324499d355445b502dfff987da8546f1c.zip |
feature gates: std-map -> std
The alternative is to create another std-* gate for each std-related
functionality. I do not think this will scale well, and makes the crate
difficult to use.
If the end-user wants to use host-side functionality they will only need
to specify "std".
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | src/peripheral/itm.rs | 2 | ||||
-rw-r--r-- | src/peripheral/scb.rs | 4 | ||||
-rw-r--r-- | xtask/Cargo.toml | 2 |
4 files changed, 5 insertions, 5 deletions
@@ -31,7 +31,7 @@ cm7 = [] cm7-r0p1 = ["cm7"] inline-asm = [] linker-plugin-lto = [] -std-map = [] +std = [] [workspace] members = ["xtask", "cortex-m-semihosting", "panic-semihosting", "panic-itm"] diff --git a/src/peripheral/itm.rs b/src/peripheral/itm.rs index f155540..f8e9e25 100644 --- a/src/peripheral/itm.rs +++ b/src/peripheral/itm.rs @@ -111,7 +111,7 @@ pub enum LocalTimestampOptions { EnabledDiv64, } -#[cfg(feature = "std-map")] +#[cfg(feature = "std")] impl core::convert::TryFrom<u8> for LocalTimestampOptions { type Error = (); diff --git a/src/peripheral/scb.rs b/src/peripheral/scb.rs index 28cfca8..6c16149 100644 --- a/src/peripheral/scb.rs +++ b/src/peripheral/scb.rs @@ -197,7 +197,7 @@ impl SCB { /// Processor core exceptions (internal interrupts) #[derive(Clone, Copy, Debug, Eq, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "std-map", derive(PartialOrd, Hash))] +#[cfg_attr(feature = "std", derive(PartialOrd, Hash))] pub enum Exception { /// Non maskable interrupt NonMaskableInt, @@ -264,7 +264,7 @@ impl Exception { /// Active exception number #[derive(Clone, Copy, Debug, Eq, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "std-map", derive(PartialOrd, Hash))] +#[cfg_attr(feature = "std", derive(PartialOrd, Hash))] pub enum VectActive { /// Thread mode ThreadMode, diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml index 8742f9b..b5b5c5f 100644 --- a/xtask/Cargo.toml +++ b/xtask/Cargo.toml @@ -11,5 +11,5 @@ harness = false [dependencies] ar = "0.8.0" -cortex-m = { path = "../", features = ["serde", "std-map"] } +cortex-m = { path = "../", features = ["serde", "std"] } serde_json = "1" |