Change compile condition

This commit is contained in:
Bing Wen 2024-11-27 14:00:45 +08:00
parent d0340ad297
commit b225d73dc5

View File

@ -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")]