diff options
| author | Michal Hanus <mikehanus@protonmail.com> | 2025-04-14 22:04:32 +0200 |
|---|---|---|
| committer | Michal Hanus <mikehanus@protonmail.com> | 2025-04-14 22:04:32 +0200 |
| commit | 2e13c372f1419f08dab7797b244681f889dd9bcf (patch) | |
| tree | 995a31c40f13068c4135c213e938e0a2a9ed05a3 /nrfdemo/build/tfm/api_ns/interface/include/device_cfg.h | |
| parent | 620dfd94019f3c7e3022fa5a5fb9c9b51491062d (diff) | |
nrfdemo
Diffstat (limited to 'nrfdemo/build/tfm/api_ns/interface/include/device_cfg.h')
| -rw-r--r-- | nrfdemo/build/tfm/api_ns/interface/include/device_cfg.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/nrfdemo/build/tfm/api_ns/interface/include/device_cfg.h b/nrfdemo/build/tfm/api_ns/interface/include/device_cfg.h new file mode 100644 index 0000000..ef2bfba --- /dev/null +++ b/nrfdemo/build/tfm/api_ns/interface/include/device_cfg.h @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2022 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#ifndef DEVICE_CFG_H__ +#define DEVICE_CFG_H__ + +#include <autoconf.h> + +/* ARRAY_SIZE causes a conflict as it is defined both by TF-M and indirectly by devicetree.h */ +#undef ARRAY_SIZE +#include <zephyr/devicetree.h> + +#if !defined(NRF54L15_ENGA_XXAA) +#if defined(CONFIG_TFM_SECURE_UART0) || DOMAIN_NS == 1U +#define TFM_UART uart0 +#endif /* defined(CONFIG_TFM_SECURE_UART0) || DOMAIN_NS == 1U */ + +#if defined(CONFIG_TFM_SECURE_UART1) && DOMAIN_NS != 1U +#define TFM_UART uart1 +#endif /* defined(CONFIG_TFM_SECURE_UART1) */ + +#else /* NRF54L15_ENGA_XXAA */ +#if defined(CONFIG_TFM_SECURE_UART00) && DOMAIN_NS != 1U +#define TFM_UART uart00 +#endif /* defined(CONFIG_TFM_SECURE_UART00) */ + +#if defined(CONFIG_TFM_SECURE_UART20) && DOMAIN_NS != 1U +#define TFM_UART uart20 +#endif /* defined(CONFIG_TFM_SECURE_UART20) */ + +#if defined(CONFIG_TFM_SECURE_UART21) && DOMAIN_NS != 1U +#define TFM_UART uart21 +#endif /* defined(CONFIG_TFM_SECURE_UART21) */ + +#if defined(CONFIG_TFM_SECURE_UART22) && DOMAIN_NS != 1U +#define TFM_UART uart22 +#endif /* defined(CONFIG_TFM_SECURE_UART22) */ + +#if defined(CONFIG_TFM_SECURE_UART30) && DOMAIN_NS != 1U +#define TFM_UART uart30 +#endif /* defined(CONFIG_TFM_SECURE_UART30) */ +#endif /* NRF54L15_ENGA_XXAA */ + +#define DEFAULT_UART_BAUDRATE DT_PROP_OR(DT_NODELABEL(TFM_UART), current_speed, 115200) + +#if DT_PROP(DT_NODELABEL(TFM_UART), hw_flow_control) +#define DEFAULT_UART_CONTROL ARM_USART_FLOW_CONTROL_RTS_CTS +#else +#define DEFAULT_UART_CONTROL 0 +#endif + +#endif /* DEVICE_CFG_H__ */ |
