TI BLE5-Stack API Documentation  9.14.00
hci_cs.h
Go to the documentation of this file.
1 /******************************************************************************
2 
3  @file hci_cs.h
4 
5  @brief This file defines the HCI API functions for Channel Sounding.
6 
7  Group: WCS, BTS
8  $Target Device: DEVICES $
9 
10  ******************************************************************************
11  $License: TI_TEXT 2023 $
12  ******************************************************************************
13  $Release Name: PACKAGE NAME $
14  $Release Date: PACKAGE RELEASE DATE $
15  *****************************************************************************/
16 #ifndef HCI_CS_H
17 #define HCI_CS_H
18 /*******************************************************************************
19  * INCLUDES
20  */
22 #include "ti/ble/controller/ll/ll_cs_common.h"
23 
24 /*******************************************************************************
25  * @fn HCI_LE_CS_ReadLocalSupportedCapabilities
26  *
27  * @brief Read the local Controller's supported CS capabilities.
28  *
29  * @return @ref HCI_SUCCESS
30  */
32 
33 /*******************************************************************************
34  * @fn HCI_LE_CS_ReadRemoteSupportedCapabilities
35  *
36  * @brief Read the remote Controller's supported CS capabilities.
37  *
38  * @param connHandle - Connection handle.
39  *
40  * @return @ref HCI_SUCCESS
41  */
42 uint8_t HCI_LE_CS_ReadRemoteSupportedCapabilities(uint16 connHandle);
43 
44 /*******************************************************************************
45  * @fn HCI_LE_CS_WriteCachedRemoteSupportedCapabilities
46  *
47  * @brief Write a cached CS capabilities supported by the remote Controller.
48  *
49  * @param connHandle - Connection handle.
50  * @param pRemoteCapabilitiesRaw - Pointer to remote capabilities in HCI raw
51  * format to be set
52  *
53  * @return @ref HCI_SUCCESS
54  * @ref HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS if pRemoteCapabilitiesRaw is NULL
55  */
56 hciStatus_t HCI_LE_CS_WriteCachedRemoteSupportedCapabilities(uint16 connHandle, uint8_t *pRemoteCapabilitiesRaw);
57 
58 /*******************************************************************************
59  * @fn HCI_LE_CS_SecurityEnable
60  *
61  * @brief Enable CS security for the specified connection.
62  *
63  * @param connHandle - Connection handle.
64  *
65  * @return @ref HCI_SUCCESS
66  */
67 uint8_t HCI_LE_CS_SecurityEnable(uint16 connHandle);
68 
69 /*******************************************************************************
70  * @fn HCI_LE_CS_SetDefaultSettings
71  *
72  * @brief Set default CS settings in the local Controller.
73  *
74  * @param connHandle - Connection handle.
75  * @param roleEnable - Role enable settings.
76  * @param csSyncAntennaSelection - CS sync antenna selection.
77  * @param maxTxPower - Maximum transmit power.
78  *
79  * @return @ref HCI_SUCCESS
80  */
81 uint8_t HCI_LE_CS_SetDefaultSettings(uint16 connHandle,
82  uint8 roleEnable,
83  uint8 csSyncAntennaSelection,
84  int8 maxTxPower);
85 
86 /*******************************************************************************
87  * @fn HCI_LE_CS_ReadRemoteFAETable
88  *
89  * @brief Read the remote Controller's FAE table.
90  *
91  * @param connHandle - Connection handle.
92  *
93  * @return @ref HCI_SUCCESS
94  */
95 uint8_t HCI_LE_CS_ReadRemoteFAETable(uint16 connHandle);
96 
97 /*******************************************************************************
98  * @fn HCI_LE_CS_WriteCachedRemoteFAETable
99  *
100  * @brief Write the remote Controller's FAE table.
101  *
102  * @param connHandle - Connection handle.
103  * @param remoteFaeTable - Pointer to the remote device FAE table.
104  *
105  * @return @ref HCI_SUCCESS
106  */
107 uint8_t HCI_LE_CS_WriteCachedRemoteFAETable(uint16 connHandle,
108  void* remoteFaeTable);
109 
110 /*******************************************************************************
111  * @fn HCI_LE_CS_CreateConfig
112  *
113  * @brief Create a new CS configuration.
114  *
115  * @param connHandle - Connection handle.
116  * @param configID - Configuration ID.
117  * @param createContext - Create context flag.
118  * @param pBufConfig - Pointer to the configuration buffer.
119  *
120  * @return @ref HCI_SUCCESS
121  */
122 uint8_t HCI_LE_CS_CreateConfig(uint16 connHandle,
123  uint8 configID,
124  uint8 createContext,
125  csConfigBuffer_t* pBufConfig);
126 
127 /*******************************************************************************
128  * @fn HCI_LE_CS_RemoveConfig
129  *
130  * @brief Remove a CS configuration.
131  *
132  * @param connHandle - Connection handle.
133  * @param configID - Configuration ID.
134  *
135  * @return @ref HCI_SUCCESS
136  */
137 uint8_t HCI_LE_CS_RemoveConfig(uint16 connHandle,
138  uint8 configID);
139 
140 /*******************************************************************************
141  * @fn HCI_LE_CS_SetChannelClassification
142  *
143  * @brief Set the channel classification.
144  *
145  * @param channelClassification - Pointer to the channel classification.
146  *
147  * @return @ref HCI_SUCCESS
148  */
149 uint8_t HCI_LE_CS_SetChannelClassification(uint8* channelClassification);
150 
151 /*******************************************************************************
152  * @fn HCI_LE_CS_SetProcedureParameters
153  *
154  * @brief Set CS procedure parameters.
155  *
156  * @param connHandle - Connection handle.
157  * @param configID - Configuration ID.
158  * @param pParams - Pointer to the procedure parameters.
159  *
160  * @return @ref HCI_SUCCESS
161  */
162 uint8_t HCI_LE_CS_SetProcedureParameters(uint16 connHandle,
163  uint8 configID,
164  uint8* pParams);
165 
166 /*******************************************************************************
167  * @fn HCI_LE_CS_ProcedureEnable
168  *
169  * @brief Enable or disable the scheduling of CS procedures.
170  *
171  * @param connHandle - Connection handle.
172  * @param configID - Configuration ID.
173  * @param enable - Enable or disable flag.
174  *
175  * @return @ref HCI_SUCCESS
176  */
177 uint8_t HCI_LE_CS_ProcedureEnable(uint16 connHandle,
178  uint8 configID,
179  uint8 enable);
180 
181 /*******************************************************************************
182  * @fn HCI_LE_CS_Test
183  *
184  * @brief Start a CS test.
185  *
186  * @param pParams - Pointer to the test parameters.
187  *
188  * @return @ref HCI_SUCCESS
189  */
190 uint8_t HCI_LE_CS_Test(uint8* pParams);
191 
192 /*******************************************************************************
193  * @fn HCI_LE_CS_TestEnd
194  *
195  * @brief End a CS test.
196  *
197  * @return @ref HCI_SUCCESS
198  */
199 uint8_t HCI_LE_CS_TestEnd(void);
200 
201 /*******************************************************************************
202  * @fn HCI_CS_ReadRemoteSupportedCapabilitiesCback
203  *
204  * @brief Callback for reading the remote CS capabilities
205  *
206  * input parameters
207  *
208  * @param status - status
209  * @param connHandle - connection handle
210  * @param peerCapabilities- peerCapabilities
211  *
212  * output parameters
213  *
214  * @param None.
215  *
216  * @return None
217  */
218 extern void
219 HCI_CS_ReadRemoteSupportedCapabilitiesCback(uint8 status, uint16 connHandle,
220  const llCsCapabilities_t* peerCapabilities);
221 
222 /*******************************************************************************
223  * @fn HCI_CS_ConfigCompleteCback
224  *
225  * @brief Callback to send CS Config Complete event
226  *
227  * input parameters
228  *
229  * @param connHandle - connection handle
230  * @param configID - Configuration ID.
231  * @param status - status
232  *
233  * output parameters
234  *
235  * @param None.
236  *
237  * @return None
238  */
239 extern void HCI_CS_ConfigCompleteCback(uint16 connHandle, uint8 configId, uint8 status);
240 
241 /*******************************************************************************
242  * @fn HCI_CS_ReadRemoteFAETableCompleteCback
243  *
244  * @brief callback function that returns the result of reading the remote
245  * FAE table
246  *
247  * input parameters
248  *
249  * @param status
250  * @param connHandle connection handle
251  * @param faeTable pointer to remote FAE table
252  *
253  * output parameters
254  *
255  * @param None.
256  *
257  * @return None
258  */
259 extern void HCI_CS_ReadRemoteFAETableCompleteCback(uint8 status,
260  uint16 connHandle,
261  uint8* faeTable);
262 
263 /*******************************************************************************
264  * @fn HCI_CS_SecurityEnableCompleteCback
265  *
266  * @brief Security Enable complete callback function
267  *
268  * input parameters
269  *
270  * @param status - event status
271  * @param connHanlde - connection identifier
272  *
273  * output parameters
274  *
275  * @param None.
276  *
277  * @return None
278  */
279 extern void HCI_CS_SecurityEnableCompleteCback(uint8 status, uint16 connHandle);
280 
281 /*******************************************************************************
282  * @fn HCI_CS_ProcedureEnableCompleteCback
283  *
284  * @brief Procedure Enable Complete Event callback
285  *
286  * input parameters
287  *
288  * @param status - event status
289  * @param connHanlde - connection identifier
290  * @param enable - indicates enable or disable
291  * @param enableData - enable data
292  *
293  * output parameters
294  *
295  * @param None.
296  *
297  * @return None
298  */
299 extern void
300 HCI_CS_ProcedureEnableCompleteCback(uint8 status, uint16 connHandle,
301  uint8 enable,
302  csProcedureEnable_t* enableData);
303 
304 /*******************************************************************************
305  * @fn HCI_CS_SubeventResultsProcess
306  *
307  * @brief Subevent results callback
308  *
309  * input parameters
310  *
311  * @param pRes - pointer to results data
312  * @param dataLength - length of data
313  *
314  * output parameters
315  *
316  * @param None.
317  *
318  * @return None
319  */
320 void HCI_CS_SubeventResultsProcess(const RCL_CmdBleCs_SubeventResults *subeventRes, uint16_t dataLength);
321 
322 /*******************************************************************************
323  * @fn HCI_CS_SubeventContResultsProcess
324  *
325  * @brief Subevent cont results callback
326  *
327  * input parameters
328  *
329  * @param pRes - pointer to cont results data
330  * @param dataLength - length of data
331  *
332  * output parameters
333  *
334  * @param None.
335  *
336  * @return None
337  */
338 void HCI_CS_SubeventContResultsProcess(const RCL_CmdBleCs_SubeventResultsContinue *subeventRes, uint16_t dataLength);
339 
340 /*******************************************************************************
341  * @fn HCI_CS_TestEndCompleteCback
342  *
343  * @brief CS Test End Complete callback
344  *
345  * @design BLE_LOKI-506
346  *
347  * input parameters
348  *
349  * @param status - command status
350  *
351  * output parameters
352  *
353  * @param None.
354  *
355  * @return None.
356  */
357 void HCI_CS_TestEndCompleteCback(uint8 status);
358 #endif // HCI_CS_H
uint8_t HCI_LE_CS_ReadLocalSupportedCapabilities(void)
uint8_t HCI_LE_CS_SecurityEnable(uint16 connHandle)
void HCI_CS_SubeventResultsProcess(const RCL_CmdBleCs_SubeventResults *subeventRes, uint16_t dataLength)
void HCI_CS_SecurityEnableCompleteCback(uint8 status, uint16 connHandle)
void HCI_CS_ReadRemoteFAETableCompleteCback(uint8 status, uint16 connHandle, uint8 *faeTable)
uint8_t HCI_LE_CS_WriteCachedRemoteFAETable(uint16 connHandle, void *remoteFaeTable)
void HCI_CS_ProcedureEnableCompleteCback(uint8 status, uint16 connHandle, uint8 enable, csProcedureEnable_t *enableData)
void HCI_CS_SubeventContResultsProcess(const RCL_CmdBleCs_SubeventResultsContinue *subeventRes, uint16_t dataLength)
void HCI_CS_TestEndCompleteCback(uint8 status)
hciStatus_t HCI_LE_CS_WriteCachedRemoteSupportedCapabilities(uint16 connHandle, uint8_t *pRemoteCapabilitiesRaw)
uint8_t HCI_LE_CS_SetProcedureParameters(uint16 connHandle, uint8 configID, uint8 *pParams)
uint8_t HCI_LE_CS_Test(uint8 *pParams)
uint8_t HCI_LE_CS_ReadRemoteFAETable(uint16 connHandle)
uint8_t HCI_LE_CS_SetDefaultSettings(uint16 connHandle, uint8 roleEnable, uint8 csSyncAntennaSelection, int8 maxTxPower)
void HCI_CS_ReadRemoteSupportedCapabilitiesCback(uint8 status, uint16 connHandle, const llCsCapabilities_t *peerCapabilities)
Type definitions and macros for BLE stack.
uint8_t HCI_LE_CS_ReadRemoteSupportedCapabilities(uint16 connHandle)
uint8_t HCI_LE_CS_TestEnd(void)
void HCI_CS_ConfigCompleteCback(uint16 connHandle, uint8 configId, uint8 status)
uint8_t HCI_LE_CS_CreateConfig(uint16 connHandle, uint8 configID, uint8 createContext, csConfigBuffer_t *pBufConfig)
uint8_t HCI_LE_CS_SetChannelClassification(uint8 *channelClassification)
uint8_t HCI_LE_CS_ProcedureEnable(uint16 connHandle, uint8 configID, uint8 enable)
uint8_t HCI_LE_CS_RemoveConfig(uint16 connHandle, uint8 configID)
© Copyright 1995-2025, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale