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 25 /** 26 * @brief for user to initialize legacy initiating module 27 * notice that only one module can be selected between legacy initiating module and extended initiating module 28 * @param none 29 * @return none 30 */ 31 void blc_ll_initLegacyInitiating_module(void); 32 33 #define blc_ll_initInitiating_module blc_ll_initLegacyInitiating_module 34 35 /** 36 * @brief This function is used to create an ACL connection to a connectable advertiser. 37 * @param[in] scan_interval - recommendations from the Host on how frequently (LE_Scan_Interval) 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 with the expected minimum length of the connection events. 48 * @param[in] ce_max - informative parameters providing the Controller with the expected maximum length of the connection events. 49 * @return Status - 0x00: command succeeded; 0x01-0xFF: command failed 50 */ 51 ble_sts_t blc_ll_createConnection( scan_inter_t scanInter, scan_wind_t scanWindow, init_fp_t fp, u8 peerAdrType, u8 *peerAddr, own_addr_type_t ownAdrType, 52 conn_inter_t conn_min, conn_inter_t conn_max, u16 conn_latency, conn_tm_t timeout, u16 ce_min, u16 ce_max ); 53 54 55 56 57 58 59 60 61 62 #endif /* LLMS_INIT_H_ */ 63