Skip to main content

printf

Macro printf 

Source
macro_rules! printf {
    ($msg:literal) => { ... };
    ($($arg:tt)*) => { ... };
}
Expand description

A macro to write a formatted string to the OSAL console (OS_printf).

This macro provides a println!-like interface for OS_printf, which is useful for debugging during development. It is a “fire-and-forget” macro that does not return a result.

§Usage

use libcfs::log::printf;

fn my_debug_function() {
    // Simple literal message
    printf!("Debug function entered.");

    let value = 42;

    // Formatted message
    printf!("The current debug value is: {}", value);
}