Crate ufmt_stdio

Source
Expand description

Minimal printing facilities for ufmt

§Supported platforms:

  • wasm via wasm-bindings;
  • mos microprocessors via linking putchar;
  • riscv32 via esp-* features (see details in Features section) or being no-op otherwise;
  • All other platforms are built upon standard C library write function.

§Features

  • esp-uart - Enables UART writer on riscv32 targets. Mutually exclusive with esp-jtag. Requires user to provide symbols:
    • ESP_UART_ADDR (e.g. on ESP32-C3 it is #[no_mangle] static ESP_UART_ADDR: usize = 0x40000068).
  • esp-jtag - Enables JTAG writer on riscv32 targets. Mutually exclusive with esp-jtag. Requires user to provide symbols:
    • SERIAL_JTAG_FIFO_REG (e.g. on ESP32-C3 it is #[no_mangle] static SERIAL_JTAG_FIFO_REG: usize = 0x60043000)
    • SERIAL_JTAG_CONF_REG (e.g. on ESP32-C3 it is #[no_mangle] static SERIAL_JTAG_CONF_REG: usize = 0x60043004).

Re-exports§

pub extern crate ufmt;

Macros§

d_print
Prints to the stdout in debug mode only
d_println
Prints to the stdout with newline in debug mode only
eprint
Prints to the stderr
eprintln
Prints to the stderr with newline
print
Prints to the stdout
println
Prints to the stdout with newline
uwrite
uwriteln

Structs§

Stderr
Stderr wrapper
Stdout
Stdout wrapper

Traits§

uDebug
Just like core::fmt::Debug
uDisplay
Just like core::fmt::Display
uWrite
A collection of methods that are required / used to format a message into a stream.

Functions§

init
Initializes runtime, when necessary.