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

    const NUM_TASK_PRIORITY_LEVELS: usize;

    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!.

Associated Types

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

Associated Constants

The number of task priority levels.

Required methods

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

Implementors