The motivation is to allow accessing array elements from device tree properties in Kconfig. * Add dt_node_array_prop and _node_array_prop functions to extract the array elements from properties. * Add 'dt_node_array_prop_int' and 'dt_node_array_prop_hex' keys to use in Kconfig. Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
20 lines
402 B
Plaintext
20 lines
402 B
Plaintext
# Copyright (c) 2022 Nordic Semiconductor
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
DT_FLASH_CONTROLLER := $(dt_nodelabel_path,flashcontroller0)
|
|
|
|
config FLASH_CONTROLLER_ADDRESS
|
|
int
|
|
default $(dt_node_array_prop_int,$(DT_FLASH_CONTROLLER),reg,0)
|
|
|
|
config FLASH_CONTROLLER_SIZE
|
|
int
|
|
default $(dt_node_array_prop_int,$(DT_FLASH_CONTROLLER),reg,1)
|
|
|
|
|
|
menu "Zephyr Kernel"
|
|
source "Kconfig.zephyr"
|
|
endmenu
|