mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-12 09:35:48 +00:00
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>
38 lines
858 B
Python
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
|