mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-09-30 22:01:07 +00:00
Change compile condition
This commit is contained in:
parent
d0340ad297
commit
b225d73dc5
@ -10,12 +10,15 @@ compile_error!("You may not enable both `defmt` and `log` features.");
|
||||
macro_rules! rcc_assert {
|
||||
($($x:tt)*) => {
|
||||
{
|
||||
if cfg!(feature = "unchecked-overclocking") {
|
||||
#[cfg(not(feature = "unchecked-overclocking"))]
|
||||
{
|
||||
#[cfg(not(feature = "defmt"))]
|
||||
::core::assert!($($x)*);
|
||||
#[cfg(feature = "defmt")]
|
||||
::defmt::assert!($($x)*);
|
||||
} else {
|
||||
}
|
||||
#[cfg(feature = "unchecked-overclocking")]
|
||||
{
|
||||
#[cfg(feature = "log")]
|
||||
::log::warn!("`rcc_assert!` skipped: `unchecked-overclocking` feature is enabled.");
|
||||
#[cfg(feature = "defmt")]
|
||||
|
Loading…
x
Reference in New Issue
Block a user