diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2023-03-15 19:21:13 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-15 19:21:13 +0000 |
| commit | d18955a13450257c0a7725130beef44f21217138 (patch) | |
| tree | 5bd060104b7a316cea1870fb4a74503bb8624931 /rtic-monotonics/src | |
| parent | e145269914227e0af2fc082c3cf490489b8bc979 (diff) | |
| parent | ef12ae6b04fa57371507e4ab49f49cb51c30ee4c (diff) | |
Merge #703
703: fix(rtic-sync): used fully qualified paths in Channel Macro r=korken89 a=Yandrik
Other imports with the name `Channel` (e.g. from Embassy) broke this macro. Now they don't.
Co-authored-by: Yandrik <me@yandrik.dev>
Diffstat (limited to 'rtic-monotonics/src')
| -rw-r--r-- | rtic-monotonics/src/rp2040.rs | 13 | ||||
| -rw-r--r-- | rtic-monotonics/src/systick.rs | 13 |
2 files changed, 8 insertions, 18 deletions
diff --git a/rtic-monotonics/src/rp2040.rs b/rtic-monotonics/src/rp2040.rs index 93472e6..6aa66ce 100644 --- a/rtic-monotonics/src/rp2040.rs +++ b/rtic-monotonics/src/rp2040.rs @@ -139,22 +139,17 @@ impl embedded_hal_async::delay::DelayUs for Timer { /// Register the Timer interrupt for the monotonic. #[macro_export] macro_rules! make_rp2040_monotonic_handler { - () => { - { + () => {{ #[no_mangle] #[allow(non_snake_case)] unsafe extern "C" fn TIMER_IRQ_0() { - rtic_monotonics::rp2040::Timer::__tq().on_monotonic_interrupt(); + $crate::rp2040::Timer::__tq().on_monotonic_interrupt(); } pub struct Rp2040Token; - unsafe impl rtic_monotonics::InterruptToken<rtic_monotonics::rp2040::Timer> - for Rp2040Token - { - } + unsafe impl $crate::InterruptToken<$crate::rp2040::Timer> for Rp2040Token {} Rp2040Token - } - }; + }}; } diff --git a/rtic-monotonics/src/systick.rs b/rtic-monotonics/src/systick.rs index feefc7e..b228e20 100644 --- a/rtic-monotonics/src/systick.rs +++ b/rtic-monotonics/src/systick.rs @@ -157,22 +157,17 @@ impl embedded_hal_async::delay::DelayUs for Systick { /// Register the Systick interrupt for the monotonic. #[macro_export] macro_rules! make_systick_handler { - () => { - { + () => {{ #[no_mangle] #[allow(non_snake_case)] unsafe extern "C" fn SysTick() { - rtic_monotonics::systick::Systick::__tq().on_monotonic_interrupt(); + $crate::systick::Systick::__tq().on_monotonic_interrupt(); } pub struct SystickToken; - unsafe impl rtic_monotonics::InterruptToken<rtic_monotonics::systick::Systick> - for SystickToken - { - } + unsafe impl $crate::InterruptToken<$crate::systick::Systick> for SystickToken {} SystickToken - } - }; + }}; } |
