1 /* 2 * Copyright (c) 2024 Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 /** 8 * @brief Header containing Coexistence APIs. 9 */ 10 11 #ifndef __COEX_H__ 12 #define __COEX_H__ 13 14 #include <stdbool.h> 15 16 /* Indicates WLAN frequency band of operation */ 17 enum nrf_wifi_pta_wlan_op_band { 18 NRF_WIFI_PTA_WLAN_OP_BAND_2_4_GHZ = 0, 19 NRF_WIFI_PTA_WLAN_OP_BAND_5_GHZ, 20 NRF_WIFI_PTA_WLAN_OP_BAND_NONE = 0xFF 21 }; 22 23 /** 24 * @function nrf_wifi_coex_config_pta(enum nrf_wifi_pta_wlan_op_band wlan_band, 25 * bool separate_antennas, bool is_sr_protocol_ble) 26 * 27 * @brief Function used to configure PTA tables of coexistence hardware. 28 * 29 * @param[in] enum nrf_wifi_pta_wlan_op_band wlan_band 30 * @param[in] separate_antennas 31 * Indicates whether separate antenans are used or not. 32 * @param[in] is_sr_protocol_ble 33 * Indicates if SR protocol is Bluetooth LE or not. 34 * @return Returns status of configuration. 35 * Returns zero upon successful configuration. 36 * Returns non-zero upon unsuccessful configuration. 37 */ 38 int nrf_wifi_coex_config_pta(enum nrf_wifi_pta_wlan_op_band wlan_band, bool separate_antennas, 39 bool is_sr_protocol_ble); 40 41 #if defined(CONFIG_NRF70_SR_COEX_RF_SWITCH) || defined(__DOXYGEN__) 42 /** 43 * @function nrf_wifi_config_sr_switch(bool separate_antennas) 44 * 45 * @brief Function used to configure SR side switch (nRF5340 side switch in nRF7002 DK). 46 * 47 * @param[in] separate_antennas 48 * Indicates whether separate antenans are used or not. 49 * 50 * @return Returns status of configuration. 51 * Returns zero upon successful configuration. 52 * Returns non-zero upon unsuccessful configuration. 53 */ 54 int nrf_wifi_config_sr_switch(bool separate_antennas); 55 #endif /* CONFIG_NRF70_SR_COEX_RF_SWITCH */ 56 57 /** 58 * @function nrf_wifi_coex_config_non_pta(bool separate_antennas) 59 * 60 * @brief Function used to configure non-PTA registers of coexistence hardware. 61 * 62 * @param[in] separate_antennas 63 * Indicates whether separate antenans are used or not. 64 * @param[in] is_sr_protocol_ble 65 * Indicates if SR protocol is Bluetooth LE or not. 66 * 67 * @return Returns status of configuration. 68 * Returns zero upon successful configuration. 69 * Returns non-zero upon unsuccessful configuration. 70 */ 71 int nrf_wifi_coex_config_non_pta(bool separate_antennas, bool is_sr_protocol_ble); 72 73 /** 74 * @function nrf_wifi_coex_hw_reset(void) 75 * 76 * @brief Function used to reset coexistence hardware. 77 * 78 * @return Returns status of configuration. 79 * Returns zero upon successful configuration. 80 * Returns non-zero upon unsuccessful configuration. 81 */ 82 int nrf_wifi_coex_hw_reset(void); 83 84 #endif /* __COEX_H__ */ 85