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