aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoi Bachynskyi <[email protected]>2025-09-10 12:21:04 +0300
committerIrina Chiorean <[email protected]>2025-09-12 11:43:59 +0300
commit547a52103b3c30506dc981fa89faa6c12765e97a (patch)
treeac723d86ba589d595bcdb88a194f6e848ede4bd9
parent0816a6a4185eac63803bd7155941fa2d73a114a6 (diff)
lpc55: added lpc55-core0 feature
Co-authored-by: Irina Chiorean <[email protected]>
-rw-r--r--embassy-nxp/Cargo.toml6
-rw-r--r--embassy-nxp/src/gpio.rs2
-rw-r--r--embassy-nxp/src/lib.rs10
-rw-r--r--embassy-nxp/src/usart.rs2
-rw-r--r--examples/lpc55s69/Cargo.toml2
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
7 7
8[package.metadata.embassy] 8[package.metadata.embassy]
9build = [ 9build = [
10 {target = "thumbv8m.main-none-eabihf", features = ["defmt", "lpc55"]}, 10 {target = "thumbv8m.main-none-eabihf", features = ["defmt", "lpc55-core0"]},
11 {target = "thumbv7em-none-eabihf", features = ["defmt", "mimxrt1011", "rt", "time-driver-pit"]}, 11 {target = "thumbv7em-none-eabihf", features = ["defmt", "mimxrt1011", "rt", "time-driver-pit"]},
12 {target = "thumbv7em-none-eabihf", features = ["defmt", "mimxrt1062", "rt", "time-driver-pit"]}, 12 {target = "thumbv7em-none-eabihf", features = ["defmt", "mimxrt1062", "rt", "time-driver-pit"]},
13] 13]
@@ -18,7 +18,7 @@ src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-nxp/s
18features = ["defmt", "unstable-pac" ] # TODO: Add time-driver-any, as both lpc55 and mimxrt1xxx use different drivers. 18features = ["defmt", "unstable-pac" ] # TODO: Add time-driver-any, as both lpc55 and mimxrt1xxx use different drivers.
19 19
20flavors = [ 20flavors = [
21 { regex_feature = "lpc55", target = "thumbv8m.main-none-eabihf" }, 21 { regex_feature = "lpc55-core0", target = "thumbv8m.main-none-eabihf" },
22 { regex_feature = "mimxrt.*", target = "thumbv7em-none-eabihf" }, 22 { regex_feature = "mimxrt.*", target = "thumbv7em-none-eabihf" },
23] 23]
24 24
@@ -78,6 +78,6 @@ _rt1xxx = []
78_time_driver = ["dep:embassy-time-driver", "dep:embassy-time-queue-utils"] 78_time_driver = ["dep:embassy-time-driver", "dep:embassy-time-queue-utils"]
79 79
80#! ### Chip selection features 80#! ### Chip selection features
81lpc55 = ["nxp-pac/lpc55s69_cm33_core0"] 81lpc55-core0 = ["nxp-pac/lpc55s69_cm33_core0"]
82mimxrt1011 = ["nxp-pac/mimxrt1011", "_rt1xxx", "dep:imxrt-rt"] 82mimxrt1011 = ["nxp-pac/mimxrt1011", "_rt1xxx", "dep:imxrt-rt"]
83mimxrt1062 = ["nxp-pac/mimxrt1062", "_rt1xxx", "dep:imxrt-rt"] 83mimxrt1062 = ["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 @@
1//! General purpose input/output (GPIO) driver. 1//! General purpose input/output (GPIO) driver.
2#![macro_use] 2#![macro_use]
3 3
4#[cfg_attr(feature = "lpc55", path = "./gpio/lpc55.rs")] 4#[cfg_attr(feature = "lpc55-core0", path = "./gpio/lpc55.rs")]
5#[cfg_attr(rt1xxx, path = "./gpio/rt1xxx.rs")] 5#[cfg_attr(rt1xxx, path = "./gpio/rt1xxx.rs")]
6mod inner; 6mod inner;
7pub use inner::*; 7pub 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 @@
4pub(crate) mod fmt; 4pub(crate) mod fmt;
5 5
6pub mod gpio; 6pub mod gpio;
7#[cfg(feature = "lpc55")] 7#[cfg(feature = "lpc55-core0")]
8pub mod pint; 8pub mod pint;
9#[cfg(feature = "lpc55")] 9#[cfg(feature = "lpc55-core0")]
10pub mod usart; 10pub mod usart;
11 11
12#[cfg(feature = "_time_driver")] 12#[cfg(feature = "_time_driver")]
@@ -15,7 +15,7 @@ pub mod usart;
15mod time_driver; 15mod time_driver;
16 16
17// This mod MUST go last, so that it sees all the `impl_foo!` macros 17// This mod MUST go last, so that it sees all the `impl_foo!` macros
18#[cfg_attr(feature = "lpc55", path = "chips/lpc55.rs")] 18#[cfg_attr(feature = "lpc55-core0", path = "chips/lpc55.rs")]
19#[cfg_attr(feature = "mimxrt1011", path = "chips/mimxrt1011.rs")] 19#[cfg_attr(feature = "mimxrt1011", path = "chips/mimxrt1011.rs")]
20#[cfg_attr(feature = "mimxrt1062", path = "chips/mimxrt1062.rs")] 20#[cfg_attr(feature = "mimxrt1062", path = "chips/mimxrt1062.rs")]
21mod chip; 21mod chip;
@@ -83,10 +83,10 @@ pub fn init(_config: config::Config) -> Peripherals {
83 pac::CCM.ccgr6().modify(|v| v.set_cg0(1)); 83 pac::CCM.ccgr6().modify(|v| v.set_cg0(1));
84 } 84 }
85 85
86 #[cfg(any(feature = "lpc55", rt1xxx))] 86 #[cfg(any(feature = "lpc55-core0", rt1xxx))]
87 gpio::init(); 87 gpio::init();
88 88
89 #[cfg(feature = "lpc55")] 89 #[cfg(feature = "lpc55-core0")]
90 pint::init(); 90 pint::init();
91 91
92 #[cfg(feature = "_time_driver")] 92 #[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 @@
1//! Universal Synchronous/Asynchronous Receiver/Transmitter (USART) driver. 1//! Universal Synchronous/Asynchronous Receiver/Transmitter (USART) driver.
2 2
3#[cfg_attr(feature = "lpc55", path = "./usart/lpc55.rs")] 3#[cfg_attr(feature = "lpc55-core0", path = "./usart/lpc55.rs")]
4mod inner; 4mod inner;
5pub use inner::*; 5pub 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"
7publish = false 7publish = false
8 8
9[dependencies] 9[dependencies]
10embassy-nxp = { version = "0.1.0", path = "../../embassy-nxp", features = ["lpc55", "rt", "defmt", "time-driver-rtc"] } 10embassy-nxp = { version = "0.1.0", path = "../../embassy-nxp", features = ["lpc55-core0", "rt", "defmt", "time-driver-rtc"] }
11embassy-executor = { version = "0.9.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt"] } 11embassy-executor = { version = "0.9.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt"] }
12embassy-sync = { version = "0.7.2", path = "../../embassy-sync", features = ["defmt"] } 12embassy-sync = { version = "0.7.2", path = "../../embassy-sync", features = ["defmt"] }
13embassy-time = { version = "0.5.0", path = "../../embassy-time", features = ["defmt", "tick-hz-32_768"] } 13embassy-time = { version = "0.5.0", path = "../../embassy-time", features = ["defmt", "tick-hz-32_768"] }