zephyr/scripts/dts/extract/directive.py
Ulf Magnusson f5b17d4138 scripts/dts: Call /foo/bar a "path" instead of an "address"
It's confusing that "address" is often used within the same function to
refer to both node paths and e.g. address cells.

Make things easier to understand by calling /foo/bar a path instead.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-22 12:44:16 -06:00

38 lines
858 B
Python

#
# Copyright (c) 2018 Bobby Noelte
#
# SPDX-License-Identifier: Apache-2.0
#
from .globals import *
##
# @brief Base class for device tree directives
#
class DTDirective(object):
##
# @brief Get a label string for a list of label sub-strings.
#
# Label sub-strings are concatenated by '_'.
#
# @param label List of label sub-strings
# @return label string
#
@staticmethod
def get_label_string(label):
return str_to_label('_'.join(x.strip() for x in label if x.strip()))
def __init__():
pass
##
# @brief Extract directive information.
#
# @param node_path Path to node issuing the directive.
# @param prop Directive property name
# @param def_label Define label string of node owning the directive.
#
def extract(self, node_path, prop, def_label):
pass