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

Function doAliases

tools/mcdevicetree.js:394–410  ·  view source on GitHub ↗
(state, dts)

Source from the content-addressed store, hash-verified

392}
393
394function doAliases(state, dts) {
395 const root = dts.nodes['/'];
396 const aliases = root.children.aliases;
397 if (!aliases?.properties)
398 return;
399
400 for (let alias in aliases.properties) {
401 const target = aliases.properties[alias].value.value;
402 const targets = state.aliasTable.get(target);
403
404 alias = alias.replaceAll('-', '_');
405 if (targets)
406 targets.push(alias);
407 else
408 state.aliasTable.set(target, [alias]);
409 }
410}
411
412function doGPIOBanks(state, dts) {
413 const gpios = getNodes(state, dts, "gpio");

Callers 1

runMethod · 0.85

Calls 3

getMethod · 0.65
setMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected