https://github.com/cascadeos/zig-devicetree
A read-only Flattened Device Tree (DTB) API.
https://github.com/cascadeos/zig-devicetree
device-tree zig zig-library zig-package ziglang
Last synced: 10 months ago
JSON representation
A read-only Flattened Device Tree (DTB) API.
- Host: GitHub
- URL: https://github.com/cascadeos/zig-devicetree
- Owner: CascadeOS
- License: bsd-2-clause
- Created: 2025-03-05T22:11:35.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-03-05T23:51:48.000Z (10 months ago)
- Last Synced: 2025-03-06T00:28:03.216Z (10 months ago)
- Topics: device-tree, zig, zig-library, zig-package, ziglang
- Language: Zig
- Homepage:
- Size: 87.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zig-devicetree
A read-only Flattened Device Tree (DTB) API.
Supports versions 2 through 17.
Compatible with [Devicetree Specification v0.4](https://github.com/devicetree-org/devicetree-specification/releases/tag/v0.4).
This started as a wrapper around [libfdt](https://github.com/dgibson/dtc/tree/main/libfdt) but is now a fresh implementation.
## Installation
Add the dependency to `build.zig.zon`:
```sh
zig fetch --save git+https://github.com/CascadeOS/zig-devicetree
```
Then add the following to `build.zig`:
```zig
const devicetree_dep = b.dependency("devicetree", .{});
exe.root_module.addImport("DeviceTree", devicetree_dep.module("DeviceTree"));
```