1 /******************************************************************************* 2 **+--------------------------------------------------------------------------+** 3 **| |** 4 **| Copyright 1998-2008 Texas Instruments, Inc. - http://www.ti.com/ |** 5 **| |** 6 **| Licensed under the Apache License, Version 2.0 (the "License"); |** 7 **| you may not use this file except in compliance with the License. |** 8 **| You may obtain a copy of the License at |** 9 **| |** 10 **| http://www.apache.org/licenses/LICENSE-2.0 |** 11 **| |** 12 **| Unless required by applicable law or agreed to in writing, software |** 13 **| distributed under the License is distributed on an "AS IS" BASIS, |** 14 **| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |** 15 **| See the License for the specific language governing permissions and |** 16 **| limitations under the License. |** 17 **| |** 18 **+--------------------------------------------------------------------------+** 19 *******************************************************************************/ 20 21 /*--------------------------------------------------------------------------*/ 22 /* Module: TI_AdapterSG.h*/ 23 /**/ 24 /* Purpose: This API enables / disables the Bluetooth coexistence support, */ 25 /* sets the parameters of the Bluetooth coexistence feature and */ 26 /* retrieve its status. These functions are usually unavailable, */ 27 /* unless the WiLink 4.0 WLAN driver is specifically compiled to */ 28 /* support Bluetooth coexistence.*/ 29 /**/ 30 /*--------------------------------------------------------------------------*/ 31 32 #ifndef TI_ADAPTER_SG_H 33 #define TI_ADAPTER_SG_H 34 35 #ifdef __cplusplus 36 extern "C" { 37 #endif 38 39 #include "softGeminiTypes.h" 40 41 42 /****************************************************************************** 43 44 Name: TI_SetBtCoeEnable 45 Desc: This function enables and disables the Bluetooth coexistence feature 46 Params: hAdapter - The Adapter handle returned by TI_AdapterInit(). 47 ModeEnable - One of the following values: 48 SG_ENABLE(0) �WLAN enabled 49 SG_DISABLE(1) � WLAN disabled 50 SG_SENSE_NO_ACTIVITY(2) �WLAN disabled, waiting for a BTH 51 sense interrupt 52 SG_SENSE_ACTIVE(3) - WLAN enabled, waiting for a BTH sense 53 interrupt. 54 Return: TI_RESULT_OK on success. Any other value indicates an error. 55 56 ******************************************************************************/ 57 tiINT32 TI_SetBtCoeEnable (TI_HANDLE hAdapter, 58 tiUINT32 ModeEnable ); 59 60 /****************************************************************************** 61 62 Name: TI_SetBtCoeRate 63 Desc: This function sets the rate to be used when Bluetooth coexistence 64 feature is enabled. 65 Params: hAdapter - The Adapter handle returned by TI_AdapterInit(). 66 pRate - One of the following values: 67 0 � 11 Mbps 68 1 � 5.5 and 11 Mbps 69 2 � 5.5, 11 and 22 Mbps 70 3 � 11 and 22 Mbps. 71 Return: TI_RESULT_OK on success. Any other value indicates an error. 72 73 ******************************************************************************/ 74 tiINT32 TI_SetBtCoeRate (TI_HANDLE hAdapter, 75 tiUINT8 *pRate ); 76 77 /****************************************************************************** 78 79 Name: TI_SetBtCoeConfig 80 Desc: This function configures Bluetooth coexistence parameters. 81 Params: hAdapter - The Adapter handle returned by TI_AdapterInit(). 82 pConfig - Pointer that holds the bluetooth coexistence paramaters, 83 in the following order (each parameter is 32 bits long): 84 - the length inmsec of the BT period in the TDM 85 - the length in msec of the WLAN period in the TDM 86 - the length in msec of the BT period in the TDM in AFH mode 87 - the length in msec of the BOTH period in the TDM in AFH mode 88 - min time in msec between last BT activity & defining BT as 89 inactive 90 - min time in msec between last WLAN activity & defining WLAN 91 as inactive 92 - min time in msec between last WLAN activity & defining WLAN as 93 in RxGuard mode 94 - the maximum length of time the BT HP will be respected 95 - the maximum length of time the WLAN HP will be respected 96 - the length of time when working in SENSE mode that the BT needs 97 to be inactive in order to DISABLE the SG 98 - the length in msec of Bt time between every WLAN RxGuard. 99 - the length in msec left for Wlan in RxGuard state 100 - WLAN HW generated mode during BT period 101 - specifies whether to use the AFH information from the BT 102 Return: TI_RESULT_OK on success. Any other value indicates an error. 103 104 ******************************************************************************/ 105 tiINT32 TI_SetBtCoeConfig (TI_HANDLE hAdapter, 106 tiUINT32 *pConfig ); 107 108 /****************************************************************************** 109 110 Name: TI_SetBtCoeGetStatus 111 Desc: This function retrieves Bluetooth coexistence feature parameters. 112 Params: hAdapter - The Adapter handle returned by TI_AdapterInit(). 113 pStatus - Pointer that holds the Bluetooth coexistence feature 114 status. 16 4-byte words should be allocated. 115 The 1st word will hold the enable status (set by TI_SetBtCoeEnable). 116 The 2nd word will hold the rate (set by TI_SetBtCoeRate). 117 Words 3 to 15 will hold all the parameters set by TI_SetBtCoeConfig. 118 Return: TI_RESULT_OK on success. Any other value indicates an error. 119 120 ******************************************************************************/ 121 tiINT32 TI_SetBtCoeGetStatus (TI_HANDLE hAdapter, 122 tiUINT32 *pStatus ); 123 #ifdef __cplusplus 124 } 125 #endif 126 127 #endif /* TI_ADAPTER_SG_H*/ 128