1 /******************************************************************************
2  * Copyright (c) 2022 Telink Semiconductor (Shanghai) Co., Ltd. ("TELINK")
3  * All rights reserved.
4  *
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 #ifndef EXT_INIT_H_
19 #define EXT_INIT_H_
20 
21 
22 
23 /**
24  * @brief      for user to initialize extended initiating module
25  * 			   notice that only one module can be selected between legacy initiating module and extended initiating module
26  * @param	   none
27  * @return     none
28  */
29 void 		blc_ll_initExtendedInitiating_module(void);
30 
31 
32 
33 /**
34  * @brief      This function is used to create an ACL connection to a connectable advertiser.
35  *
36  * @param[in]  filter_policy - used to determine whether the WhiteList is used. If the White List is not used, the Peer_Address_Type and the
37 							   Peer_Address parameters specify the address type and address of the advertising device to connect to.
38  * @param[in]  ownAdr_type - indicates the type of address being used in the connection request packets.
39  * @param[in]  peerAdrType - indicates the type of address used in the connectable advertisement sent by the peer.
40  * @param[in]  *peerAddr - indicates the Peer's Public Device Address, Random (static) Device Address, Non-Resolvable Private Address, or
41 							Resolvable Private Address depending on the Peer_Address_Type parameter.
42  * @param[in]  init_phys - indicates the PHY(s) on which the advertising packets should be received on the primary advertising physical channel and
43 							the PHYs for which connection parameters have been specified.
44  *
45  * 			   Attention:
46  * 			   scanInter_0/scanWindow_0/conn_min_0/conn_max_0/timeout_0 are only for 	1M PHY.  If    1M PHY is not supported, these parameters are ignored.
47  * 			   scanInter_1/scanWindow_1/conn_min_1/conn_max_1/timeout_1 are only for 	2M PHY.  If    2M PHY is not supported, these parameters are ignored.
48  * 			   scanInter_2/scanWindow_2/conn_min_2/conn_max_2/timeout_2 are only for Coded PHY.  If Coded PHY is not supported, these parameters are ignored.
49  *
50  * @param[in]  scanInter_0 - for 1M PHY: recommendations from the Host on how frequently (LE_Scan_Interval) the Controller should scan.
51  * @param[in]  scanWindow_0 - for 1M PHY: recommendations from the Host on how long (LE_Scan_Window) the Controller should scan.
52  * @param[in]  conn_min_0 - for 1M PHY: the minimum allowed connection interval.
53  * @param[in]  conn_max_0 - for 1M PHY: the maximum allowed connection interval.
54  * @param[in]  timeout_0 - for 1M PHY: Supervision timeout for the LE Link.
55  * @param[in]  scanInter_1 - for 2M PHY: recommendations from the Host on how frequently (LE_Scan_Interval) the Controller should scan.
56  * @param[in]  scanWindow_1 - for 2M PHY: recommendations from the Host on how long (LE_Scan_Window) the Controller should scan.
57  * @param[in]  conn_min_1 - for 2M PHY: the minimum allowed connection interval.
58  * @param[in]  conn_max_1 - for 2M PHY: the maximum allowed connection interval.
59  * @param[in]  timeout_1 - for 2M PHY: Supervision timeout for the LE Link.
60  * @param[in]  scanInter_2 - for Coded PHY: recommendations from the Host on how frequently (LE_Scan_Interval) the Controller should scan.
61  * @param[in]  scanWindow_2 - for Coded PHY: recommendations from the Host on how long (LE_Scan_Window) the Controller should scan.
62  * @param[in]  conn_min_2 - for Coded PHY: the minimum allowed connection interval.
63  * @param[in]  conn_max_2 - for Coded PHY: the maximum allowed connection interval.
64  * @param[in]  timeout_2 - for Coded PHY: Supervision timeout for the LE Link.
65  * @return     Status - 0x00: command succeeded; 0x01-0xFF: command failed
66  */
67 ble_sts_t 	blc_ll_extended_createConnection ( init_fp_t  filter_policy,  own_addr_type_t  ownAdrType, 			u8	peerAdrType,            u8 *peerAddr, init_phy_t init_phys,
68 											   scan_inter_t scanInter_0,  	 scan_wind_t scanWindow_0, 	conn_inter_t conn_min_0, conn_inter_t conn_max_0, conn_tm_t timeout_0,
69 											   scan_inter_t scanInter_1,     scan_wind_t scanWindow_1, 	conn_inter_t conn_min_1, conn_inter_t conn_max_1, conn_tm_t timeout_1,
70 											   scan_inter_t scanInter_2,     scan_wind_t scanWindow_2, 	conn_inter_t conn_min_2, conn_inter_t conn_max_2, conn_tm_t timeout_2 );
71 
72 
73 
74 
75 
76 
77 #endif /* EXT_INIT_H_ */
78