From 4e4241bf909b786a5950ac6d72a33a75d8ec982a Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Thu, 24 Sep 2020 19:56:47 +0200 Subject: [PATCH] remove `nrf` prefix in features, for consistency with nrf-hal --- embassy-nrf/Cargo.toml | 10 +++++----- embassy-nrf/src/lib.rs | 44 +++++++++++++++++++++--------------------- examples/Cargo.toml | 2 +- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/embassy-nrf/Cargo.toml b/embassy-nrf/Cargo.toml index b367de83..420d8ced 100644 --- a/embassy-nrf/Cargo.toml +++ b/embassy-nrf/Cargo.toml @@ -15,11 +15,11 @@ defmt-info = [] defmt-warn = [] defmt-error = [] -nrf52810 = ["nrf52810-pac"] -nrf52811 = ["nrf52811-pac"] -nrf52832 = ["nrf52832-pac"] -nrf52833 = ["nrf52833-pac"] -nrf52840 = ["nrf52840-pac"] +52810 = ["nrf52810-pac"] +52811 = ["nrf52811-pac"] +52832 = ["nrf52832-pac"] +52833 = ["nrf52833-pac"] +52840 = ["nrf52840-pac"] [dependencies] diff --git a/embassy-nrf/src/lib.rs b/embassy-nrf/src/lib.rs index edc2778b..4e6da8c3 100644 --- a/embassy-nrf/src/lib.rs +++ b/embassy-nrf/src/lib.rs @@ -4,37 +4,37 @@ #![feature(type_alias_impl_trait)] #[cfg(not(any( - feature = "nrf52810", - feature = "nrf52811", - feature = "nrf52832", - feature = "nrf52833", - feature = "nrf52840", + feature = "52810", + feature = "52811", + feature = "52832", + feature = "52833", + feature = "52840", )))] -compile_error!("No chip feature activated. You must activate exactly one of the following features: nrf52810, nrf52811, nrf52832, nrf52833, nrf52840"); +compile_error!("No chip feature activated. You must activate exactly one of the following features: 52810, 52811, 52832, 52833, 52840"); #[cfg(any( - all(feature = "nrf52810", feature = "nrf52811"), - all(feature = "nrf52810", feature = "nrf52832"), - all(feature = "nrf52810", feature = "nrf52833"), - all(feature = "nrf52810", feature = "nrf52840"), - all(feature = "nrf52811", feature = "nrf52832"), - all(feature = "nrf52811", feature = "nrf52833"), - all(feature = "nrf52811", feature = "nrf52840"), - all(feature = "nrf52832", feature = "nrf52833"), - all(feature = "nrf52832", feature = "nrf52840"), - all(feature = "nrf52833", feature = "nrf52840"), + all(feature = "52810", feature = "52811"), + all(feature = "52810", feature = "52832"), + all(feature = "52810", feature = "52833"), + all(feature = "52810", feature = "52840"), + all(feature = "52811", feature = "52832"), + all(feature = "52811", feature = "52833"), + all(feature = "52811", feature = "52840"), + all(feature = "52832", feature = "52833"), + all(feature = "52832", feature = "52840"), + all(feature = "52833", feature = "52840"), ))] -compile_error!("Multile chip features activated. You must activate exactly one of the following features: nrf52810, nrf52811, nrf52832, nrf52833, nrf52840"); +compile_error!("Multile chip features activated. You must activate exactly one of the following features: 52810, 52811, 52832, 52833, 52840"); -#[cfg(feature = "nrf52810")] +#[cfg(feature = "52810")] pub use nrf52810_pac as pac; -#[cfg(feature = "nrf52811")] +#[cfg(feature = "52811")] pub use nrf52811_pac as pac; -#[cfg(feature = "nrf52832")] +#[cfg(feature = "52832")] pub use nrf52832_pac as pac; -#[cfg(feature = "nrf52833")] +#[cfg(feature = "52833")] pub use nrf52833_pac as pac; -#[cfg(feature = "nrf52840")] +#[cfg(feature = "52840")] pub use nrf52840_pac as pac; pub mod gpiote; diff --git a/examples/Cargo.toml b/examples/Cargo.toml index c243691a..15716a54 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -25,7 +25,7 @@ defmt-rtt = "0.1.0" panic-probe = "0.1.0" nrf52840-hal = { version = "0.11.0" } embassy = { version = "0.1.0", path = "../embassy" } -embassy-nrf = { version = "0.1.0", path = "../embassy-nrf", features = ["defmt-trace", "nrf52840"] } +embassy-nrf = { version = "0.1.0", path = "../embassy-nrf", features = ["defmt-trace", "52840"] } static-executor = { version = "0.1.0", features=["defmt"]} static-executor-cortex-m = { version = "0.1.0" } futures = { version = "0.3.5", default-features = false }