use crate::os_trait::{
AtomicNotifier, AtomicNotifyWaiter, FakeRawMutex, TickDelay, TickTimeoutNs, TickTimeoutState,
prelude::*,
};
use crate::timer::SysTickInstant;
pub struct RawOs;
impl OsInterface for RawOs {
type RawMutex = FakeRawMutex;
type Notifier = AtomicNotifier<RawOs>;
type NotifyWaiter = AtomicNotifyWaiter<RawOs>;
type Timeout = TickTimeoutNs<SysTickInstant>;
type TimeoutState = TickTimeoutState<SysTickInstant>;
type Delay = TickDelay<SysTickInstant>;
const O: Self = Self {};
fn yield_thread() {}
#[inline]
fn timeout() -> Self::Timeout {
TickTimeoutNs::<SysTickInstant>::new()
}
#[inline]
fn delay() -> Self::Delay {
TickDelay::<SysTickInstant>::default()
}
#[inline]
fn notify() -> (Self::Notifier, Self::NotifyWaiter) {
AtomicNotifier::<RawOs>::new()
}
}