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 LLMS_INIT_H_ 19 #define LLMS_INIT_H_ 20 21 #include "stack/ble/hci/hci_cmd.h" 22 23 /** 24 * @brief for user to initialize legacy initiating module 25 * notice that only one module can be selected between legacy initiating module 26 * and extended initiating module 27 * @param none 28 * @return none 29 */ 30 void blc_ll_initLegacyInitiating_module(void); 31 32 #define blc_ll_initInitiating_module blc_ll_initLegacyInitiating_module 33 34 /** 35 * @brief This function is used to create an ACL connection to a connectable advertiser. 36 * @param[in] scan_interval - recommendations from the Host on how frequently (LE_Scan_Interval) 37 * the Controller should scan. 38 * @param[in] scan_window - recommendations from the Host on how long (LE_Scan_Window) the Controller should scan. 39 * @param[in] filter_policy - used to determine whether the White List is used. 40 * @param[in] adr_type - indicates the type of address used in the connectable advertisement sent by the peer. 41 * @param[in] *mac - indicates the Peer's Public Device Address. 42 * @param[in] own_adr_type - indicates the type of address being used in the connection request packets. 43 * @param[in] conn_min - the minimum allowed connection interval. 44 * @param[in] conn_max - the maximum allowed connection interval. 45 * @param[in] conn_latency - he maximum allowed connection latency 46 * @param[in] timeout - defines the link supervision timeout for the connection. 47 * @param[in] ce_min - informative parameters providing the Controller 48 * with the expected minimum length of the connection events. 49 * @param[in] ce_max - informative parameters providing the Controller 50 * with the expected maximum length of the connection events. 51 * @return Status - 0x00: command succeeded; 0x01-0xFF: command failed 52 */ 53 ble_sts_t blc_ll_createConnection(scan_inter_t scanInter, scan_wind_t scanWindow, init_fp_t fp, u8 peerAdrType, 54 u8 *peerAddr, own_addr_type_t ownAdrType, conn_inter_t conn_min, 55 conn_inter_t conn_max, u16 conn_latency, conn_tm_t timeout, u16 ce_min, u16 ce_max); 56 57 #endif /* LLMS_INIT_H_ */ 58