mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-10-03 07:04:46 +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 {
|
macro_rules! rcc_assert {
|
||||||
($($x:tt)*) => {
|
($($x:tt)*) => {
|
||||||
{
|
{
|
||||||
if cfg!(feature = "unchecked-overclocking") {
|
#[cfg(not(feature = "unchecked-overclocking"))]
|
||||||
|
{
|
||||||
#[cfg(not(feature = "defmt"))]
|
#[cfg(not(feature = "defmt"))]
|
||||||
::core::assert!($($x)*);
|
::core::assert!($($x)*);
|
||||||
#[cfg(feature = "defmt")]
|
#[cfg(feature = "defmt")]
|
||||||
::defmt::assert!($($x)*);
|
::defmt::assert!($($x)*);
|
||||||
} else {
|
}
|
||||||
|
#[cfg(feature = "unchecked-overclocking")]
|
||||||
|
{
|
||||||
#[cfg(feature = "log")]
|
#[cfg(feature = "log")]
|
||||||
::log::warn!("`rcc_assert!` skipped: `unchecked-overclocking` feature is enabled.");
|
::log::warn!("`rcc_assert!` skipped: `unchecked-overclocking` feature is enabled.");
|
||||||
#[cfg(feature = "defmt")]
|
#[cfg(feature = "defmt")]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user