1 /* 2 * Copyright (c) 2023 Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef DEVICE_CFG_H__ 8 #define DEVICE_CFG_H__ 9 10 #include <zephyr/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 #if DOMAIN_NS == 1U 17 #define TFM_UART uart0 18 #endif 19 20 #if DOMAIN_NS != 1U 21 #define TFM_UART uart1 22 #endif 23 24 #define DEFAULT_UART_BAUDRATE DT_PROP_OR(DT_NODELABEL(TFM_UART), current_speed, 115200) 25 26 #if DT_PROP(DT_NODELABEL(TFM_UART), hw_flow_control) 27 #define DEFAULT_UART_CONTROL ARM_USART_FLOW_CONTROL_RTS_CTS 28 #else 29 #define DEFAULT_UART_CONTROL 0 30 #endif 31 32 #endif /* DEVICE_CFG_H__ */ 33