Expand description
§mu_lib
A library providing essential functionality for the XCENA system. This library is designed to work with both C++ and Rust, providing a safe and efficient interface for system operations.
§Features
- Safe Rust bindings for all system operations
- Thread-safe atomic operations
- Comprehensive logging system
- Task management utilities
- System clock access
- Message passing capabilities
§Modules
assert: Provides condition checking and program termination functionsatomic: Provides thread-safe atomic operationsclock: Provides system clock functionalitylogger: Provides logging functionality with various log levelsmessage: Provides synchronous and asynchronous message handling functionsprint: Provides output functionality for UART, host, and general printingtask: Provides task management functionality
§Examples
use mu_lib::print::uart_println;
use mu_lib::logger::{LogLevel, log_print_with_level};
// Print to UART
uart_println!("Hello from Rust!");
// Log with level
log_print_with_level!(LogLevel::Info, "System initialized");§Safety
This library contains unsafe code that interfaces with the system. While the Rust interface provides safe abstractions, users should be aware of the underlying system requirements and constraints.
Modules§
- assert
- Assertion module providing condition checking functionality
- atomic
- Atomic operations module providing thread-safe operations
- bindings
- clock
- Clock module providing system clock functionality
- logger
- Logger module providing logging functionality
- message
- Message handling module providing synchronous and asynchronous message operations
- Print module providing output functionality
- task
- Task module providing task management functionality
Macros§
- host_
print - Macro for printing a single string to the host
- host_
println - Macro for printing a single string to the host followed by a newline
- log_
print - Macro for logging output
- log_
print_ with_ level - Macro for logging output with a specified level
- uart_
print - Macro for printing a single string to UART
- uart_
println - Macro for printing a single string to UART followed by a newline