• 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 LL_SCAN_EXT_H_
19 #define LL_SCAN_EXT_H_
20 
21 #include "stack/ble/hci/hci_cmd.h"
22 
23 /**
24  * @brief      for user to initialize extended scanning module
25  * 			   notice that only one module can be selected between legacy scanning module and extended scanning module
26  * @param	   none
27  * @return     none
28  */
29 void blc_ll_initExtendedScanning_module(void);
30 
31 /**
32  * @brief      This function is used to set the extended scan parameters to be used on the advertising physical channels
33  *			   Attention:
34                when scan_phys is SCAN_PHY_1M, 	scanType_1 & scanInter_1 & scanWindow_1 are invalid parameters,
35  *			   when scan_phys is SCAN_PHY_CODED, scanType_0 & scanInter_0 & scanWindow_0 are invalid parameters,
36  * @param[in]  ownAddrType - Own_Address_Type
37  * @param[in]  scan_fp - Scanning_Filter_Policy
38  * @param[in]  scan_phys - Scanning_PHYs, "SCAN_PHY_1M" or "SCAN_PHY_CODED"
39  *
40  * 			   Attention:
41  * 			   scanType_0/scanInter_0/scanWindow_0 are only for 1M    PHY.
42  *             If 1M PHY is not supported, these parameters are ignored.
43  * 			   scanType_1/scanInter_1/scanWindow_1 are only for Coded PHY.
44  *             If Coded PHY is not supported, these parameters are ignored.
45  *
46  * @param[in]  scanType_0 - Scan_Type for 1M PHY, Passive Scanning or Active Scanning.
47  * @param[in]  scanInter_0 - Scan_Interval for 1M PHY, Time interval from when the Controller started its last scan
48  *                           until it begins the subsequent scan on the primary advertising physical channel.
49  * @param[in]  scanWindow_0 - Duration of the scan on the primary advertising physical channel for 1M PHY
50  *
51  * @param[in]  scanType_1 - Scan_Type for Coded PHY, Passive Scanning or Active Scanning.
52  * @param[in]  scanInter_1 - Scan_Interval for Coded PHY, Time interval from when the Controller started its last scan
53  *                           until it begins the subsequent scan on the primary advertising physical channel.
54  * @param[in]  scanWindow_1 - Duration of the scan on the primary advertising physical channel  for Coded PHY
55  *
56  * @return     Status - 0x00: command succeeded; 0x01-0xFF: command failed
57  */
58 ble_sts_t blc_ll_setExtScanParam(own_addr_type_t ownAddrType, scan_fp_type_t scan_fp, scan_phy_t scan_phys,
59                                  scan_type_t scanType_0, scan_inter_t scanInter_0, scan_wind_t scanWindow_0,
60                                  scan_type_t scanType_1, scan_inter_t scanInter_1, scan_wind_t scanWindow_1);
61 
62 /**
63  * @brief	   This function is used to enable or disable scanning.
64  * @param[in]  extScan_en - 0x00: Scanning disabled; 0x01: Scanning enabled
65  * @param[in]  filter_duplicate - Filter_Duplicates
66  * @param[in]  duration - Scan duration
67  * @param[in]  period - Time interval from when the Controller started its last Scan_Duration until it begins the
68  * 			   			subsequent Scan_Duration.
69  * @return     Status - 0x00: command succeeded; 0x01-0xFF: command failed
70  */
71 ble_sts_t blc_ll_setExtScanEnable(scan_en_t extScan_en, dupe_fltr_en_t filter_duplicate, scan_durn_t duration,
72                                   scan_period_t period);
73 
74 #endif /* LL_SCAN_EXT_H_ */
75