Trait r3_kernel::KernelCfg1

source ·
pub unsafe trait KernelCfg1: Sized + Send + Sync + 'static {
    type TaskPriority: BinUInteger;

    const NUM_TASK_PRIORITY_LEVELS: usize;

    // Required method
    fn to_task_priority(i: usize) -> Option<Self::TaskPriority>;
}
Expand description

Associates a kernel trait type with kernel-private data. Use build! to implement.

Customizable things needed by both of Port and KernelCfg2 should live here because Port cannot refer to an associated item defined by KernelCfg2.

Safety

This is only intended to be implemented by build!.

Required Associated Types§

source

type TaskPriority: BinUInteger

Unsigned integer type capable of representing the range 0..NUM_TASK_PRIORITY_LEVELS.

Required Associated Constants§

source

const NUM_TASK_PRIORITY_LEVELS: usize

The number of task priority levels.

Required Methods§

source

fn to_task_priority(i: usize) -> Option<Self::TaskPriority>

Convert usize to Self::TaskPriority. Returns None if i >= Self::NUM_TASK_PRIORITY_LEVELS.

Implementors§