Menu Close

Using Comments and Macros in Device Trees / Nodes

This article talks about how to write comments and macros when developing device trees and nodes.

For related subjects, please refer to the SOC Table of Contents.

 

Writing comments in device tree files is the same as writing comments in C, with the same syntax. As can be seen below, you can choose to comment out sections by using /* and */, or you can comment out lines using //.

As mentioned previously, device tree files can use #include to include .dtsi, .dts, as well as C header files. This means macros can be used in device tree files, as seen above. Such is the case with many device tree files in the arch/arm/boot/dts directory.

 

Posted in Textbook and Training Project

Related Articles

Leave a Reply

Your email address will not be published.

Leave the field below empty!