dts文件格式:


1、引用:

1)、phandle引用

  • 被引用的節點中增加phandle屬性,引用節點可在屬性中使用phandle值引用該節點:
pic@10000000 {
    phandle = <123>;
    interrupt-controller;
};

another-device-node {
    interrupt-parent = <123>;   // 使用phandle值為123來引用上述節點
};

2)、標簽引用:

  • 被引用節點增加標簽,引用節點可在屬性中使用標簽引用該節點,本質是在編譯dts時,dtc為有標簽的節點增加了phandle屬性,並為其賦唯一值。
PIC: pic@11000000 {
    interrupt-controller;
};

another-device-node {
    interrupt-parent = <&PIC>;   // 使用label來引用上述節點, 
};


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM