Rust crate for Flattened Devicetree parsing

Wesley Norris 152f8787d1 Initial commit %!s(int64=4) %!d(string=hai) anos
examples 152f8787d1 Initial commit %!s(int64=4) %!d(string=hai) anos
src 152f8787d1 Initial commit %!s(int64=4) %!d(string=hai) anos
.gitignore 152f8787d1 Initial commit %!s(int64=4) %!d(string=hai) anos
Cargo.toml 152f8787d1 Initial commit %!s(int64=4) %!d(string=hai) anos
LICENSE 152f8787d1 Initial commit %!s(int64=4) %!d(string=hai) anos
README.md 152f8787d1 Initial commit %!s(int64=4) %!d(string=hai) anos
rustfmt.toml 152f8787d1 Initial commit %!s(int64=4) %!d(string=hai) anos
test.dtb 152f8787d1 Initial commit %!s(int64=4) %!d(string=hai) anos
test.dts 152f8787d1 Initial commit %!s(int64=4) %!d(string=hai) anos

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(","));
}