From 547a52103b3c30506dc981fa89faa6c12765e97a Mon Sep 17 00:00:00 2001 From: Roi Bachynskyi Date: Wed, 10 Sep 2025 12:21:04 +0300 Subject: lpc55: added lpc55-core0 feature Co-authored-by: Irina Chiorean --- embassy-nxp/Cargo.toml | 6 +++--- embassy-nxp/src/gpio.rs | 2 +- embassy-nxp/src/lib.rs | 10 +++++----- embassy-nxp/src/usart.rs | 2 +- examples/lpc55s69/Cargo.toml | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/embassy-nxp/Cargo.toml b/embassy-nxp/Cargo.toml index dd132c7ba..455915f29 100644 --- a/embassy-nxp/Cargo.toml +++ b/embassy-nxp/Cargo.toml @@ -7,7 +7,7 @@ publish = false [package.metadata.embassy] build = [ - {target = "thumbv8m.main-none-eabihf", features = ["defmt", "lpc55"]}, + {target = "thumbv8m.main-none-eabihf", features = ["defmt", "lpc55-core0"]}, {target = "thumbv7em-none-eabihf", features = ["defmt", "mimxrt1011", "rt", "time-driver-pit"]}, {target = "thumbv7em-none-eabihf", features = ["defmt", "mimxrt1062", "rt", "time-driver-pit"]}, ] @@ -18,7 +18,7 @@ src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-nxp/s features = ["defmt", "unstable-pac" ] # TODO: Add time-driver-any, as both lpc55 and mimxrt1xxx use different drivers. flavors = [ - { regex_feature = "lpc55", target = "thumbv8m.main-none-eabihf" }, + { regex_feature = "lpc55-core0", target = "thumbv8m.main-none-eabihf" }, { regex_feature = "mimxrt.*", target = "thumbv7em-none-eabihf" }, ] @@ -78,6 +78,6 @@ _rt1xxx = [] _time_driver = ["dep:embassy-time-driver", "dep:embassy-time-queue-utils"] #! ### Chip selection features -lpc55 = ["nxp-pac/lpc55s69_cm33_core0"] +lpc55-core0 = ["nxp-pac/lpc55s69_cm33_core0"] mimxrt1011 = ["nxp-pac/mimxrt1011", "_rt1xxx", "dep:imxrt-rt"] mimxrt1062 = ["nxp-pac/mimxrt1062", "_rt1xxx", "dep:imxrt-rt"] diff --git a/embassy-nxp/src/gpio.rs b/embassy-nxp/src/gpio.rs index 3049cc12d..717b38d96 100644 --- a/embassy-nxp/src/gpio.rs +++ b/embassy-nxp/src/gpio.rs @@ -1,7 +1,7 @@ //! General purpose input/output (GPIO) driver. #![macro_use] -#[cfg_attr(feature = "lpc55", path = "./gpio/lpc55.rs")] +#[cfg_attr(feature = "lpc55-core0", path = "./gpio/lpc55.rs")] #[cfg_attr(rt1xxx, path = "./gpio/rt1xxx.rs")] mod inner; pub use inner::*; diff --git a/embassy-nxp/src/lib.rs b/embassy-nxp/src/lib.rs index 3fcb14b7e..74142a10b 100644 --- a/embassy-nxp/src/lib.rs +++ b/embassy-nxp/src/lib.rs @@ -4,9 +4,9 @@ pub(crate) mod fmt; pub mod gpio; -#[cfg(feature = "lpc55")] +#[cfg(feature = "lpc55-core0")] pub mod pint; -#[cfg(feature = "lpc55")] +#[cfg(feature = "lpc55-core0")] pub mod usart; #[cfg(feature = "_time_driver")] @@ -15,7 +15,7 @@ pub mod usart; mod time_driver; // This mod MUST go last, so that it sees all the `impl_foo!` macros -#[cfg_attr(feature = "lpc55", path = "chips/lpc55.rs")] +#[cfg_attr(feature = "lpc55-core0", path = "chips/lpc55.rs")] #[cfg_attr(feature = "mimxrt1011", path = "chips/mimxrt1011.rs")] #[cfg_attr(feature = "mimxrt1062", path = "chips/mimxrt1062.rs")] mod chip; @@ -83,10 +83,10 @@ pub fn init(_config: config::Config) -> Peripherals { pac::CCM.ccgr6().modify(|v| v.set_cg0(1)); } - #[cfg(any(feature = "lpc55", rt1xxx))] + #[cfg(any(feature = "lpc55-core0", rt1xxx))] gpio::init(); - #[cfg(feature = "lpc55")] + #[cfg(feature = "lpc55-core0")] pint::init(); #[cfg(feature = "_time_driver")] diff --git a/embassy-nxp/src/usart.rs b/embassy-nxp/src/usart.rs index c426ab96d..1d8886f24 100644 --- a/embassy-nxp/src/usart.rs +++ b/embassy-nxp/src/usart.rs @@ -1,5 +1,5 @@ //! Universal Synchronous/Asynchronous Receiver/Transmitter (USART) driver. -#[cfg_attr(feature = "lpc55", path = "./usart/lpc55.rs")] +#[cfg_attr(feature = "lpc55-core0", path = "./usart/lpc55.rs")] mod inner; pub use inner::*; diff --git a/examples/lpc55s69/Cargo.toml b/examples/lpc55s69/Cargo.toml index 79b27f269..579748595 100644 --- a/examples/lpc55s69/Cargo.toml +++ b/examples/lpc55s69/Cargo.toml @@ -7,7 +7,7 @@ license = "MIT OR Apache-2.0" publish = false [dependencies] -embassy-nxp = { version = "0.1.0", path = "../../embassy-nxp", features = ["lpc55", "rt", "defmt", "time-driver-rtc"] } +embassy-nxp = { version = "0.1.0", path = "../../embassy-nxp", features = ["lpc55-core0", "rt", "defmt", "time-driver-rtc"] } embassy-executor = { version = "0.9.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt"] } embassy-sync = { version = "0.7.2", path = "../../embassy-sync", features = ["defmt"] } embassy-time = { version = "0.5.0", path = "../../embassy-time", features = ["defmt", "tick-hz-32_768"] } -- cgit