diff options
| author | Roi Bachynskyi <[email protected]> | 2025-09-10 12:21:04 +0300 |
|---|---|---|
| committer | Irina Chiorean <[email protected]> | 2025-09-12 11:43:59 +0300 |
| commit | 547a52103b3c30506dc981fa89faa6c12765e97a (patch) | |
| tree | ac723d86ba589d595bcdb88a194f6e848ede4bd9 /embassy-nxp | |
| parent | 0816a6a4185eac63803bd7155941fa2d73a114a6 (diff) | |
lpc55: added lpc55-core0 feature
Co-authored-by: Irina Chiorean <[email protected]>
Diffstat (limited to 'embassy-nxp')
| -rw-r--r-- | embassy-nxp/Cargo.toml | 6 | ||||
| -rw-r--r-- | embassy-nxp/src/gpio.rs | 2 | ||||
| -rw-r--r-- | embassy-nxp/src/lib.rs | 10 | ||||
| -rw-r--r-- | embassy-nxp/src/usart.rs | 2 |
4 files changed, 10 insertions, 10 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] |
| 9 | build = [ | 9 | build = [ |
| 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 | |||
| 18 | features = ["defmt", "unstable-pac" ] # TODO: Add time-driver-any, as both lpc55 and mimxrt1xxx use different drivers. | 18 | features = ["defmt", "unstable-pac" ] # TODO: Add time-driver-any, as both lpc55 and mimxrt1xxx use different drivers. |
| 19 | 19 | ||
| 20 | flavors = [ | 20 | flavors = [ |
| 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 |
| 81 | lpc55 = ["nxp-pac/lpc55s69_cm33_core0"] | 81 | lpc55-core0 = ["nxp-pac/lpc55s69_cm33_core0"] |
| 82 | mimxrt1011 = ["nxp-pac/mimxrt1011", "_rt1xxx", "dep:imxrt-rt"] | 82 | mimxrt1011 = ["nxp-pac/mimxrt1011", "_rt1xxx", "dep:imxrt-rt"] |
| 83 | mimxrt1062 = ["nxp-pac/mimxrt1062", "_rt1xxx", "dep:imxrt-rt"] | 83 | 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 @@ | |||
| 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")] |
| 6 | mod inner; | 6 | mod inner; |
| 7 | pub use inner::*; | 7 | 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 @@ | |||
| 4 | pub(crate) mod fmt; | 4 | pub(crate) mod fmt; |
| 5 | 5 | ||
| 6 | pub mod gpio; | 6 | pub mod gpio; |
| 7 | #[cfg(feature = "lpc55")] | 7 | #[cfg(feature = "lpc55-core0")] |
| 8 | pub mod pint; | 8 | pub mod pint; |
| 9 | #[cfg(feature = "lpc55")] | 9 | #[cfg(feature = "lpc55-core0")] |
| 10 | pub mod usart; | 10 | pub mod usart; |
| 11 | 11 | ||
| 12 | #[cfg(feature = "_time_driver")] | 12 | #[cfg(feature = "_time_driver")] |
| @@ -15,7 +15,7 @@ pub mod usart; | |||
| 15 | mod time_driver; | 15 | mod 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")] |
| 21 | mod chip; | 21 | mod 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")] |
| 4 | mod inner; | 4 | mod inner; |
| 5 | pub use inner::*; | 5 | pub use inner::*; |
