Skip to main content

DefaultConfig

Struct DefaultConfig 

Source
pub struct DefaultConfig;
Expand description

The upstream template configuration (examples/template_configuration/FreeRTOSConfig.h, V11.3.1), value for value: 100 Hz, 5 priorities, 128-word stacks, 16-character names, 32-bit ticks, preemption on, time slicing off, the timer task at the highest priority with a 10-deep queue, stack overflow method 2, a 4 KiB heap.

Trait Implementations§

Source§

impl Clone for DefaultConfig

Source§

fn clone(&self) -> DefaultConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Config for DefaultConfig

Source§

const TICK_RATE_HZ: u32 = 100

configTICK_RATE_HZ.
Source§

const MAX_PRIORITIES: u8 = 5

configMAX_PRIORITIES.
Source§

const MINIMAL_STACK_SIZE: usize = 128

configMINIMAL_STACK_SIZE, in words.
Source§

const MAX_TASK_NAME_LEN: usize = 16

configMAX_TASK_NAME_LEN, including the terminator the C kernel keeps.
Source§

const USE_TIME_SLICING: bool = false

configUSE_TIME_SLICING.
Source§

const TIMER_TASK_PRIORITY: u8 = 4

configTIMER_TASK_PRIORITY.
Source§

const TIMER_TASK_STACK_DEPTH: usize = 128

configTIMER_TASK_STACK_DEPTH, in words.
Source§

type Tick = Bits32

configTICK_TYPE_WIDTH_IN_BITS.
Source§

const INITIAL_TICK_COUNT: u64 = 0

configINITIAL_TICK_COUNT.
Source§

const USE_PREEMPTION: bool = true

configUSE_PREEMPTION.
Source§

const IDLE_SHOULD_YIELD: bool = true

configIDLE_SHOULD_YIELD.
Source§

const USE_TICK_HOOK: bool = false

configUSE_TICK_HOOK: whether the kernel calls the tick hook from inside xTaskIncrementTick. Read more
Source§

const USE_TIMERS: bool = true

configUSE_TIMERS: whether the software timer daemon exists.
Source§

const MESSAGE_LENGTH_BYTES: usize = 4

sizeof( configMESSAGE_BUFFER_LENGTH_TYPE ): how many bytes a message buffer spends on each message’s length prefix. Read more
Source§

const NOTIFICATION_ARRAY_ENTRIES: usize = 1

configTASK_NOTIFICATION_ARRAY_ENTRIES.
Source§

const NUM_TLS_POINTERS: usize = 0

configNUM_THREAD_LOCAL_STORAGE_POINTERS.
Source§

const QUEUE_REGISTRY_SIZE: usize = 0

configQUEUE_REGISTRY_SIZE.
Source§

const TIMER_QUEUE_LENGTH: usize = 10

configTIMER_QUEUE_LENGTH.
Source§

const CHECK_FOR_STACK_OVERFLOW: u8 = 2

configCHECK_FOR_STACK_OVERFLOW: 0 off, 1 the stack-pointer method, 2 the pattern method.
Source§

const NUMBER_OF_CORES: u8 = 1

configNUMBER_OF_CORES.
Source§

const USE_TICKLESS_IDLE: bool = false

configUSE_TICKLESS_IDLE. Read more
Source§

const EXPECTED_IDLE_TIME_BEFORE_SLEEP: u64 = 2

configEXPECTED_IDLE_TIME_BEFORE_SLEEP, in ticks (tickless idle).
Source§

const TOTAL_HEAP_SIZE: usize = 4096

configTOTAL_HEAP_SIZE, for rusty_rtos_heap’s region, in bytes.
Source§

const DYNAMIC_ALLOCATION: bool = false

Whether this configuration mirrors a C kernel that takes kernel objects from a heap. Read more
Source§

const PORT_STACK_INIT_CRITICAL: bool = false

Whether the port’s pxPortInitialiseStack runs inside a critical section, and so costs one more outermost exit per task created. Read more
Source§

const MAX_TASKS: usize = 16

How many tasks may exist at once, the idle and timer tasks included.
Source§

const MAX_QUEUES: usize = 16

How many queues, semaphores and mutexes may exist at once.
Source§

const MAX_TIMERS: usize = 8

How many software timers may exist at once.
Source§

const MAX_EVENT_GROUPS: usize = 4

How many event groups may exist at once.
Source§

const MAX_STREAM_BUFFERS: usize = 4

How many stream and message buffers may exist at once.
Source§

fn validate() -> Result<(), Error>

The checks FreeRTOS.h makes with #error, as a value. Read more
Source§

fn ms_to_ticks(ms: u64) -> u64

pdMS_TO_TICKS(ms): ms * TICK_RATE_HZ / 1000, floored, saturating at the tick width’s maximum.
Source§

fn ticks_to_ms(ticks: u64) -> u64

pdTICKS_TO_MS(ticks): ticks * 1000 / TICK_RATE_HZ, floored, saturating.
Source§

impl Copy for DefaultConfig

Source§

impl Debug for DefaultConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for DefaultConfig

Source§

fn default() -> DefaultConfig

Returns the “default value” for a type. Read more
Source§

impl Eq for DefaultConfig

Source§

impl Hash for DefaultConfig

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for DefaultConfig

Source§

fn eq(&self, other: &DefaultConfig) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for DefaultConfig

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.