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 BIS_SYNC_H_
19 #define BIS_SYNC_H_
20 
21 
22 #define 		BIG_SYNC_PARAM_LENGTH		(696) // Note: user can't modify this value,and this value must 4 byte aligned
23 
24 
25 
26 /**
27  * @brief      This function is used to initialize BIG Synchronize module.
28  * @param	   none
29  * @return     none
30  */
31 void 		blc_ll_initBisSynchronize_module(void);
32 
33 /**
34  * @brief      This function is used to initialize BIG Synchronize parameters.
35  * @param	   pointer to BIG Synchronize parameters buffer
36  * @return     Number of BIG SYNC supported
37  */
38 ble_sts_t	blc_ll_initBigSyncParameters(u8 *pBigSyncPara, u8 bigSyncNum);
39 
40 
41 /**
42  * @brief
43  * @param	   none
44  * @return     none
45  */
46 ble_sts_t 	blc_hci_le_bigCreateSync(hci_le_bigCreateSyncParams_t* pCmdParam);
47 
48 
49 /**
50  * @brief
51  * @param	   none
52  * @return     none
53  */
54 ble_sts_t 	blc_hci_le_bigTerminateSync(u8 bigHandle, u8* pRetParam);
55 
56 
57 /**
58  * @brief      Used to enable private LegScan to get BIGINFO for BIG SYNC
59  * @param	   none
60  * @return     none
61  */
62 void		blc_ll_enPrivLegScanForBigBync(void);
63 
64 
65 /**
66  * @brief      Used to enable scan to get BIGINFO for BIG SYNC
67  * @param	   none
68  * @return     none
69  */
70 void		blc_ll_enScanForBigBync(void);
71 
72 /**
73  * @brief
74  * @param	   none
75  * @return     none
76  */
77 ble_sts_t 	blc_ll_bigCreateSync(u8 big_handle, u16 sync_handle, u8 enc, u8 broadcast_code[16],
78 								 u8 mse, u16 big_sync_timeout, u8  num_bis, u8 *bis);
79 
80 /**
81  * @brief
82  * @param	   none
83  * @return     none
84  */
85 ble_sts_t 	blc_ll_bigTerminateSync(u8 bigHandle);
86 
87 
88 #endif /* BIS_SYNC_H_ */
89