Expand description
This module’s main focus is parse_dt
which parses a DTS file and returns
an unflattened device tree.
In addition there are a couple of utility C-style escaped strings and characters parsing functions.
Enums§
- Parse
Result - Returned on a successful completion of
parse_dt
.
Functions§
- escape_
c_ char - Parse a slice of bytes as a ASCII character. The character may be described
as a C-style escape code. All hexadecimal and octal escape codes work up to
0xff or x777, respectively, because they are not converted to
char
s. - escape_
c_ string - Parse a slice of bytes as a
String
, replacing escape codes with the appropriate character. Characters may be described as a C-style escape code. All hexadecimal and octal escape codes work up to 0x7f or x177, respectively. This is due to the conversion tochar
s. Seeparser::escape_c_char
if a conversion of a character beyond this change is needed. - parse_
dt - Parses the slice of
u8
s as ASCII characters and returns a device tree made of the first root node and aVec
of nodes defined after that. The nodes defined after the first root node may specify a node by label to modify or my start at the root node. These amendments to the root node can be merged into the device tree manually or bytree::apply_amends
.