aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYandrik <me@yandrik.dev>2023-03-15 20:04:27 +0100
committerYandrik <me@yandrik.dev>2023-03-15 20:04:27 +0100
commita071ab05b2bb443672c0c21386522d5ebcbcb63a (patch)
tree573cc7ed723f2eb0e252b64486307d83bd7a2e42
parent15b9db4c5d60f8cc7c192261ad01b1ebf74faa83 (diff)
refactor(macro): used $crate for better interop
-rw-r--r--rtic-monotonics/src/rp2040.rs4
-rw-r--r--rtic-monotonics/src/systick.rs4
-rw-r--r--rtic-sync/src/channel.rs2
3 files changed, 5 insertions, 5 deletions
diff --git a/rtic-monotonics/src/rp2040.rs b/rtic-monotonics/src/rp2040.rs
index 93472e6..9b66bca 100644
--- a/rtic-monotonics/src/rp2040.rs
+++ b/rtic-monotonics/src/rp2040.rs
@@ -144,12 +144,12 @@ 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>
+ unsafe impl $crate::InterruptToken<rtic_monotonics::rp2040::Timer>
for Rp2040Token
{
}
diff --git a/rtic-monotonics/src/systick.rs b/rtic-monotonics/src/systick.rs
index feefc7e..85184db 100644
--- a/rtic-monotonics/src/systick.rs
+++ b/rtic-monotonics/src/systick.rs
@@ -162,12 +162,12 @@ 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>
+ unsafe impl $crate::InterruptToken<rtic_monotonics::systick::Systick>
for SystickToken
{
}
diff --git a/rtic-sync/src/channel.rs b/rtic-sync/src/channel.rs
index ee5ea9c..d0670c2 100644
--- a/rtic-sync/src/channel.rs
+++ b/rtic-sync/src/channel.rs
@@ -103,7 +103,7 @@ impl<T, const N: usize> Channel<T, N> {
#[macro_export]
macro_rules! make_channel {
($type:path, $size:expr) => {{
- static mut CHANNEL: ::rtic_sync::channel::Channel<$type, $size> = ::rtic_sync::channel::Channel::new();
+ static mut CHANNEL: $crate::channel::Channel<$type, $size> = $crate::channel::Channel::new();
// SAFETY: This is safe as we hide the static mut from others to access it.
// Only this point is where the mutable access happens.