An introduction to devicetrees in the Zephyr RTOS, covering DTS/DTSI syntax, file hierarchy in the Zephyr repository, and how to use the gpio_dt API in firmware. Uses the Nordic nRF52840 development kit and the blinky example to show how LEDs and GPIOs are described in a devicetree and accessed in C source code. Also highlights key differences between Zephyr's devicetree usage and Linux's.

9m read timeFrom embeddedrelated.com
Post cover image
Table of contents
Quick LinksBASIC SYNTAXDEVICETREE LOCATION AND HIERARCHYUSING THE DEVICETREE IN SOURCE CODECONCLUSION