From ef9cb66f02cdc8803b87e50c59cebb3714c6a66a Mon Sep 17 00:00:00 2001 From: Lucas Brendel Date: Mon, 25 Dec 2023 07:02:55 -0600 Subject: [PATCH] fix: adding default features --- Cargo.toml | 8 +++----- README.md | 10 ---------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ba1c8552..5a434efe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,15 +13,13 @@ edition = "2018" [dependencies] cortex-m = "0.7.7" +cortex-m-rt = { version = "0.7.3", optional = true} critical-section = { version = "1.1.2", optional = true } vcell = "0.1.3" -[dependencies.cortex-m-rt] -optional = true -version = "0.7.3" - [features] +default = ["critical-section", "rt"] rt = ["cortex-m-rt/device"] [package.metadata.docs.rs] -features = ["rt"] +features = ['default'] diff --git a/README.md b/README.md index 8af40568..5ec462af 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,6 @@ This is a 'peripheral access crate' for interfacing to the XMC4800 series of microcontrollers for embedded support in Rust that is generated using [svd2rust](https://docs.rs/svd2rust) and an SVD file provided by Infineon. -There is an optional `rt` that can be utilized. An explanation of the feature is given by [svd2rust](https://docs.rs/svd2rust/0.16.1/svd2rust/#the-rt-feature) - All API's and usage (besides what registers exist) are defined by [svd2rust](https://docs.rs/svd2rust) ## Generate Crate from SVD @@ -23,11 +21,3 @@ svd.sh # Generates code from crate and formats to rustfmt ``` The inclusion of EtherCAT has been removed from `src/lib.rs`. This is due to an issue either with the SVD file or the generation of the code using svd2rust. There is no support at this time until a fix can be made. This has not been tested on hardware to ensure that nothing else has been impacted. - -## Using Crate - -```toml -[dependencies.xmc4800] -version = "0.2.1" -features = ["rt"] -```