From ffdc60d6fb3fa8883b22a2b201a6cdf55b0d163f Mon Sep 17 00:00:00 2001 From: Caleb Jamison Date: Fri, 9 Aug 2024 16:07:30 -0400 Subject: [PATCH] Move #![cfg]s to lib.rs --- embassy-rp/src/float/mod.rs | 1 - embassy-rp/src/lib.rs | 2 ++ embassy-rp/src/rtc/mod.rs | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/embassy-rp/src/float/mod.rs b/embassy-rp/src/float/mod.rs index 1df8c0e08..3ad6f1c50 100644 --- a/embassy-rp/src/float/mod.rs +++ b/embassy-rp/src/float/mod.rs @@ -1,4 +1,3 @@ -#![cfg(feature = "rp2040")] // Credit: taken from `rp-hal` (also licensed Apache+MIT) // https://github.com/rp-rs/rp-hal/blob/main/rp2040-hal/src/float/mod.rs diff --git a/embassy-rp/src/lib.rs b/embassy-rp/src/lib.rs index 006588c54..0bcc58b86 100644 --- a/embassy-rp/src/lib.rs +++ b/embassy-rp/src/lib.rs @@ -24,6 +24,7 @@ pub mod bootsel; pub mod clocks; pub mod dma; pub mod flash; +#[cfg(feature = "rp2040")] mod float; pub mod gpio; pub mod i2c; @@ -32,6 +33,7 @@ pub mod multicore; pub mod pwm; mod reset; pub mod rom_data; +#[cfg(feature = "rp2040")] pub mod rtc; pub mod spi; #[cfg(feature = "time-driver")] diff --git a/embassy-rp/src/rtc/mod.rs b/embassy-rp/src/rtc/mod.rs index 4ba5bad4b..2ce7ac645 100644 --- a/embassy-rp/src/rtc/mod.rs +++ b/embassy-rp/src/rtc/mod.rs @@ -1,4 +1,3 @@ -#![cfg(feature = "rp2040")] //! RTC driver. mod filter;