From e5d8d8b18e80244275458c38b3dc13a5b9d72a9f Mon Sep 17 00:00:00 2001 From: Caleb Jamison Date: Fri, 9 Aug 2024 12:31:29 -0400 Subject: [PATCH] Switch to single pac --- embassy-rp/Cargo.toml | 13 +++++-------- embassy-rp/src/lib.rs | 9 +++------ examples/rp23/Cargo.toml | 2 +- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/embassy-rp/Cargo.toml b/embassy-rp/Cargo.toml index 80f7eca66..6a504335d 100644 --- a/embassy-rp/Cargo.toml +++ b/embassy-rp/Cargo.toml @@ -24,9 +24,7 @@ features = ["defmt", "unstable-pac", "time-driver"] [features] default = [ "rt" ] ## Enable the rt feature of [`rp-pac`](https://docs.rs/rp-pac). This brings in the [`cortex-m-rt`](https://docs.rs/cortex-m-rt) crate, which adds startup code and minimal runtime initialization. -rt = [] -rt-2040 = [ "rt", "rp-pac/rt" ] -rt-235x = [ "rt", "rp23-pac/rt" ] +rt = [ "rp-pac/rt" ] ## Enable [defmt support](https://docs.rs/defmt) and enables `defmt` debug-log messages and formatting in embassy drivers. defmt = ["dep:defmt", "embassy-usb-driver/defmt", "embassy-hal-internal/defmt"] @@ -91,8 +89,8 @@ boot2-w25x10cl = [] ## ``` boot2-none = [] -rp2040 = ["dep:rp-pac"] -rp235x = ["dep:rp23-pac"] +rp2040 = ["rp-pac/rp2040"] +rp235x = ["rp-pac/rp235x"] rp235xa = ["rp235x"] rp235xb = ["rp235x"] @@ -100,7 +98,7 @@ rp235xb = ["rp235x"] # # Takes up a little flash space, but picotool can then report the name of your # program and other details. -binary-info = [ "rt-235x" ] +binary-info = [ "rt" ] [dependencies] embassy-sync = { version = "0.6.0", path = "../embassy-sync" } @@ -126,8 +124,7 @@ embedded-storage-async = { version = "0.4.1" } rand_core = "0.6.4" fixed = "1.23.1" -rp-pac = { git = "https://github.com/CBJamo/rp-pac.git", feature = ["rt"], optional = true } -rp23-pac = { git = "https://github.com/HellbenderInc/rp23-pac.git", feature = ["rt"], optional = true } +rp-pac = { git = "https://github.com/CBJamo/rp-pac.git", feature = ["rt"] } embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } embedded-hal-1 = { package = "embedded-hal", version = "1.0" } diff --git a/embassy-rp/src/lib.rs b/embassy-rp/src/lib.rs index ff9c0803d..a0c6538d2 100644 --- a/embassy-rp/src/lib.rs +++ b/embassy-rp/src/lib.rs @@ -46,13 +46,10 @@ pub(crate) mod relocate; // Reexports pub use embassy_hal_internal::{into_ref, Peripheral, PeripheralRef}; -#[cfg(all(feature = "unstable-pac", feature = "rp235x"))] -pub use rp23_pac as pac; -#[cfg(all(not(feature = "unstable-pac"), feature = "rp235x"))] -pub(crate) use rp23_pac as pac; -#[cfg(all(feature = "unstable-pac", feature = "rp2040"))] + +#[cfg(feature = "unstable-pac")] pub use rp_pac as pac; -#[cfg(all(not(feature = "unstable-pac"), feature = "rp2040"))] +#[cfg(not(feature = "unstable-pac"))] pub(crate) use rp_pac as pac; #[cfg(feature = "rt")] diff --git a/examples/rp23/Cargo.toml b/examples/rp23/Cargo.toml index 89947ae46..8f8d6ff10 100644 --- a/examples/rp23/Cargo.toml +++ b/examples/rp23/Cargo.toml @@ -10,7 +10,7 @@ embassy-embedded-hal = { version = "0.2.0", path = "../../embassy-embedded-hal", embassy-sync = { version = "0.6.0", path = "../../embassy-sync", features = ["defmt"] } embassy-executor = { version = "0.6.0", path = "../../embassy-executor", features = ["task-arena-size-98304", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } -embassy-rp = { version = "0.2.0", path = "../../embassy-rp", features = ["defmt", "unstable-pac", "time-driver", "critical-section-impl", "rp235xa", "binary-info", "rt-235x", "boot2-none"] } +embassy-rp = { version = "0.2.0", path = "../../embassy-rp", features = ["defmt", "unstable-pac", "time-driver", "critical-section-impl", "rp235xa", "binary-info"] } embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } embassy-net = { version = "0.4.0", path = "../../embassy-net", features = ["defmt", "tcp", "udp", "raw", "dhcpv4", "medium-ethernet", "dns"] } embassy-net-wiznet = { version = "0.1.0", path = "../../embassy-net-wiznet", features = ["defmt"] }