1 /*
2  * Copyright (c) 2019-2022, Arm Limited. All rights reserved.
3  * Copyright (c) 2020, Cypress Semiconductor Corporation. All rights reserved.
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  *
7  */
8 
9 #ifndef __TFM_PERIPHERALS_DEF_H__
10 #define __TFM_PERIPHERALS_DEF_H__
11 
12 #include "platform_irq.h"
13 #include "target_cfg.h"
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 /*
20  * Quantized default IRQ priority, the value is:
21  * (Number of configurable priority) / 4: (1UL << __NVIC_PRIO_BITS) / 4
22  */
23 #define DEFAULT_IRQ_PRIORITY    (1UL << (__NVIC_PRIO_BITS - 2))
24 
25 #define TFM_TIMER0_IRQ           (TIMER0_IRQn)
26 #define TFM_DMA0_COMBINED_S_IRQ  (DMA_Combined_S_IRQn)
27 
28 extern struct platform_data_t tfm_peripheral_std_uart;
29 extern struct platform_data_t tfm_peripheral_timer0;
30 extern struct platform_data_t tfm_peripheral_dma0_ch0;
31 
32 #define TFM_PERIPHERAL_STD_UART  (&tfm_peripheral_std_uart)
33 #define TFM_PERIPHERAL_TIMER0    (&tfm_peripheral_timer0)
34 #define TFM_PERIPHERAL_DMA0_CH0  (&tfm_peripheral_dma0_ch0)
35 
36 #ifdef __cplusplus
37 }
38 #endif
39 
40 #endif /* __TFM_PERIPHERALS_DEF_H__ */
41