1 /* 2 * Copyright (c) 2023 Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef __RTE_DEVICE_H 8 #define __RTE_DEVICE_H 9 10 #include <autoconf.h> 11 12 /* ARRAY_SIZE causes a conflict as it is defined both by TF-M and indirectly by devicetree.h */ 13 #undef ARRAY_SIZE 14 #include <zephyr/devicetree.h> 15 16 #define UART_PIN_INIT(node_id, prop, idx) \ 17 DT_PROP_BY_IDX(node_id, prop, idx), 18 19 /* Configuration settings for Driver_USART0. */ 20 #if DOMAIN_NS == 1U 21 22 #define RTE_USART0 1 23 24 #define RTE_USART0_PINS \ 25 { \ 26 DT_FOREACH_CHILD_VARGS( \ 27 DT_PINCTRL_BY_NAME(DT_NODELABEL(uart0), default, 0), \ 28 DT_FOREACH_PROP_ELEM, psels, UART_PIN_INIT \ 29 ) \ 30 } 31 32 #endif 33 34 /* Configuration settings for Driver_USART1. */ 35 #if DT_PINCTRL_HAS_NAME(DT_NODELABEL(uart1), default) && DOMAIN_NS != 1U 36 37 #define RTE_USART1 1 38 39 #define RTE_USART1_PINS \ 40 { \ 41 DT_FOREACH_CHILD_VARGS( \ 42 DT_PINCTRL_BY_NAME(DT_NODELABEL(uart1), default, 0), \ 43 DT_FOREACH_PROP_ELEM, psels, UART_PIN_INIT \ 44 ) \ 45 } 46 47 #endif 48 49 /* Configuration settings for Driver_FLASH0. */ 50 #define RTE_FLASH0 1 51 52 #endif /* __RTE_DEVICE_H */ 53