Crates.io | devicetree |
lib.rs | devicetree |
version | 0.1.1 |
source | src |
created_at | 2022-11-17 15:18:42.376979 |
updated_at | 2022-11-17 15:23:32.863036 |
description | Devicetree parsing tool |
homepage | |
repository | https://github.com/duanyu-yu/DeviceTree |
max_upload_size | |
id | 717323 |
size | 52,337 |
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.
use devicetree::DeviceTreeBlob;
fn main() {
let mut dtb: &[u8] = include_bytes!("<path-to-*.dtb>");
let tree = DeviceTree::from_bytes(&mut dtb).unwrap();
println!("{}", tree);
}
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