1 /*
2  * Copyright (c) 2024 Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 /**
8  * @file hal_interrupt.h
9  *
10  * @brief Header containing interrupt handler specific declarations for the
11  * HAL Layer of the Wi-Fi driver.
12  */
13 
14 #ifndef __HAL_INTERRUPT_H__
15 #define __HAL_INTERRUPT_H__
16 
17 #include "hal_api_common.h"
18 
19 /**
20  * @brief Enable interrupts from the RPU.
21  *
22  * @param hal_dev_ctx Pointer to HAL context.
23  *
24  * @return Status
25  *         - Pass: NRF_WIFI_STATUS_SUCCESS
26  *         - Error: NRF_WIFI_STATUS_FAIL
27  */
28 enum nrf_wifi_status hal_rpu_irq_enable(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx);
29 
30 
31 /**
32  * @brief Disable interrupts from the RPU.
33  *
34  * @param hal_dev_ctx Pointer to HAL context.
35  *
36  * @return Status
37  *         - Pass: NRF_WIFI_STATUS_SUCCESS
38  *         - Error: NRF_WIFI_STATUS_FAIL
39  */
40 enum nrf_wifi_status hal_rpu_irq_disable(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx);
41 
42 
43 /**
44  * @brief Process an interrupt from the RPU.
45  *
46  * @param hal_dev_ctx Pointer to HAL context.
47  * @param do_rpu_recovery Pointer to a boolean variable that indicates if the RPU recovery
48  *                       is required.
49  *
50  * @return Status
51  *         - Pass: NRF_WIFI_STATUS_SUCCESS
52  *         - Error: NRF_WIFI_STATUS_FAIL
53  */
54 enum nrf_wifi_status hal_rpu_irq_process(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx,
55     bool *do_rpu_recovery);
56 #endif /* __HAL_INTERRUPT_H__ */
57