aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2021-07-14 22:19:04 +0200
committerDario Nieuwenhuis <[email protected]>2021-07-14 22:19:04 +0200
commitf916fe54760b51a12876b8d060531aa773a75e6d (patch)
tree82ce6c93cb60973bfd3d140d8bd050b0a608b5b0
parent6444066589d92dd6db11cbb41d26a8ccd4f60cb0 (diff)
all hals: reexport PAC if `unstable-pac` feature is set.
-rw-r--r--embassy-nrf/Cargo.toml7
-rw-r--r--embassy-nrf/src/lib.rs4
-rw-r--r--embassy-rp/Cargo.toml7
-rw-r--r--embassy-rp/src/lib.rs3
-rw-r--r--embassy-stm32/Cargo.toml6
-rw-r--r--embassy-stm32/src/lib.rs3
6 files changed, 30 insertions, 0 deletions
diff --git a/embassy-nrf/Cargo.toml b/embassy-nrf/Cargo.toml
index 85ded1df4..1fdc83fb3 100644
--- a/embassy-nrf/Cargo.toml
+++ b/embassy-nrf/Cargo.toml
@@ -5,6 +5,13 @@ authors = ["Dario Nieuwenhuis <[email protected]>"]
5edition = "2018" 5edition = "2018"
6 6
7[features] 7[features]
8
9# Reexport the PAC for the currently enabled chip at `embassy_nrf::pac`.
10# This is unstable because semver-minor (non-breaking) releases of embassy-nrf may major-bump (breaking) the PAC version.
11# If this is an issue for you, you're encouraged to directly depend on a fixed version of the PAC.
12# There are no plans to make this stable.
13unstable-pac = []
14
8defmt-trace = [ ] 15defmt-trace = [ ]
9defmt-debug = [ ] 16defmt-debug = [ ]
10defmt-info = [ ] 17defmt-info = [ ]
diff --git a/embassy-nrf/src/lib.rs b/embassy-nrf/src/lib.rs
index c2e461cf1..35815f792 100644
--- a/embassy-nrf/src/lib.rs
+++ b/embassy-nrf/src/lib.rs
@@ -65,7 +65,11 @@ mod chip;
65#[path = "chips/nrf52840.rs"] 65#[path = "chips/nrf52840.rs"]
66mod chip; 66mod chip;
67 67
68#[cfg(feature = "unstable-pac")]
69pub use chip::pac;
70#[cfg(not(feature = "unstable-pac"))]
68pub(crate) use chip::pac; 71pub(crate) use chip::pac;
72
69pub use chip::{peripherals, Peripherals}; 73pub use chip::{peripherals, Peripherals};
70 74
71pub mod interrupt { 75pub mod interrupt {
diff --git a/embassy-rp/Cargo.toml b/embassy-rp/Cargo.toml
index ba9984a80..c61b8c997 100644
--- a/embassy-rp/Cargo.toml
+++ b/embassy-rp/Cargo.toml
@@ -5,6 +5,13 @@ authors = ["Dario Nieuwenhuis <[email protected]>"]
5edition = "2018" 5edition = "2018"
6 6
7[features] 7[features]
8
9# Reexport the PAC for the currently enabled chip at `embassy_rp::pac`.
10# This is unstable because semver-minor (non-breaking) releases of embassy-nrf may major-bump (breaking) the PAC version.
11# If this is an issue for you, you're encouraged to directly depend on a fixed version of the PAC.
12# There are no plans to make this stable.
13unstable-pac = []
14
8defmt-trace = [ ] 15defmt-trace = [ ]
9defmt-debug = [ ] 16defmt-debug = [ ]
10defmt-info = [ ] 17defmt-info = [ ]
diff --git a/embassy-rp/src/lib.rs b/embassy-rp/src/lib.rs
index aefc86c00..c53d2e58d 100644
--- a/embassy-rp/src/lib.rs
+++ b/embassy-rp/src/lib.rs
@@ -5,7 +5,10 @@
5#![feature(never_type)] 5#![feature(never_type)]
6#![allow(incomplete_features)] 6#![allow(incomplete_features)]
7 7
8#[cfg(feature = "unstable-pac")]
8pub use rp2040_pac2 as pac; 9pub use rp2040_pac2 as pac;
10#[cfg(not(feature = "unstable-pac"))]
11pub(crate) use rp2040_pac2 as pac;
9 12
10// This mod MUST go first, so that the others see its macros. 13// This mod MUST go first, so that the others see its macros.
11pub(crate) mod fmt; 14pub(crate) mod fmt;
diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml
index 654bc98ef..4e4d7ff82 100644
--- a/embassy-stm32/Cargo.toml
+++ b/embassy-stm32/Cargo.toml
@@ -43,6 +43,12 @@ defmt-error = [ ]
43sdmmc-rs = ["embedded-sdmmc"] 43sdmmc-rs = ["embedded-sdmmc"]
44net = ["embassy-net", "vcell"] 44net = ["embassy-net", "vcell"]
45 45
46# Reexport stm32-metapac at `embassy_stm32::pac`.
47# This is unstable because semver-minor (non-breaking) releases of embassy-stm32 may major-bump (breaking) the stm32-metapac version.
48# If this is an issue for you, you're encouraged to directly depend on a fixed version of the PAC.
49# There are no plans to make this stable.
50unstable-pac = []
51
46# BEGIN GENERATED FEATURES 52# BEGIN GENERATED FEATURES
47# Generated by gen_features.py. DO NOT EDIT. 53# Generated by gen_features.py. DO NOT EDIT.
48stm32f030c6 = [ "stm32-metapac/stm32f030c6",] 54stm32f030c6 = [ "stm32-metapac/stm32f030c6",]
diff --git a/embassy-stm32/src/lib.rs b/embassy-stm32/src/lib.rs
index 4b2826ae8..22999a69e 100644
--- a/embassy-stm32/src/lib.rs
+++ b/embassy-stm32/src/lib.rs
@@ -6,6 +6,9 @@
6#![feature(type_alias_impl_trait)] 6#![feature(type_alias_impl_trait)]
7#![allow(incomplete_features)] 7#![allow(incomplete_features)]
8 8
9#[cfg(feature = "unstable-pac")]
10pub use stm32_metapac as pac;
11#[cfg(not(feature = "unstable-pac"))]
9pub(crate) use stm32_metapac as pac; 12pub(crate) use stm32_metapac as pac;
10 13
11// This must go FIRST so that all the other modules see its macros. 14// This must go FIRST so that all the other modules see its macros.