Skip to content

Instantly share code, notes, and snippets.

@elcritch
Created October 5, 2021 05:03
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save elcritch/4a03fb2a12ad886b338e5f1fe07b07d8 to your computer and use it in GitHub Desktop.
Example of DTS tree encoded into a pure Nim Macro
deviceTree:
&mikrobus_i2c {
status = "okay",
spi-max-frequency = `<100000>`,
}
&mikrobus_spi:
status: "okay"
click_spi2: spi-device@1 {
compatible = "microchip,mcp3204",
reg = `<0x1>`,
spi-max-frequency = `<100000>`,
label = "MCP3201",
#io-channel-cells = <1>,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment