[][src]Crate fdt_rs

A flattened device tree parser for embedded, low memory, and safety-critical no-std environment

  • This device tree parser uses zero-allocation
  • Remains safe even in the event of an invalid device tree
  • Never performs misaligned reads

Features

This crate can be used without the standard library (#![no_std]) by disabling the default std feature. To use no-std place the following in your Cargo.toml:

[dependencies.fdt-rs]
version = "0.1"
default-features = false
# features = ["ascii"]    # <--- Uncomment if you wish to use the ascii crate for str's

Embeded software may not require the use of utf8 strings. For memory and processing constrained environments ASCII may be suitable. For this reason, this crate supports the use of either ascii or standard rust utf-8 str types.

Enabling the "ascii" feature will configure the Str type returned by string accessor methods to be of type AsciiStr provided by the ascii crate.

Modules

iters

This module provides a collection of iterative parsers of the buf provided to initialze a DevTree.

spec

This module provides definitions of structures and enums from the Device Tree Specification.

Structs

DevTree

A parseable Flattened Device Tree.

DevTreeNode

A handle to a Device Tree Node within the device tree.

DevTreeProp

A handle to a DevTreeNode's Device Tree Property

Enums

DevTreeError

An error describe parsing problems when creating device trees.

DevTreeItem

An enum which contains either a DevTreeNode or a DevTreeProp

Type Definitions

Str
StrError