mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-23 12:12:50 +01:00
refactor: re-formatted files
This commit is contained in:
parent
60e5232ee9
commit
ef12ae6b04
3 changed files with 16 additions and 25 deletions
|
@ -139,8 +139,7 @@ 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() {
|
||||
|
@ -149,12 +148,8 @@ macro_rules! make_rp2040_monotonic_handler {
|
|||
|
||||
pub struct Rp2040Token;
|
||||
|
||||
unsafe impl $crate::InterruptToken<$crate::rp2040::Timer>
|
||||
for Rp2040Token
|
||||
{
|
||||
}
|
||||
unsafe impl $crate::InterruptToken<$crate::rp2040::Timer> for Rp2040Token {}
|
||||
|
||||
Rp2040Token
|
||||
}
|
||||
};
|
||||
}};
|
||||
}
|
||||
|
|
|
@ -157,8 +157,7 @@ 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() {
|
||||
|
@ -167,12 +166,8 @@ macro_rules! make_systick_handler {
|
|||
|
||||
pub struct SystickToken;
|
||||
|
||||
unsafe impl $crate::InterruptToken<$crate::systick::Systick>
|
||||
for SystickToken
|
||||
{
|
||||
}
|
||||
unsafe impl $crate::InterruptToken<$crate::systick::Systick> for SystickToken {}
|
||||
|
||||
SystickToken
|
||||
}
|
||||
};
|
||||
}};
|
||||
}
|
||||
|
|
|
@ -103,7 +103,8 @@ impl<T, const N: usize> Channel<T, N> {
|
|||
#[macro_export]
|
||||
macro_rules! make_channel {
|
||||
($type:path, $size:expr) => {{
|
||||
static mut CHANNEL: $crate::channel::Channel<$type, $size> = $crate::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.
|
||||
|
@ -125,7 +126,7 @@ pub enum TrySendError<T> {
|
|||
}
|
||||
|
||||
impl<T> core::fmt::Debug for NoReceiver<T>
|
||||
where
|
||||
where
|
||||
T: core::fmt::Debug,
|
||||
{
|
||||
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
||||
|
@ -134,7 +135,7 @@ impl<T> core::fmt::Debug for NoReceiver<T>
|
|||
}
|
||||
|
||||
impl<T> core::fmt::Debug for TrySendError<T>
|
||||
where
|
||||
where
|
||||
T: core::fmt::Debug,
|
||||
{
|
||||
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
||||
|
@ -146,7 +147,7 @@ impl<T> core::fmt::Debug for TrySendError<T>
|
|||
}
|
||||
|
||||
impl<T> PartialEq for TrySendError<T>
|
||||
where
|
||||
where
|
||||
T: PartialEq,
|
||||
{
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
|
|
Loading…
Reference in a new issue