• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * @file hi_btcoex_api.h
3  *
4  * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 /**
19 * @defgroup hi_wifi_btcoex BTCOEX
20 * @ingroup hi_wifi
21 */
22 
23 #ifndef __HI_BTCOEX_API_H__
24 #define __HI_BTCOEX_API_H__
25 
26 #ifdef __cplusplus
27 #if __cplusplus
28 extern "C" {
29 #endif
30 #endif
31 
32 /**
33 * @ingroup  hi_wifi_btcoex
34 * @brief    Set wifi & bt coexist on/off.
35 *           CNcomment:蓝牙共存打开/关闭。CNend
36 *
37 * @par Description:
38 *           Set wifi & bt coexist on while wifi and bt are both turned on.
39 *           or set wifi & bt coexist off while bt is turned off.
40 *           CNcomment:wifi & bt 都打开时打开coexist共存,bt 关闭时关掉coexist共存。CNend
41 *
42 * @param  ifname          [IN]     Type  #const char *, device name, e.g. wlan0.CNcomment:设备名称,如 wlan0。CNend
43 * @param  enable          [IN]     Type  #enable, whether turn wifi & bt coexist on or off, 0:off, 1:on.
44 *                                        CNcomment:是否打开蓝牙wifi共存,0:关闭, 1:打开。CNend
45 * @param  mode            [IN]     Type  #mode,  wifi & bt coexist mode, 1:2-wired, 2:3-wired.
46 *                                        CNcomment:蓝牙wifi共存模式,1:二线, 2:三线。CNend
47 * @param  share_ant       [IN]     Type  #share_ant, whether wifi & bt share ant, 0:no share ant, 1:share ant.
48 *                                        CNcomment:蓝牙wifi是否共用天线,0:不共用,1:共用。CNend
49 * @param  preempt         [IN]     Type  #preempt, whether send wifi & bt preempt frame (NULL data), 0:no send, 1:send.
50 *                                        CNcomment:是否发送共存preemp帧(NULL data),0:不发送,1:发送。CNend
51 *
52 * @attention
53 *    It will occupy some space time for sending preempt frame (NULL data), the performance of not sending preempt frame
54 *    is better than sending in lab test, while sending preempt frame could tell the peer sta that the bt is working
55 *    at this moment.CNcomment:发送共存preemp帧(NULL data),会占用一定空口资源,实测不发送preemp帧
56 *    性能比发送preemp帧性能更高,发送preemp帧可以明确告知对端AP当前wifi的工作状态。CNend
57 *
58 * @retval #HISI_OK         Excute successfully
59 * @retval #Other           Error code
60 * @par Dependency:
61 *            @li hi_btcoex_api.h: WiFi API
62 * @see  NULL
63 */
64 hi_u32 hi_wifi_btcoex_enable(const hi_char *ifname, hi_bool enable, hi_u8 mode, hi_u8 share_ant, hi_u8 preempt);
65 
66 #ifdef __cplusplus
67 #if __cplusplus
68     }
69 #endif
70 #endif
71 
72 #endif /* end of hi_btcoex_api.h */
73