diff options
| -rw-r--r-- | embassy-stm32/src/fmt.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/embassy-stm32/src/fmt.rs b/embassy-stm32/src/fmt.rs index 660407569..b6ae24ee8 100644 --- a/embassy-stm32/src/fmt.rs +++ b/embassy-stm32/src/fmt.rs | |||
| @@ -10,12 +10,15 @@ compile_error!("You may not enable both `defmt` and `log` features."); | |||
| 10 | macro_rules! rcc_assert { | 10 | macro_rules! rcc_assert { |
| 11 | ($($x:tt)*) => { | 11 | ($($x:tt)*) => { |
| 12 | { | 12 | { |
| 13 | if cfg!(feature = "unchecked-overclocking") { | 13 | #[cfg(not(feature = "unchecked-overclocking"))] |
| 14 | { | ||
| 14 | #[cfg(not(feature = "defmt"))] | 15 | #[cfg(not(feature = "defmt"))] |
| 15 | ::core::assert!($($x)*); | 16 | ::core::assert!($($x)*); |
| 16 | #[cfg(feature = "defmt")] | 17 | #[cfg(feature = "defmt")] |
| 17 | ::defmt::assert!($($x)*); | 18 | ::defmt::assert!($($x)*); |
| 18 | } else { | 19 | } |
| 20 | #[cfg(feature = "unchecked-overclocking")] | ||
| 21 | { | ||
| 19 | #[cfg(feature = "log")] | 22 | #[cfg(feature = "log")] |
| 20 | ::log::warn!("`rcc_assert!` skipped: `unchecked-overclocking` feature is enabled."); | 23 | ::log::warn!("`rcc_assert!` skipped: `unchecked-overclocking` feature is enabled."); |
| 21 | #[cfg(feature = "defmt")] | 24 | #[cfg(feature = "defmt")] |
