Skip to main content

Crate freertos_in_rust

Crate freertos_in_rust 

Source
Expand description

§FreeRTOS-in-Rust - FreeRTOS Kernel in Rust

This crate provides a pure-Rust implementation of the FreeRTOS kernel, translated line-by-line from the original C source code.

§Features

  • port-dummy - Dummy port for compilation (default, panics at runtime)
  • arch-32bit - 32-bit architecture types (default)
  • arch-64bit - 64-bit architecture types
  • tick-32bit - 32-bit tick counter (default)
  • tick-64bit - 64-bit tick counter
  • alloc - Enable memory allocation via Rust’s global allocator
  • std - Enable std for host testing (allocation is selected independently)
  • port-test - Deterministic host test port
  • all-kernel-features - Enable kernel capabilities without selecting a port, integer width, allocator, or SMP mode
  • list-data-integrity-check - Enable list data integrity checks

Production targets must set default-features = false and enable exactly one hardware port. The default port-dummy selection is compile-only and cannot start a scheduler.

Re-exports§

pub use config::*;
pub use types::*;

Modules§

config
FreeRTOS Configuration
kernel
FreeRTOS Kernel Core
memory
Memory Allocation
port
Port Layer
sync
Safe synchronization primitives for FreeRTOS
trace
Trace Hooks
types
FreeRTOS Base Types

Macros§

PRIVILEGED_FUNCTION
Marker for privileged functions (no-op in non-MPU ports) [AMENDMENT] In Rust, this is a no-op. MPU support would need different handling.
traceENTER_pcTimerGetName
traceENTER_pvTimerGetTimerID
traceENTER_uxTimerGetReloadMode
traceENTER_uxTimerGetTimerNumber
traceENTER_vTimerSetReloadMode
traceENTER_vTimerSetTimerID
traceENTER_vTimerSetTimerNumber
traceENTER_xTimerCreate
traceENTER_xTimerCreateStatic
traceENTER_xTimerCreateTimerTask
traceENTER_xTimerGenericCommandFromISR
traceENTER_xTimerGenericCommandFromTask
traceENTER_xTimerGetExpiryTime
traceENTER_xTimerGetPeriod
traceENTER_xTimerGetReloadMode
traceENTER_xTimerGetStaticBuffer
traceENTER_xTimerGetTimerDaemonTaskHandle
traceENTER_xTimerIsTimerActive
traceENTER_xTimerPendFunctionCall
traceENTER_xTimerPendFunctionCallFromISR
tracePEND_FUNC_CALL
tracePEND_FUNC_CALL_FROM_ISR
traceRETURN_pcTimerGetName
traceRETURN_pvTimerGetTimerID
traceRETURN_uxTimerGetReloadMode
traceRETURN_uxTimerGetTimerNumber
traceRETURN_vTimerSetReloadMode
traceRETURN_vTimerSetTimerID
traceRETURN_vTimerSetTimerNumber
traceRETURN_xTimerCreate
traceRETURN_xTimerCreateStatic
traceRETURN_xTimerCreateTimerTask
traceRETURN_xTimerGenericCommandFromISR
traceRETURN_xTimerGenericCommandFromTask
traceRETURN_xTimerGetExpiryTime
traceRETURN_xTimerGetPeriod
traceRETURN_xTimerGetReloadMode
traceRETURN_xTimerGetStaticBuffer
traceRETURN_xTimerGetTimerDaemonTaskHandle
traceRETURN_xTimerIsTimerActive
traceRETURN_xTimerPendFunctionCall
traceRETURN_xTimerPendFunctionCallFromISR
traceTIMER_COMMAND_RECEIVED
traceTIMER_COMMAND_SEND
traceTIMER_CREATE
traceTIMER_EXPIRED

Functions§

delay
Delays the current task for the specified number of ticks.
delay_ms
Delays the current task for the specified number of milliseconds.
start_scheduler
Starts the FreeRTOS scheduler.