fdt-rs
A Flattened Device Tree parser for embedded no-std environments
Usage
Add this to your Cargo.toml:
[]
= "0.1"
and this to your crate root:
extern crate fdt_rs;
Features
This crate can be used without the standard library (#![no_std]) by disabling
the default std feature. Use this in Cargo.toml:
[]
= "0.1"
= false
# features = ["ascii"] # <--- Uncomment if you wish to use the ascii crate for str's
The "ascii" feature will configure the Str type returned by string accessor
methods to be of type AsciiStr provided by the ascii crate.
Without this feature enabled, str references will be returned.
Example
extern crate fdt_rs;
// Initialize the devtree using raw an &[u8] array
let devtree = unsafe
// Print the name of the UART compatible node
if let Some = devtree.find_prop