Enable embedded-io on nightly
This commit is contained in:
parent
b2d0f8d590
commit
c495c765df
@ -7,7 +7,9 @@ edition = "2021"
|
|||||||
src_base = "https://github.com/embassy-rs/embassy/blob/embassy-rp-v$VERSION/embassy-rp/src/"
|
src_base = "https://github.com/embassy-rs/embassy/blob/embassy-rp-v$VERSION/embassy-rp/src/"
|
||||||
src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-rp/src/"
|
src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-rp/src/"
|
||||||
features = ["nightly", "defmt", "unstable-pac", "unstable-traits"]
|
features = ["nightly", "defmt", "unstable-pac", "unstable-traits"]
|
||||||
flavors = [{ name = "rp2040", target = "thumbv6m-none-eabi" }]
|
flavors = [
|
||||||
|
{ name = "rp2040", target = "thumbv6m-none-eabi" },
|
||||||
|
]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
defmt = ["dep:defmt", "embassy-usb?/defmt"]
|
defmt = ["dep:defmt", "embassy-usb?/defmt"]
|
||||||
@ -18,16 +20,8 @@ defmt = ["dep:defmt", "embassy-usb?/defmt"]
|
|||||||
# There are no plans to make this stable.
|
# There are no plans to make this stable.
|
||||||
unstable-pac = []
|
unstable-pac = []
|
||||||
|
|
||||||
time-driver = []
|
|
||||||
|
|
||||||
# Enable nightly-only features
|
# Enable nightly-only features
|
||||||
nightly = [
|
nightly = ["embassy-executor/nightly", "embedded-hal-1", "embedded-hal-async", "embassy-embedded-hal/nightly", "dep:embassy-usb", "dep:embedded-io"]
|
||||||
"embassy-executor/nightly",
|
|
||||||
"embedded-hal-1",
|
|
||||||
"embedded-hal-async",
|
|
||||||
"embassy-embedded-hal/nightly",
|
|
||||||
"dep:embassy-usb",
|
|
||||||
]
|
|
||||||
|
|
||||||
# Implement embedded-hal 1.0 alpha traits.
|
# Implement embedded-hal 1.0 alpha traits.
|
||||||
# Implement embedded-hal-async traits if `nightly` is set as well.
|
# Implement embedded-hal-async traits if `nightly` is set as well.
|
||||||
@ -36,12 +30,8 @@ unstable-traits = ["embedded-hal-1"]
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
embassy-sync = { version = "0.1.0", path = "../embassy-sync" }
|
embassy-sync = { version = "0.1.0", path = "../embassy-sync" }
|
||||||
embassy-executor = { version = "0.1.0", path = "../embassy-executor" }
|
embassy-executor = { version = "0.1.0", path = "../embassy-executor" }
|
||||||
embassy-time = { version = "0.1.0", path = "../embassy-time", features = [
|
embassy-time = { version = "0.1.0", path = "../embassy-time", features = [ "tick-hz-1_000_000" ] }
|
||||||
"tick-hz-1_000_000",
|
embassy-cortex-m = { version = "0.1.0", path = "../embassy-cortex-m", features = ["prio-bits-2"]}
|
||||||
] }
|
|
||||||
embassy-cortex-m = { version = "0.1.0", path = "../embassy-cortex-m", features = [
|
|
||||||
"prio-bits-2",
|
|
||||||
] }
|
|
||||||
embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" }
|
embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" }
|
||||||
embassy-embedded-hal = {version = "0.1.0", path = "../embassy-embedded-hal" }
|
embassy-embedded-hal = {version = "0.1.0", path = "../embassy-embedded-hal" }
|
||||||
embassy-usb = {version = "0.1.0", path = "../embassy-usb", optional = true }
|
embassy-usb = {version = "0.1.0", path = "../embassy-usb", optional = true }
|
||||||
@ -53,18 +43,12 @@ cfg-if = "1.0.0"
|
|||||||
cortex-m-rt = ">=0.6.15,<0.8"
|
cortex-m-rt = ">=0.6.15,<0.8"
|
||||||
cortex-m = "0.7.6"
|
cortex-m = "0.7.6"
|
||||||
critical-section = "1.1"
|
critical-section = "1.1"
|
||||||
futures = { version = "0.3.17", default-features = false, features = [
|
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
||||||
"async-await",
|
|
||||||
] }
|
|
||||||
embedded-io = { version = "0.3.0", features = ["async"], optional = true }
|
embedded-io = { version = "0.3.0", features = ["async"], optional = true }
|
||||||
|
|
||||||
rp2040-pac2 = { git = "https://github.com/embassy-rs/rp2040-pac2", rev = "017e3c9007b2d3b6965f0d85b5bf8ce3fa6d7364", features = [
|
rp2040-pac2 = { git = "https://github.com/embassy-rs/rp2040-pac2", rev="017e3c9007b2d3b6965f0d85b5bf8ce3fa6d7364", features = ["rt"] }
|
||||||
"rt",
|
|
||||||
] }
|
|
||||||
#rp2040-pac2 = { path = "../../rp2040-pac2", features = ["rt"] }
|
#rp2040-pac2 = { path = "../../rp2040-pac2", features = ["rt"] }
|
||||||
|
|
||||||
embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = [
|
embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] }
|
||||||
"unproven",
|
|
||||||
] }
|
|
||||||
embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8", optional = true}
|
embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8", optional = true}
|
||||||
embedded-hal-async = { version = "0.1.0-alpha.1", optional = true}
|
embedded-hal-async = { version = "0.1.0-alpha.1", optional = true}
|
||||||
|
@ -8,7 +8,6 @@ pub mod dma;
|
|||||||
pub mod gpio;
|
pub mod gpio;
|
||||||
pub mod interrupt;
|
pub mod interrupt;
|
||||||
pub mod spi;
|
pub mod spi;
|
||||||
#[cfg(feature = "time-driver")]
|
|
||||||
pub mod timer;
|
pub mod timer;
|
||||||
pub mod uart;
|
pub mod uart;
|
||||||
#[cfg(feature = "nightly")]
|
#[cfg(feature = "nightly")]
|
||||||
@ -109,7 +108,6 @@ pub fn init(_config: config::Config) -> Peripherals {
|
|||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
clocks::init();
|
clocks::init();
|
||||||
#[cfg(feature = "time-driver")]
|
|
||||||
timer::init();
|
timer::init();
|
||||||
dma::init();
|
dma::init();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user