use device_tree::DeviceTree;
mod compatible;
mod node;
pub use compatible::*;
pub use node::*;
/// Represents a DeviceTree loaded from an FDT description.
pub struct Tree {
dt: DeviceTree,
}
impl Tree {
/// Gets a reference to the inner [`DeviceTree`].
pub const fn device_tree(&self) -> &DeviceTree {
&self.dt
}
/// Gets a mutable reference to the inner [`DeviceTree`].
pub fn device_tree_mut(&mut self) -> &mut DeviceTree {
&mut self.dt
}
}
impl From<DeviceTree> for Tree {
fn from(val: DeviceTree) -> Self {
Self { dt: val }
}
}