11bd4fe43Sopenharmony_ci/** 21bd4fe43Sopenharmony_ci * @file hi_btcoex_api.h 31bd4fe43Sopenharmony_ci * 41bd4fe43Sopenharmony_ci * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED. 51bd4fe43Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 61bd4fe43Sopenharmony_ci * you may not use this file except in compliance with the License. 71bd4fe43Sopenharmony_ci * You may obtain a copy of the License at 81bd4fe43Sopenharmony_ci * 91bd4fe43Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 101bd4fe43Sopenharmony_ci * 111bd4fe43Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 121bd4fe43Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 131bd4fe43Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 141bd4fe43Sopenharmony_ci * See the License for the specific language governing permissions and 151bd4fe43Sopenharmony_ci * limitations under the License. 161bd4fe43Sopenharmony_ci */ 171bd4fe43Sopenharmony_ci 181bd4fe43Sopenharmony_ci/** 191bd4fe43Sopenharmony_ci* @defgroup hi_wifi_btcoex BTCOEX 201bd4fe43Sopenharmony_ci* @ingroup hi_wifi 211bd4fe43Sopenharmony_ci*/ 221bd4fe43Sopenharmony_ci 231bd4fe43Sopenharmony_ci#ifndef __HI_BTCOEX_API_H__ 241bd4fe43Sopenharmony_ci#define __HI_BTCOEX_API_H__ 251bd4fe43Sopenharmony_ci 261bd4fe43Sopenharmony_ci#ifdef __cplusplus 271bd4fe43Sopenharmony_ci#if __cplusplus 281bd4fe43Sopenharmony_ciextern "C" { 291bd4fe43Sopenharmony_ci#endif 301bd4fe43Sopenharmony_ci#endif 311bd4fe43Sopenharmony_ci 321bd4fe43Sopenharmony_ci/** 331bd4fe43Sopenharmony_ci* @ingroup hi_wifi_btcoex 341bd4fe43Sopenharmony_ci* @brief Set wifi & bt coexist on/off. 351bd4fe43Sopenharmony_ci* CNcomment:蓝牙共存打开/关闭。CNend 361bd4fe43Sopenharmony_ci* 371bd4fe43Sopenharmony_ci* @par Description: 381bd4fe43Sopenharmony_ci* Set wifi & bt coexist on while wifi and bt are both turned on. 391bd4fe43Sopenharmony_ci* or set wifi & bt coexist off while bt is turned off. 401bd4fe43Sopenharmony_ci* CNcomment:wifi & bt 都打开时打开coexist共存,bt 关闭时关掉coexist共存。CNend 411bd4fe43Sopenharmony_ci* 421bd4fe43Sopenharmony_ci* @param ifname [IN] Type #const char *, device name, e.g. wlan0.CNcomment:设备名称,如 wlan0。CNend 431bd4fe43Sopenharmony_ci* @param enable [IN] Type #enable, whether turn wifi & bt coexist on or off, 0:off, 1:on. 441bd4fe43Sopenharmony_ci* CNcomment:是否打开蓝牙wifi共存,0:关闭, 1:打开。CNend 451bd4fe43Sopenharmony_ci* @param mode [IN] Type #mode, wifi & bt coexist mode, 1:2-wired, 2:3-wired. 461bd4fe43Sopenharmony_ci* CNcomment:蓝牙wifi共存模式,1:二线, 2:三线。CNend 471bd4fe43Sopenharmony_ci* @param share_ant [IN] Type #share_ant, whether wifi & bt share ant, 0:no share ant, 1:share ant. 481bd4fe43Sopenharmony_ci* CNcomment:蓝牙wifi是否共用天线,0:不共用,1:共用。CNend 491bd4fe43Sopenharmony_ci* @param preempt [IN] Type #preempt, whether send wifi & bt preempt frame (NULL data), 0:no send, 1:send. 501bd4fe43Sopenharmony_ci* CNcomment:是否发送共存preemp帧(NULL data),0:不发送,1:发送。CNend 511bd4fe43Sopenharmony_ci* 521bd4fe43Sopenharmony_ci* @attention 531bd4fe43Sopenharmony_ci* It will occupy some space time for sending preempt frame (NULL data), the performance of not sending preempt frame 541bd4fe43Sopenharmony_ci* is better than sending in lab test, while sending preempt frame could tell the peer sta that the bt is working 551bd4fe43Sopenharmony_ci* at this moment.CNcomment:发送共存preemp帧(NULL data),会占用一定空口资源,实测不发送preemp帧 561bd4fe43Sopenharmony_ci* 性能比发送preemp帧性能更高,发送preemp帧可以明确告知对端AP当前wifi的工作状态。CNend 571bd4fe43Sopenharmony_ci* 581bd4fe43Sopenharmony_ci* @retval #HISI_OK Excute successfully 591bd4fe43Sopenharmony_ci* @retval #Other Error code 601bd4fe43Sopenharmony_ci* @par Dependency: 611bd4fe43Sopenharmony_ci* @li hi_btcoex_api.h: WiFi API 621bd4fe43Sopenharmony_ci* @see NULL 631bd4fe43Sopenharmony_ci*/ 641bd4fe43Sopenharmony_cihi_u32 hi_wifi_btcoex_enable(const hi_char *ifname, hi_bool enable, hi_u8 mode, hi_u8 share_ant, hi_u8 preempt); 651bd4fe43Sopenharmony_ci 661bd4fe43Sopenharmony_ci#ifdef __cplusplus 671bd4fe43Sopenharmony_ci#if __cplusplus 681bd4fe43Sopenharmony_ci } 691bd4fe43Sopenharmony_ci#endif 701bd4fe43Sopenharmony_ci#endif 711bd4fe43Sopenharmony_ci 721bd4fe43Sopenharmony_ci#endif /* end of hi_btcoex_api.h */ 73