1 /*
2  * Copyright (c) 2020-2021, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 #ifndef __TFM_HAL_INTERRUPT_H__
9 #define __TFM_HAL_INTERRUPT_H__
10 
11 #include <stdint.h>
12 #include "tfm_hal_defs.h"
13 
14 /**
15  * \brief  Enables an interrupt from the Interrupt Controller of the platform
16  *
17  * \param[in]   irq_num   the interrupt to be enabled with a number
18  *
19  * \return  TFM_HAL_ERROR_INVALID_INPUT - the irq_num is not invalid.
20  *          TFM_HAL_ERROR_GENERIC - failed to enable the interrupt.
21  *          TFM_HAL_SUCCESS - the interrupt is enabled.
22  */
23 enum tfm_hal_status_t tfm_hal_irq_enable(uint32_t irq_num);
24 
25 /**
26  * \brief  Disables an interrupt from the Interrupt Controller of the platform
27  *
28  * \param[in]   irq_num   the interrupt to be disabled with a number
29  *
30  * \return  TFM_HAL_ERROR_INVALID_INPUT - the irq_num is not invalid.
31  *          TFM_HAL_ERROR_GENERIC - failed to disable the interrupt.
32  *          TFM_HAL_SUCCESS - the interrupt is disable.
33  */
34 enum tfm_hal_status_t tfm_hal_irq_disable(uint32_t irq_num);
35 
36 /**
37  * \brief  Clears an active and pending interrupt.
38  *
39  * \param[in] irq_num   the interrupt to be cleared with a number
40  *
41  * \return  TFM_HAL_ERROR_INVALID_INPUT - the irq_num is not invalid.
42  *          TFM_HAL_ERROR_GENERIC - failed to clear the pending interrupt.
43  *          TFM_HAL_SUCCESS - the pending interrupt is cleared.
44  */
45 enum tfm_hal_status_t tfm_hal_irq_clear_pending(uint32_t irq_num);
46 
47 #endif /* __TFM_HAL_INTERRUPT_H__ */
48