devicetree

Crates.iodevicetree
lib.rsdevicetree
version0.1.1
sourcesrc
created_at2022-11-17 15:18:42.376979
updated_at2022-11-17 15:23:32.863036
descriptionDevicetree parsing tool
homepage
repositoryhttps://github.com/duanyu-yu/DeviceTree
max_upload_size
id717323
size52,337
Yu Duan (duanyu-yu)

documentation

README

DeviceTree

The crate devicetree can be used for parsing Devicetree Blob (DTB), based on Devicetree Specification.

The crate devicetree is a #![no_std] crate written in Rust.

Example

use devicetree::DeviceTreeBlob;

fn main() {
    let mut dtb: &[u8] = include_bytes!("<path-to-*.dtb>");

    let tree = DeviceTree::from_bytes(&mut dtb).unwrap();

    println!("{}", tree);
}

Debug

devicetree uses Log Messages to log info, debug, or error messages to the console. More about Log Messages can be found here.

Set the RUST_LOG environment variable to print debug messages:

RUST_LOG=debug cargo run
Commit count: 32

cargo fmt