Rust crate for Flattened Devicetree parsing

Wesley Norris 152f8787d1 Initial commit 4 rokov pred
examples 152f8787d1 Initial commit 4 rokov pred
src 152f8787d1 Initial commit 4 rokov pred
.gitignore 152f8787d1 Initial commit 4 rokov pred
Cargo.toml 152f8787d1 Initial commit 4 rokov pred
LICENSE 152f8787d1 Initial commit 4 rokov pred
README.md 152f8787d1 Initial commit 4 rokov pred
rustfmt.toml 152f8787d1 Initial commit 4 rokov pred
test.dtb 152f8787d1 Initial commit 4 rokov pred
test.dts 152f8787d1 Initial commit 4 rokov pred

README.md

fdt

A pure-Rust crate for parsing Flattened Devicetrees, with the goal of having a very ergonomic and idiomatic API.

License

This crate is licensed under the Mozilla Public License 2.0 (see the LICENSE file).

Example

static MY_FDT: &[u8] = include_bytes!("my_fdt.dtb");

fn main() {
    let fdt = fdt::Fdt::new(MY_FDT).unwrap();

    println!("This is a devicetree representation of a {}", fdt.root().model());
    println!("...Which is compatible with: {}", fdt.root().compatible().join(","));
}