Rust crate for Flattened Devicetree parsing
|
%!s(int64=4) %!d(string=hai) anos | |
---|---|---|
examples | %!s(int64=4) %!d(string=hai) anos | |
src | %!s(int64=4) %!d(string=hai) anos | |
.gitignore | %!s(int64=4) %!d(string=hai) anos | |
Cargo.toml | %!s(int64=4) %!d(string=hai) anos | |
LICENSE | %!s(int64=4) %!d(string=hai) anos | |
README.md | %!s(int64=4) %!d(string=hai) anos | |
rustfmt.toml | %!s(int64=4) %!d(string=hai) anos | |
test.dtb | %!s(int64=4) %!d(string=hai) anos | |
test.dts | %!s(int64=4) %!d(string=hai) anos |
fdt
A pure-Rust crate for parsing Flattened Devicetrees, with the goal of having a very ergonomic and idiomatic API.
This crate is licensed under the Mozilla Public License 2.0 (see the LICENSE file).
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(","));
}