MCPcopy Index your code
hub / github.com/Moddable-OpenSource/moddable / toDTS

Method toDTS

tools/mcdevicetree.js:1405–1417  ·  view source on GitHub ↗
(tree)

Source from the content-addressed store, hash-verified

1403 }
1404
1405 static toDTS(tree) {
1406 let output = '';
1407
1408 if (tree.version) {
1409 output += `/dts-${tree.version}/;\n\n`;
1410 }
1411
1412 for (const [, node] of Object.entries(tree.nodes)) {
1413 output += DTSParser.nodeToString(node, 0);
1414 }
1415
1416 return output;
1417 }
1418
1419 static nodeToString(node, indent = 0) {
1420 const indentStr = '\t'.repeat(indent);

Callers

nothing calls this directly

Calls 1

nodeToStringMethod · 0.80

Tested by

no test coverage detected