diff options
Diffstat (limited to 'embassy-rp')
| -rw-r--r-- | embassy-rp/Cargo.toml | 44 | ||||
| -rw-r--r-- | embassy-rp/src/lib.rs | 2 |
2 files changed, 14 insertions, 32 deletions
diff --git a/embassy-rp/Cargo.toml b/embassy-rp/Cargo.toml index 92780ee39..3debca710 100644 --- a/embassy-rp/Cargo.toml +++ b/embassy-rp/Cargo.toml | |||
| @@ -7,7 +7,9 @@ edition = "2021" | |||
| 7 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-rp-v$VERSION/embassy-rp/src/" | 7 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-rp-v$VERSION/embassy-rp/src/" |
| 8 | src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-rp/src/" | 8 | src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-rp/src/" |
| 9 | features = ["nightly", "defmt", "unstable-pac", "unstable-traits"] | 9 | features = ["nightly", "defmt", "unstable-pac", "unstable-traits"] |
| 10 | flavors = [{ name = "rp2040", target = "thumbv6m-none-eabi" }] | 10 | flavors = [ |
| 11 | { name = "rp2040", target = "thumbv6m-none-eabi" }, | ||
| 12 | ] | ||
| 11 | 13 | ||
| 12 | [features] | 14 | [features] |
| 13 | defmt = ["dep:defmt", "embassy-usb?/defmt"] | 15 | defmt = ["dep:defmt", "embassy-usb?/defmt"] |
| @@ -18,16 +20,8 @@ defmt = ["dep:defmt", "embassy-usb?/defmt"] | |||
| 18 | # There are no plans to make this stable. | 20 | # There are no plans to make this stable. |
| 19 | unstable-pac = [] | 21 | unstable-pac = [] |
| 20 | 22 | ||
| 21 | time-driver = [] | ||
| 22 | |||
| 23 | # Enable nightly-only features | 23 | # Enable nightly-only features |
| 24 | nightly = [ | 24 | nightly = ["embassy-executor/nightly", "embedded-hal-1", "embedded-hal-async", "embassy-embedded-hal/nightly", "dep:embassy-usb", "dep:embedded-io"] |
| 25 | "embassy-executor/nightly", | ||
| 26 | "embedded-hal-1", | ||
| 27 | "embedded-hal-async", | ||
| 28 | "embassy-embedded-hal/nightly", | ||
| 29 | "dep:embassy-usb", | ||
| 30 | ] | ||
| 31 | 25 | ||
| 32 | # Implement embedded-hal 1.0 alpha traits. | 26 | # Implement embedded-hal 1.0 alpha traits. |
| 33 | # Implement embedded-hal-async traits if `nightly` is set as well. | 27 | # Implement embedded-hal-async traits if `nightly` is set as well. |
| @@ -36,15 +30,11 @@ unstable-traits = ["embedded-hal-1"] | |||
| 36 | [dependencies] | 30 | [dependencies] |
| 37 | embassy-sync = { version = "0.1.0", path = "../embassy-sync" } | 31 | embassy-sync = { version = "0.1.0", path = "../embassy-sync" } |
| 38 | embassy-executor = { version = "0.1.0", path = "../embassy-executor" } | 32 | embassy-executor = { version = "0.1.0", path = "../embassy-executor" } |
| 39 | embassy-time = { version = "0.1.0", path = "../embassy-time", features = [ | 33 | embassy-time = { version = "0.1.0", path = "../embassy-time", features = [ "tick-hz-1_000_000" ] } |
| 40 | "tick-hz-1_000_000", | 34 | embassy-cortex-m = { version = "0.1.0", path = "../embassy-cortex-m", features = ["prio-bits-2"]} |
| 41 | ] } | 35 | embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" } |
| 42 | embassy-cortex-m = { version = "0.1.0", path = "../embassy-cortex-m", features = [ | 36 | embassy-embedded-hal = {version = "0.1.0", path = "../embassy-embedded-hal" } |
| 43 | "prio-bits-2", | 37 | embassy-usb = {version = "0.1.0", path = "../embassy-usb", optional = true } |
| 44 | ] } | ||
| 45 | embassy-hal-common = { version = "0.1.0", path = "../embassy-hal-common" } | ||
| 46 | embassy-embedded-hal = { version = "0.1.0", path = "../embassy-embedded-hal" } | ||
| 47 | embassy-usb = { version = "0.1.0", path = "../embassy-usb", optional = true } | ||
| 48 | atomic-polyfill = "1.0.1" | 38 | atomic-polyfill = "1.0.1" |
| 49 | defmt = { version = "0.3", optional = true } | 39 | defmt = { version = "0.3", optional = true } |
| 50 | log = { version = "0.4.14", optional = true } | 40 | log = { version = "0.4.14", optional = true } |
| @@ -53,18 +43,12 @@ cfg-if = "1.0.0" | |||
| 53 | cortex-m-rt = ">=0.6.15,<0.8" | 43 | cortex-m-rt = ">=0.6.15,<0.8" |
| 54 | cortex-m = "0.7.6" | 44 | cortex-m = "0.7.6" |
| 55 | critical-section = "1.1" | 45 | critical-section = "1.1" |
| 56 | futures = { version = "0.3.17", default-features = false, features = [ | 46 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } |
| 57 | "async-await", | ||
| 58 | ] } | ||
| 59 | embedded-io = { version = "0.3.0", features = ["async"], optional = true } | 47 | embedded-io = { version = "0.3.0", features = ["async"], optional = true } |
| 60 | 48 | ||
| 61 | rp2040-pac2 = { git = "https://github.com/embassy-rs/rp2040-pac2", rev = "017e3c9007b2d3b6965f0d85b5bf8ce3fa6d7364", features = [ | 49 | rp2040-pac2 = { git = "https://github.com/embassy-rs/rp2040-pac2", rev="017e3c9007b2d3b6965f0d85b5bf8ce3fa6d7364", features = ["rt"] } |
| 62 | "rt", | ||
| 63 | ] } | ||
| 64 | #rp2040-pac2 = { path = "../../rp2040-pac2", features = ["rt"] } | 50 | #rp2040-pac2 = { path = "../../rp2040-pac2", features = ["rt"] } |
| 65 | 51 | ||
| 66 | embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = [ | 52 | embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } |
| 67 | "unproven", | 53 | embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8", optional = true} |
| 68 | ] } | 54 | embedded-hal-async = { version = "0.1.0-alpha.1", optional = true} |
| 69 | embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8", optional = true } | ||
| 70 | embedded-hal-async = { version = "0.1.0-alpha.1", optional = true } | ||
diff --git a/embassy-rp/src/lib.rs b/embassy-rp/src/lib.rs index 8dcefece2..aebbbf567 100644 --- a/embassy-rp/src/lib.rs +++ b/embassy-rp/src/lib.rs | |||
| @@ -8,7 +8,6 @@ pub mod dma; | |||
| 8 | pub mod gpio; | 8 | pub mod gpio; |
| 9 | pub mod interrupt; | 9 | pub mod interrupt; |
| 10 | pub mod spi; | 10 | pub mod spi; |
| 11 | #[cfg(feature = "time-driver")] | ||
| 12 | pub mod timer; | 11 | pub mod timer; |
| 13 | pub mod uart; | 12 | pub mod uart; |
| 14 | #[cfg(feature = "nightly")] | 13 | #[cfg(feature = "nightly")] |
| @@ -109,7 +108,6 @@ pub fn init(_config: config::Config) -> Peripherals { | |||
| 109 | 108 | ||
| 110 | unsafe { | 109 | unsafe { |
| 111 | clocks::init(); | 110 | clocks::init(); |
| 112 | #[cfg(feature = "time-driver")] | ||
| 113 | timer::init(); | 111 | timer::init(); |
| 114 | dma::init(); | 112 | dma::init(); |
| 115 | } | 113 | } |
