mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-21 22:32:29 +00:00
fix
This commit is contained in:
parent
82a438a037
commit
5c23c789ee
@ -188,12 +188,29 @@ macro_rules! bind_interrupts {
|
||||
)*
|
||||
}
|
||||
|
||||
$(
|
||||
$(#[cfg($cond_irq)])?
|
||||
$crate::bind_interrupts!(@__generate_impls $name $(#[cfg($cond_irq)])? $irq => $(
|
||||
$(#[cfg($cond_handler)])?
|
||||
$handler;
|
||||
)*);
|
||||
)*
|
||||
};
|
||||
|
||||
(@__generate_single_impl $name:ident $(#[cfg($cond_irq:meta)])? $irq:ident => $(#[cfg($cond_handler:meta)])? $handler:ty;) => {
|
||||
#[cfg(all(
|
||||
$($cond_irq,)?
|
||||
$($cond_handler,)?
|
||||
))]
|
||||
unsafe impl $crate::interrupt::typelevel::Binding<$crate::interrupt::typelevel::$irq, $handler> for $name {}
|
||||
)*
|
||||
)*
|
||||
};
|
||||
|
||||
(@__generate_impls $name:ident $(#[cfg($cond_irq:meta)])? $irq:ident => $(#[cfg($cond_handler:meta)])? $handler:ty;) => {
|
||||
$crate::bind_interrupts!(@__generate_single_impl $name $(#[cfg($cond_irq)])? $irq => $(#[cfg($cond_handler)])? $handler;);
|
||||
};
|
||||
|
||||
(@__generate_impls $name:ident $(#[cfg($cond_irq:meta)])? $irq:ident => $(#[cfg($cond_handler:meta)])? $handler:ty; $(tail:tt)*) => {
|
||||
$crate::bind_interrupts!(@__generate_single_impl $name $(#[cfg($cond_irq)])? $irq => $(#[cfg($cond_handler)])? $handler;);
|
||||
|
||||
$crate::bind_interrupts!(@__generate_impls $name $(#[cfg($cond_irq)])? $irq => $(tail)*);
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user