Struct Platform

Source
pub struct Platform {
    pub(crate) console: &'static Console<'static>,
    pub(crate) led: &'static LedDriver<'static, LedLow<'static, GPIOPin<'static>>, 4>,
    pub(crate) alarm: &'static AlarmDriverComponentType<Rtc<'static>>,
    pub(crate) scheduler: &'static RoundRobinSched<'static>,
    pub(crate) systick: SysTick,
    pub(crate) processes: &'static [Option<&'static dyn Process>],
}
Expand description

Supported drivers by the platform

Fields§

§console: &'static Console<'static>§led: &'static LedDriver<'static, LedLow<'static, GPIOPin<'static>>, 4>§alarm: &'static AlarmDriverComponentType<Rtc<'static>>§scheduler: &'static RoundRobinSched<'static>§systick: SysTick§processes: &'static [Option<&'static dyn Process>]

Trait Implementations§

Source§

impl KernelResources<NRF52<'static, Nrf52840DefaultPeripherals<'static>>> for Platform

Source§

type SyscallDriverLookup = Platform

The implementation of the system call dispatch mechanism the kernel will use.
Source§

type SyscallFilter = ()

The implementation of the system call filtering mechanism the kernel will use.
Source§

type ProcessFault = ()

The implementation of the process fault handling mechanism the kernel will use.
Source§

type Scheduler = RoundRobinSched<'static>

The implementation of the scheduling algorithm the kernel will use.
Source§

type SchedulerTimer = SysTick

The implementation of the timer used to create the timeslices provided to applications.
Source§

type WatchDog = ()

The implementation of the WatchDog timer used to monitor the running of the kernel.
Source§

type ContextSwitchCallback = ()

The implementation of the context switch callback handler the kernel will use.
Source§

fn syscall_driver_lookup(&self) -> &Self::SyscallDriverLookup

Returns a reference to the implementation of the SyscallDriverLookup this platform will use to route syscalls.
Source§

fn syscall_filter(&self) -> &Self::SyscallFilter

Returns a reference to the implementation of the SyscallFilter this platform wants the kernel to use.
Source§

fn process_fault(&self) -> &Self::ProcessFault

Returns a reference to the implementation of the ProcessFault handler this platform wants the kernel to use.
Source§

fn scheduler(&self) -> &Self::Scheduler

Returns a reference to the implementation of the Scheduler this platform wants the kernel to use.
Source§

fn scheduler_timer(&self) -> &Self::SchedulerTimer

Returns a reference to the implementation of the SchedulerTimer timer for this platform.
Source§

fn watchdog(&self) -> &Self::WatchDog

Returns a reference to the implementation of the WatchDog on this platform.
Source§

fn context_switch_callback(&self) -> &Self::ContextSwitchCallback

Returns a reference to the implementation of the ContextSwitchCallback for this platform.
Source§

impl ProcessLoadingAsyncClient for Platform

Source§

fn process_loaded(&self, _result: Result<(), ProcessLoadError>)

A process was successfully found in flash, checked, and loaded into a ProcessStandard object.
Source§

fn process_loading_finished(&self)

There are no more processes in flash to be loaded.
Source§

impl SyscallDriverLookup for Platform

Source§

fn with_driver<F, R>(&self, driver_num: usize, f: F) -> R
where F: FnOnce(Option<&dyn SyscallDriver>) -> R,

Platform-specific mapping of syscall numbers to objects that implement the Driver methods for that syscall. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.