TI BLE Stack API Documentation  2.03.03
hci.h
1 /******************************************************************************
2 
3  @file hci.h
4 
5  @brief This file contains the Host Controller Interface (HCI) API. It provides
6  the defines, types, and functions for all supported
7  Bluetooth Low Energy (BLE) commands.
8 
9  All Bluetooth and BLE commands are based on:
10  Bluetooth Core Specification, V4.0.0, Vol. 2, Part E.
11 
12  Group: WCS, BTS
13  $Target Device: DEVICES $
14 
15  ******************************************************************************
16  $License: TISD 2009 $
17  ******************************************************************************
18  $Release Name: PACKAGE NAME $
19  $Release Date: PACKAGE RELEASE DATE $
20  *****************************************************************************/
21 
22 #ifndef HCI_H
23 #define HCI_H
24 
25 #ifdef __cplusplus
26 extern "C"
27 {
28 #endif
29 
30 /*******************************************************************************
31  * INCLUDES
32  */
33 #include "bcomdef.h"
34 #include "osal.h"
35 #include "ll.h"
36 #include "hal_assert.h"
37 
38 /*******************************************************************************
39  * MACROS
40  */
41 
42 /*******************************************************************************
43  * CONSTANTS
44  */
45 
46 /*
47 ** HCI Status
48 **
49 ** Per the Bluetooth Core Specification, V4.0.0, Vol. 2, Part D.
50 */
51 #define HCI_SUCCESS 0x00
52 #define HCI_ERROR_CODE_UNKNOWN_HCI_CMD 0x01
53 #define HCI_ERROR_CODE_UNKNOWN_CONN_ID 0x02
54 #define HCI_ERROR_CODE_HW_FAILURE 0x03
55 #define HCI_ERROR_CODE_PAGE_TIMEOUT 0x04
56 #define HCI_ERROR_CODE_AUTH_FAILURE 0x05
57 #define HCI_ERROR_CODE_PIN_KEY_MISSING 0x06
58 #define HCI_ERROR_CODE_MEM_CAP_EXCEEDED 0x07
59 #define HCI_ERROR_CODE_CONN_TIMEOUT 0x08
60 #define HCI_ERROR_CODE_CONN_LIMIT_EXCEEDED 0x09
61 #define HCI_ERROR_CODE_SYNCH_CONN_LIMIT_EXCEEDED 0x0A
62 #define HCI_ERROR_CODE_ACL_CONN_ALREADY_EXISTS 0x0B
63 #define HCI_ERROR_CODE_CMD_DISALLOWED 0x0C
64 #define HCI_ERROR_CODE_CONN_REJ_LIMITED_RESOURCES 0x0D
65 #define HCI_ERROR_CODE_CONN_REJECTED_SECURITY_REASONS 0x0E
66 #define HCI_ERROR_CODE_CONN_REJECTED_UNACCEPTABLE_BDADDR 0x0F
67 #define HCI_ERROR_CODE_CONN_ACCEPT_TIMEOUT_EXCEEDED 0x10
68 #define HCI_ERROR_CODE_UNSUPPORTED_FEATURE_PARAM_VALUE 0x11
69 #define HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS 0x12
70 #define HCI_ERROR_CODE_REMOTE_USER_TERM_CONN 0x13
71 #define HCI_ERROR_CODE_REMOTE_DEVICE_TERM_CONN_LOW_RESOURCES 0x14
72 #define HCI_ERROR_CODE_REMOTE_DEVICE_TERM_CONN_POWER_OFF 0x15
73 #define HCI_ERROR_CODE_CONN_TERM_BY_LOCAL_HOST 0x16
74 #define HCI_ERROR_CODE_REPEATED_ATTEMPTS 0x17
75 #define HCI_ERROR_CODE_PAIRING_NOT_ALLOWED 0x18
76 #define HCI_ERROR_CODE_UNKNOWN_LMP_PDU 0x19
77 #define HCI_ERROR_CODE_UNSUPPORTED_REMOTE_FEATURE 0x1A
78 #define HCI_ERROR_CODE_SCO_OFFSET_REJ 0x1B
79 #define HCI_ERROR_CODE_SCO_INTERVAL_REJ 0x1C
80 #define HCI_ERROR_CODE_SCO_AIR_MODE_REJ 0x1D
81 #define HCI_ERROR_CODE_INVALID_LMP_PARAMS 0x1E
82 #define HCI_ERROR_CODE_UNSPECIFIED_ERROR 0x1F
83 #define HCI_ERROR_CODE_UNSUPPORTED_LMP_PARAM_VAL 0x20
84 #define HCI_ERROR_CODE_ROLE_CHANGE_NOT_ALLOWED 0x21
85 #define HCI_ERROR_CODE_LMP_LL_RESP_TIMEOUT 0x22
86 #define HCI_ERROR_CODE_LMP_ERR_TRANSACTION_COLLISION 0x23
87 #define HCI_ERROR_CODE_LMP_PDU_NOT_ALLOWED 0x24
88 #define HCI_ERROR_CODE_ENCRYPT_MODE_NOT_ACCEPTABLE 0x25
89 #define HCI_ERROR_CODE_LINK_KEY_CAN_NOT_BE_CHANGED 0x26
90 #define HCI_ERROR_CODE_REQ_QOS_NOT_SUPPORTED 0x27
91 #define HCI_ERROR_CODE_INSTANT_PASSED 0x28
92 #define HCI_ERROR_CODE_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED 0x29
93 #define HCI_ERROR_CODE_DIFFERENT_TRANSACTION_COLLISION 0x2A
94 #define HCI_ERROR_CODE_RESERVED1 0x2B
95 #define HCI_ERROR_CODE_QOS_UNACCEPTABLE_PARAM 0x2C
96 #define HCI_ERROR_CODE_QOS_REJ 0x2D
97 #define HCI_ERROR_CODE_CHAN_ASSESSMENT_NOT_SUPPORTED 0x2E
98 #define HCI_ERROR_CODE_INSUFFICIENT_SECURITY 0x2F
99 #define HCI_ERROR_CODE_PARAM_OUT_OF_MANDATORY_RANGE 0x30
100 #define HCI_ERROR_CODE_RESERVED2 0x31
101 #define HCI_ERROR_CODE_ROLE_SWITCH_PENDING 0x32
102 #define HCI_ERROR_CODE_RESERVED3 0x33
103 #define HCI_ERROR_CODE_RESERVED_SLOT_VIOLATION 0x34
104 #define HCI_ERROR_CODE_ROLE_SWITCH_FAILED 0x35
105 #define HCI_ERROR_CODE_EXTENDED_INQUIRY_RESP_TOO_LARGE 0x36
106 #define HCI_ERROR_CODE_SIMPLE_PAIRING_NOT_SUPPORTED_BY_HOST 0x37
107 #define HCI_ERROR_CODE_HOST_BUSY_PAIRING 0x38
108 #define HCI_ERROR_CODE_CONN_REJ_NO_SUITABLE_CHAN_FOUND 0x39
109 #define HCI_ERROR_CODE_CONTROLLER_BUSY 0x3A
110 #define HCI_ERROR_CODE_UNACCEPTABLE_CONN_PARAMETERS 0x3B
111 #define HCI_ERROR_CODE_DIRECTED_ADV_TIMEOUT 0x3C
112 #define HCI_ERROR_CODE_CONN_TERM_MIC_FAILURE 0x3D
113 #define HCI_ERROR_CODE_CONN_FAILED_TO_ESTABLISH 0x3E
114 #define HCI_ERROR_CODE_MAC_CONN_FAILED 0x3F
115 #define HCI_ERROR_CODE_COARSE_CLOCK_ADJUST_REJECTED 0x40
116 
117 /*
118 ** Max Buffers Supported
119 */
120 
121 #define HCI_MAX_NUM_CMD_BUFFERS LL_MAX_NUM_CMD_BUFFERS
122 #if defined(CC2540) || defined(CC2541) || defined(CC2541S)
123 #define HCI_MAX_NUM_DATA_BUFFERS LL_MAX_NUM_DATA_BUFFERS
124 #endif // CC2540 | CC2541 | CC2541S
125 
126 /*
127 ** HCI Command API Parameters
128 */
129 
130 // Send Data Packet Boundary Flags
131 #define FIRST_PKT_HOST_TO_CTRL LL_DATA_FIRST_PKT_HOST_TO_CTRL
132 #define CONTINUING_PKT LL_DATA_CONTINUATION_PKT
133 #define FIRST_PKT_CTRL_TO_HOST LL_DATA_FIRST_PKT_CTRL_TO_HOST
134 
135 // Receive Data Packet
136 #define HCI_RSSI_NOT_AVAILABLE LL_RSSI_NOT_AVAILABLE
137 
138 // Disconnect Reasons
139 #define HCI_DISCONNECT_AUTH_FAILURE HCI_ERROR_CODE_AUTH_FAILURE
140 #define HCI_DISCONNECT_REMOTE_USER_TERM HCI_ERROR_CODE_REMOTE_USER_TERM_CONN
141 #define HCI_DISCONNECT_REMOTE_DEV_LOW_RESOURCES HCI_ERROR_CODE_REMOTE_DEVICE_TERM_CONN_LOW_RESOURCES
142 #define HCI_DISCONNECT_REMOTE_DEV_POWER_OFF HCI_ERROR_CODE_REMOTE_DEVICE_TERM_CONN_POWER_OFF
143 #define HCI_DISCONNECT_UNSUPPORTED_REMOTE_FEATURE HCI_ERROR_CODE_UNSUPPORTED_REMOTE_FEATURE
144 #define HCI_DISCONNECT_KEY_PAIRING_NOT_SUPPORTED HCI_ERROR_CODE_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED
145 #define HCI_DISCONNECT_UNACCEPTABLE_CONN_INTERVAL HCI_ERROR_CODE_UNACCEPTABLE_CONN_INTERVAL
146 
147 // Tx Power Types
148 #define HCI_READ_CURRENT_TX_POWER_LEVEL LL_READ_CURRENT_TX_POWER_LEVEL
149 #define HCI_READ_MAX_TX_POWER_LEVEL LL_READ_MAX_TX_POWER_LEVEL
150 
151 // Host Flow Control
152 #define HCI_CTRL_TO_HOST_FLOW_CTRL_OFF 0
153 #define HCI_CTRL_TO_HOST_FLOW_CTRL_ACL_ON_SYNCH_OFF 1
154 #define HCI_CTRL_TO_HOST_FLOW_CTRL_ACL_OFF_SYNCH_ON 2
155 #define HCI_CTRL_TO_HOST_FLOW_CTRL_ACL_ON_SYNCH_ON 3
156 
157 // Device Address Type
158 #define HCI_PUBLIC_DEVICE_ADDRESS LL_DEV_ADDR_TYPE_PUBLIC
159 #define HCI_RANDOM_DEVICE_ADDRESS LL_DEV_ADDR_TYPE_RANDOM
160 
161 // Advertiser Events
162 #define HCI_CONNECTABLE_UNDIRECTED_ADV LL_ADV_CONNECTABLE_UNDIRECTED_EVT
163 #define HCI_CONNECTABLE_DIRECTED_HDC_ADV LL_ADV_CONNECTABLE_DIRECTED_HDC_EVT
164 #define HCI_SCANNABLE_UNDIRECTED LL_ADV_SCANNABLE_UNDIRECTED_EVT
165 #define HCI_NONCONNECTABLE_UNDIRECTED_ADV LL_ADV_NONCONNECTABLE_UNDIRECTED_EVT
166 #define HCI_CONNECTABLE_DIRECTED_LDC_ADV LL_ADV_CONNECTABLE_DIRECTED_LDC_EVT
167 
168 // Advertiser Channels
169 #define HCI_ADV_CHAN_37 LL_ADV_CHAN_37
170 #define HCI_ADV_CHAN_38 LL_ADV_CHAN_38
171 #define HCI_ADV_CHAN_39 LL_ADV_CHAN_39
172 #define HCI_ADV_CHAN_ALL (LL_ADV_CHAN_37 | LL_ADV_CHAN_38 | LL_ADV_CHAN_39)
173 
174 // Advertiser White List Policy
175 #define HCI_ADV_WL_POLICY_ANY_REQ LL_ADV_WL_POLICY_ANY_REQ
176 #define HCI_ADV_WL_POLICY_WL_SCAN_REQ LL_ADV_WL_POLICY_WL_SCAN_REQ
177 #define HCI_ADV_WL_POLICY_WL_CONNECT_REQ LL_ADV_WL_POLICY_WL_CONNECT_REQ
178 #define HCI_ADV_WL_POLICY_WL_ALL_REQ LL_ADV_WL_POLICY_WL_ALL_REQ
179 
180 // Advertiser Commands
181 #define HCI_ENABLE_ADV LL_ADV_MODE_ON
182 #define HCI_DISABLE_ADV LL_ADV_MODE_OFF
183 
184 // Scan Types
185 #define HCI_SCAN_PASSIVE LL_SCAN_PASSIVE
186 #define HCI_SCAN_ACTIVE LL_SCAN_ACTIVE
187 
188 // Scan White List Policy
189 #define HCI_SCAN_WL_POLICY_ANY_ADV_PKTS LL_SCAN_WL_POLICY_ANY_ADV_PKTS
190 #define HCI_SCAN_WL_POLICY_USE_WHITE_LIST LL_SCAN_WL_POLICY_USE_WHITE_LIST
191 
192 // Scan Filtering
193 #define HCI_FILTER_REPORTS_DISABLE LL_FILTER_REPORTS_DISABLE
194 #define HCI_FILTER_REPORTS_ENABLE LL_FILTER_REPORTS_ENABLE
195 
196 // Scan Commands
197 #define HCI_SCAN_STOP LL_SCAN_STOP
198 #define HCI_SCAN_START LL_SCAN_START
199 
200 // Initiator White List Policy
201 #define HCI_INIT_WL_POLICY_USE_PEER_ADDR LL_INIT_WL_POLICY_USE_PEER_ADDR
202 #define HCI_INIT_WL_POLICY_USE_WHITE_LIST LL_INIT_WL_POLICY_USE_WHITE_LIST
203 
204 // Encryption Related
205 #define HCI_ENCRYPTION_OFF LL_ENCRYPTION_OFF
206 #define HCI_ENCRYPTION_ON LL_ENCRYPTION_ON
207 
208 // Direct Test Mode
209 #define HCI_DIRECT_TEST_PAYLOAD_PRBS9 LL_DIRECT_TEST_PAYLOAD_PRBS9
210 #define HCI_DIRECT_TEST_PAYLOAD_0x0F LL_DIRECT_TEST_PAYLOAD_0x0F
211 #define HCI_DIRECT_TEST_PAYLOAD_0x55 LL_DIRECT_TEST_PAYLOAD_0x55
212 #define HCI_DIRECT_TEST_PAYLOAD_PRBS15 LL_DIRECT_TEST_PAYLOAD_PRBS15
213 #define HCI_DIRECT_TEST_PAYLOAD_0xFF LL_DIRECT_TEST_PAYLOAD_0xFF
214 #define HCI_DIRECT_TEST_PAYLOAD_0x00 LL_DIRECT_TEST_PAYLOAD_0x00
215 #define HCI_DIRECT_TEST_PAYLOAD_0xF0 LL_DIRECT_TEST_PAYLOAD_0xF0
216 #define HCI_DIRECT_TEST_PAYLOAD_0xAA LL_DIRECT_TEST_PAYLOAD_0xAA
217 
218 // Direct Test Mode Enhanced
219 #define HCI_DTM_STANDARD_MODULATION_INDEX LL_DTM_STANDARD_MODULATION_INDEX
220 #define HCI_DTM_STABLE_MODULATION_INDEX LL_DTM_STABLE_MODULATION_INDEX
221 
222 // V4.2 - Privacy 1.2
223 #define HCI_DISABLE_ADDR_RESOLUTION LL_DISABLE_ADDR_RESOLUTION
224 #define HCI_ENABLE_ADDR_RESOLUTION LL_ENABLE_ADDR_RESOLUTION
225 
226 // V5.0 - 2 Mbps PHY
227 #define HCI_PHY_USE_PHY_PARAM LL_PHY_USE_PHY_PARAM
228 #define HCI_PHY_USE_ANY_PHY LL_PHY_USE_ANY_PHY
229 //
230 #define HCI_PHY_1_MBPS LL_PHY_1_MBPS
231 #define HCI_PHY_2_MBPS LL_PHY_2_MBPS
232 
233 // Vendor Specific
234 #define HCI_EXT_RX_GAIN_STD LL_EXT_RX_GAIN_STD
235 #define HCI_EXT_RX_GAIN_HIGH LL_EXT_RX_GAIN_HIGH
236 //
237 #if defined( CC26XX ) || defined( CC13XX )
238 #define HCI_EXT_TX_POWER_MINUS_21_DBM LL_EXT_TX_POWER_MINUS_21_DBM
239 #define HCI_EXT_TX_POWER_MINUS_18_DBM LL_EXT_TX_POWER_MINUS_18_DBM
240 #define HCI_EXT_TX_POWER_MINUS_15_DBM LL_EXT_TX_POWER_MINUS_15_DBM
241 #define HCI_EXT_TX_POWER_MINUS_12_DBM LL_EXT_TX_POWER_MINUS_12_DBM
242 #define HCI_EXT_TX_POWER_MINUS_9_DBM LL_EXT_TX_POWER_MINUS_9_DBM
243 #define HCI_EXT_TX_POWER_MINUS_6_DBM LL_EXT_TX_POWER_MINUS_6_DBM
244 #define HCI_EXT_TX_POWER_MINUS_3_DBM LL_EXT_TX_POWER_MINUS_3_DBM
245 #define HCI_EXT_TX_POWER_0_DBM LL_EXT_TX_POWER_0_DBM
246 #define HCI_EXT_TX_POWER_1_DBM LL_EXT_TX_POWER_1_DBM
247 #define HCI_EXT_TX_POWER_2_DBM LL_EXT_TX_POWER_2_DBM
248 #define HCI_EXT_TX_POWER_3_DBM LL_EXT_TX_POWER_3_DBM
249 #define HCI_EXT_TX_POWER_4_DBM LL_EXT_TX_POWER_4_DBM
250 #define HCI_EXT_TX_POWER_5_DBM LL_EXT_TX_POWER_5_DBM
251 #else // CC254x
252 #define HCI_EXT_TX_POWER_MINUS_23_DBM LL_EXT_TX_POWER_MINUS_23_DBM
253 #define HCI_EXT_TX_POWER_MINUS_6_DBM LL_EXT_TX_POWER_MINUS_6_DBM
254 #define HCI_EXT_TX_POWER_0_DBM LL_EXT_TX_POWER_0_DBM
255 #define HCI_EXT_TX_POWER_4_DBM LL_EXT_TX_POWER_4_DBM
256 #endif // CC26XX/CC13XX
257 //
258 #define HCI_EXT_ENABLE_ONE_PKT_PER_EVT LL_EXT_ENABLE_ONE_PKT_PER_EVT
259 #define HCI_EXT_DISABLE_ONE_PKT_PER_EVT LL_EXT_DISABLE_ONE_PKT_PER_EVT
260 //
261 #define HCI_EXT_ENABLE_CLK_DIVIDE_ON_HALT LL_EXT_ENABLE_CLK_DIVIDE_ON_HALT
262 #define HCI_EXT_DISABLE_CLK_DIVIDE_ON_HALT LL_EXT_DISABLE_CLK_DIVIDE_ON_HALT
263 //
264 #define HCI_EXT_NV_IN_USE LL_EXT_NV_IN_USE
265 #define HCI_EXT_NV_NOT_IN_USE LL_EXT_NV_NOT_IN_USE
266 //
267 #define HCI_EXT_ENABLE_FAST_TX_RESP_TIME LL_EXT_ENABLE_FAST_TX_RESP_TIME
268 #define HCI_EXT_DISABLE_FAST_TX_RESP_TIME LL_EXT_DISABLE_FAST_TX_RESP_TIME
269 //
270 #define HCI_EXT_ENABLE_SL_OVERRIDE LL_EXT_ENABLE_SL_OVERRIDE
271 #define HCI_EXT_DISABLE_SL_OVERRIDE LL_EXT_DISABLE_SL_OVERRIDE
272 //
273 #define HCI_EXT_TX_MODULATED_CARRIER LL_EXT_TX_MODULATED_CARRIER
274 #define HCI_EXT_TX_UNMODULATED_CARRIER LL_EXT_TX_UNMODULATED_CARRIER
275 //
276 #define HCI_PTM_SET_FREQ_TUNE_DOWN LL_EXT_SET_FREQ_TUNE_DOWN
277 #define HCI_PTM_SET_FREQ_TUNE_UP LL_EXT_SET_FREQ_TUNE_UP
278 //
279 #define HCI_EXT_PM_IO_PORT_P0 LL_EXT_PM_IO_PORT_P0
280 #define HCI_EXT_PM_IO_PORT_P1 LL_EXT_PM_IO_PORT_P1
281 #define HCI_EXT_PM_IO_PORT_P2 LL_EXT_PM_IO_PORT_P2
282 #define HCI_EXT_PM_IO_PORT_NONE LL_EXT_PM_IO_PORT_NONE
283 //
284 #define HCI_EXT_PM_IO_PORT_PIN0 LL_EXT_PM_IO_PORT_PIN0
285 #define HCI_EXT_PM_IO_PORT_PIN1 LL_EXT_PM_IO_PORT_PIN1
286 #define HCI_EXT_PM_IO_PORT_PIN2 LL_EXT_PM_IO_PORT_PIN2
287 #define HCI_EXT_PM_IO_PORT_PIN3 LL_EXT_PM_IO_PORT_PIN3
288 #define HCI_EXT_PM_IO_PORT_PIN4 LL_EXT_PM_IO_PORT_PIN4
289 #define HCI_EXT_PM_IO_PORT_PIN5 LL_EXT_PM_IO_PORT_PIN5
290 #define HCI_EXT_PM_IO_PORT_PIN6 LL_EXT_PM_IO_PORT_PIN6
291 #define HCI_EXT_PM_IO_PORT_PIN7 LL_EXT_PM_IO_PORT_PIN7
292 //
293 #define HCI_EXT_PER_RESET LL_EXT_PER_RESET
294 #define HCI_EXT_PER_READ LL_EXT_PER_READ
295 //
296 #define HCI_EXT_HALT_DURING_RF_DISABLE LL_EXT_HALT_DURING_RF_DISABLE
297 #define HCI_EXT_HALT_DURING_RF_ENABLE LL_EXT_HALT_DURING_RF_ENABLE
298 //
299 #define HCI_EXT_SET_USER_REVISION LL_EXT_SET_USER_REVISION
300 #define HCI_EXT_READ_BUILD_REVISION LL_EXT_READ_BUILD_REVISION
301 //
302 #define HCI_EXT_RESET_SYSTEM_HARD LL_EXT_RESET_SYSTEM_HARD
303 #define HCI_EXT_RESET_SYSTEM_SOFT LL_EXT_RESET_SYSTEM_SOFT
304 //
305 #define HCI_EXT_DISABLE_OVERLAPPED_PROCESSING LL_EXT_DISABLE_OVERLAPPED_PROCESSING
306 #define HCI_EXT_ENABLE_OVERLAPPED_PROCESSING LL_EXT_ENABLE_OVERLAPPED_PROCESSING
307 //
308 #define HCI_EXT_DISABLE_NUM_COMPL_PKTS_ON_EVENT LL_EXT_DISABLE_NUM_COMPL_PKTS_ON_EVENT
309 #define HCI_EXT_ENABLE_NUM_COMPL_PKTS_ON_EVENT LL_EXT_ENABLE_NUM_COMPL_PKTS_ON_EVENT
310 
311 #define HCI_EXT_DISABLE_SCAN_REQUEST_REPORT LL_EXT_DISABLE_SCAN_REQUEST_REPORT
312 #define HCI_EXT_ENABLE_SCAN_REQUEST_REPORT LL_EXT_ENABLE_SCAN_REQUEST_REPORT
313 
314 #define HCI_EXT_DISABLE_SCAN_REQUEST_REPORT LL_EXT_DISABLE_SCAN_REQUEST_REPORT
315 #define HCI_EXT_ENABLE_SCAN_REQUEST_REPORT LL_EXT_ENABLE_SCAN_REQUEST_REPORT
316 
317 /*
318 ** HCI Event Parameters
319 */
320 
321 // HCI Link Type for Buffer Overflow
322 #define HCI_LINK_TYPE_SCO_BUFFER_OVERFLOW 0
323 #define HCI_LINK_TYPE_ACL_BUFFER_OVERFLOW 1
324 
325 /*******************************************************************************
326  * TYPEDEFS
327  */
328 
329 typedef uint8 hciStatus_t;
330 
331 /*
332 ** LE Events
333 */
334 
335 // LE Connection Complete Event
336 typedef struct
337 {
338  osal_event_hdr_t hdr;
339  uint8 BLEEventCode;
340  uint8 status;
341  uint16 connectionHandle;
342  uint8 role;
343  uint8 peerAddrType;
344  uint8 peerAddr[B_ADDR_LEN];
345  uint16 connInterval;
346  uint16 connLatency;
347  uint16 connTimeout;
348  uint8 clockAccuracy;
350 
351 // LE Enhanced Connection Complete Event
352 typedef struct
353 {
354  osal_event_hdr_t hdr;
355  uint8 BLEEventCode;
356  uint8 status;
357  uint16 connectionHandle;
358  uint8 role;
359  uint8 peerAddrType;
360  uint8 peerAddr[B_ADDR_LEN];
361  uint16 connInterval;
362  uint16 connLatency;
363  uint16 connTimeout;
364  uint8 clockAccuracy;
365  // Note: These fields normally follow peerAddr. Put here for Host optimization.
366  uint8 localRPA[B_ADDR_LEN];
367  uint8 peerRPA[B_ADDR_LEN];
369 
371 {
375 
376 // LE Advertising Report Event
377 typedef struct
378 {
379  uint8 eventType; // advertisement or scan response event type
380  uint8 addrType; // public or random address type
381  uint8 addr[B_ADDR_LEN]; // device address
382  uint8 dataLen; // length of report data
383  uint8 rspData[B_MAX_ADV_LEN]; // report data given by dataLen
384  int8 rssi; // report RSSI
386 
387 typedef struct
388 {
389  osal_event_hdr_t hdr;
390  uint8 BLEEventCode;
391  uint8 numDevices;
392  hciEvt_DevInfo_t* devInfo; // pointer to the array of devInfo
394 
395 // VS LE Scan Request Report Event
396 typedef struct
397 {
398  osal_event_hdr_t hdr;
399  uint8 BLEEventCode;
400  uint8 eventType; // scan request event type
401  uint8 peerAddrType; // public or random address type
402  uint8 peerAddr[B_ADDR_LEN]; // peer device address
403  uint8 ownAddrType; // public or random address type
404  uint8 ownAddr[B_ADDR_LEN]; // peer device address
405  uint8 bleChan; // BLE channel
406  int8 rssi; // report RSSI
408 
409 // LE Connection Update Complete Event
410 typedef struct
411 {
412  osal_event_hdr_t hdr;
413  uint8 BLEEventCode;
414  uint8 status;
415  uint16 connectionHandle;
416  uint16 connInterval;
417  uint16 connLatency;
418  uint16 connTimeout;
420 
421 // LE Read Remote Used Features Complete Event
422 typedef struct
423 {
424  osal_event_hdr_t hdr;
425  uint8 BLEEventCode;
426  uint8 status;
427  uint16 connectionHandle;
428  uint8 features[8];
430 
431 // LE Encryption Change Event
432 typedef struct
433 {
434  osal_event_hdr_t hdr;
435  uint8 BLEEventCode;
436  uint16 connHandle;
437  uint8 reason;
438  uint8 encEnable;
440 
441 // LE Long Term Key Requested Event
442 typedef struct
443 {
444  osal_event_hdr_t hdr;
445  uint8 BLEEventCode;
446  uint16 connHandle;
447  uint8 random[B_RANDOM_NUM_SIZE];
448  uint16 encryptedDiversifier;
450 
451 // Number of Completed Packets Event
452 typedef struct
453 {
454  osal_event_hdr_t hdr;
455  uint8 numHandles;
456  uint16 *pConnectionHandle; // pointer to the connection handle array
457  uint16 *pNumCompletedPackets; // pointer to the number of completed packets array
459 
460 // Command Complete Event
461 typedef struct
462 {
463  osal_event_hdr_t hdr;
464  uint8 numHciCmdPkt; // number of HCI Command Packet
465  uint16 cmdOpcode;
466  uint8 *pReturnParam; // pointer to the return parameter
468 
469 // Vendor Specific Command Complete Event
470 typedef struct
471 {
472  osal_event_hdr_t hdr;
473  uint8 length; // length of parametric data, in bytes
474  uint16 cmdOpcode;
475  uint8 *pEventParam;
477 
478 // Command Status Event
479 typedef struct
480 {
481  osal_event_hdr_t hdr;
482  uint8 cmdStatus;
483  uint8 numHciCmdPkt;
484  uint16 cmdOpcode;
486 
487 // Hardware Error Event
488 typedef struct
489 {
490  osal_event_hdr_t hdr;
491  uint8 hardwareCode;
493 
494 // Disconnection Complete Event
495 typedef struct
496 {
497  osal_event_hdr_t hdr;
498  uint8 status;
499  uint16 connHandle; // connection handle
500  uint8 reason;
502 
503 // Data Buffer Overflow Event
504 typedef struct
505 {
506  osal_event_hdr_t hdr;
507  uint8 linkType; // synchronous or asynchronous buffer overflow
509 
510 // Authenticated Payload Timeout Expired Event
511 typedef struct
512 {
513  osal_event_hdr_t hdr;
514  uint16 connHandle;
516 
517 // LE Remote Connection Parameter Request Event
518 typedef struct
519 {
520  osal_event_hdr_t hdr;
521  uint8 BLEEventCode;
522  uint8 status;
523  uint16 connHandle;
524  uint16 Interval_Min;
525  uint16 Interval_Max;
526  uint16 Latency;
527  uint16 Timeout;
529 
530 // LE Phy Update Complete Event
531 typedef struct
532 {
533  osal_event_hdr_t hdr;
534  uint8 BLEEventCode;
535  uint8 status;
536  uint16 connHandle;
537  uint8 txPhy;
538  uint8 rxPhy;
540 
541 // LE Data Length Change Event
542 typedef struct
543 {
544  osal_event_hdr_t hdr;
545  uint8 BLEEventCode;
546  uint16 connHandle;
547  uint16 maxTxOctets;
548  uint16 maxTxTime;
549  uint16 maxRxOctets;
550  uint16 maxRxTime;
552 
553 // LE Read P256 Public Key Complete Event
554 typedef struct
555 {
556  osal_event_hdr_t hdr;
557  uint8 BLEEventCode;
558  uint8 status;
559  uint8 p256Key[LL_SC_P256_KEY_LEN];
561 
562 // LE Generate DHKey Complete Event
563 typedef struct
564 {
565  osal_event_hdr_t hdr;
566  uint8 BLEEventCode;
567  uint8 status;
568  uint8 dhKey[LL_SC_DHKEY_LEN];
570 
571 // Data structure for HCI Command Complete Event Return Parameter
572 typedef struct
573 {
574  uint8 status;
575  uint16 dataPktLen;
576  uint8 numDataPkts;
578 
579 typedef struct
580 {
581  osal_event_hdr_t hdr;
582  uint8 *pData;
583 } hciPacket_t;
584 
585 typedef struct
586 {
587  osal_event_hdr_t hdr;
588  uint8 pktType;
589  uint16 connHandle;
590  uint8 pbFlag;
591  uint16 pktLen;
592  uint8 *pData;
594 
595 // OSAL HCI_DATA_EVENT message format. This message is used to forward incoming
596 // data messages up to an application
597 typedef struct
598 {
599  osal_event_hdr_t hdr; // OSAL event header
600  uint16 connHandle; // connection handle
601  uint8 pbFlag; // data packet boundary flag
602  uint16 len; // length of data packet
603  uint8 *pData; // data packet given by len
605 
606 #if defined( CC26XX ) || defined( CC13XX )
607 PACKED_TYPEDEF_STRUCT
608 #else // CC254x
609 typedef struct
610 #endif // CC26XX/CC13XX
611 {
612  uint8 connId; // device connection handle
613  uint8 role; // device connection role
614  uint8 addr[LL_DEVICE_ADDR_LEN]; // peer device address
615  uint8 addrType; // peer device address type
616 } hciConnInfo_t;
617 
618 #if defined( CC26XX ) || defined( CC13XX )
619 PACKED_TYPEDEF_STRUCT
620 #else // CC254x
621 typedef struct
622 #endif // CC26XX/CC13XX
623 {
624  uint16 numPkts; // total number of rx packets
625  uint16 numCrcErr; // number rx packets with CRC error
626  uint16 numEvents; // number of connection events
627  uint16 numMMissedEvents; // number missed connection events
628 } hciPER_t;
629 
630 /*******************************************************************************
631  * LOCAL VARIABLES
632  */
633 
634 /*******************************************************************************
635  * GLOBAL VARIABLES
636  */
637 
638 /*
639 ** HCI Support Functions
640 */
641 
642 /*******************************************************************************
643  * @fn HCI_bm_alloc API
644  *
645  * @brief This API is used to allocate memory using buffer management.
646  *
647  * Note: This function should never be called by the application.
648  * It is only used by HCI and L2CAP_bm_alloc.
649  *
650  * input parameters
651  *
652  * @param size - Number of bytes to allocate from the heap.
653  *
654  * output parameters
655  *
656  * @param None.
657  *
658  * @return Pointer to buffer, or NULL.
659  */
660 extern void *HCI_bm_alloc( uint16 size );
661 
662 
663 /*******************************************************************************
664  * @fn HCI_ValidConnTimeParams API
665  *
666  * @brief This API is used to check that the connection time parameter
667  * ranges are valid, and that the connection time parameter
668  * combination is valid. It also checks if the min/max CI range
669  * is valid.
670  *
671  * input parameters
672  *
673  * @param connIntervalMin - Minimum connection interval.
674  * @param connIntervalMax - Maximum connection interval.
675  * @param connLatency - Connection slave latency.
676  * @param connTimeout - Connection supervision timeout.
677  *
678  * output parameters
679  *
680  * @param None.
681  *
682  * @return TRUE: Connection time parameter check is valid.
683  * FALSE: Connection time parameter check is invalid.
684  */
685 extern uint8 HCI_ValidConnTimeParams( uint16 connIntervalMin,
686  uint16 connIntervalMax,
687  uint16 connLatency,
688  uint16 connTimeout );
689 
690 
691 /*******************************************************************************
692  * @fn HCI_TestAppTaskRegister
693  *
694  * @brief HCI vendor specific registration for HCI Test Application.
695  *
696  * input parameters
697  *
698  * @param taskID - The HCI Test Application OSAL task identifier.
699  *
700  * output parameters
701  *
702  * @param None.
703  *
704  * @return None.
705  */
706 extern void HCI_TestAppTaskRegister( uint8 taskID );
707 
708 
709 /*******************************************************************************
710  * @fn HCI_GAPTaskRegister
711  *
712  * @brief HCI vendor specific registration for Host GAP.
713  *
714  * input parameters
715  *
716  * @param taskID - The Host GAP OSAL task identifier.
717  *
718  * output parameters
719  *
720  * @param None.
721  *
722  * @return None.
723  */
724 extern void HCI_GAPTaskRegister( uint8 taskID );
725 
726 
727 /*******************************************************************************
728  *
729  * @fn HCI_L2CAPTaskRegister
730  *
731  * @brief HCI vendor specific registration for Host L2CAP.
732  *
733  * input parameters
734  *
735  * @param taskID - The Host L2CAP OSAL task identifier.
736  *
737  * output parameters
738  *
739  * @param None.
740  *
741  * @return None.
742  *
743  */
744 extern void HCI_L2CAPTaskRegister( uint8 taskID );
745 
746 
747 /*******************************************************************************
748  * @fn HCI_SMPTaskRegister
749  *
750  * @brief HCI vendor specific registration for Host SMP.
751  *
752  * input parameters
753  *
754  * @param taskID - The Host SMP OSAL task identifier.
755  *
756  * output parameters
757  *
758  * @param None.
759  *
760  * @return None.
761  */
762 extern void HCI_SMPTaskRegister( uint8 taskID );
763 
764 
765 /*******************************************************************************
766  * @fn HCI_ExtTaskRegister
767  *
768  * @brief HCI vendor specific registration for Host extended commands.
769  *
770  * input parameters
771  *
772  * @param taskID - The Host Extended Command OSAL task identifier.
773  *
774  * output parameters
775  *
776  * @param None.
777  *
778  * @return None.
779  */
780 extern void HCI_ExtTaskRegister( uint8 taskID );
781 
782 
783 /*******************************************************************************
784  * @fn HCI_SendDataPkt API
785  *
786  * @brief This API is used to send a ACL data packet over a connection.
787  *
788  * Note: Empty packets are not sent.
789  *
790  * Related Events: HCI_NumOfCompletedPacketsEvent
791  *
792  * input parameters
793  *
794  * @param connHandle - Connection ID (handle).
795  * @param pbFlag - Packet Boundary Flag.
796  * @param pktLen - Number of bytes of data to transmit.
797  * @param *pData - Pointer to data buffer to transmit.
798  *
799  * output parameters
800  *
801  * @param None.
802  *
803  * @return hciStatus_t
804  */
805 extern hciStatus_t HCI_SendDataPkt( uint16 connHandle,
806  uint8 pbFlag,
807  uint16 pktLen,
808  uint8 *pData );
809 
810 
811 /*
812 ** HCI API
813 */
814 
815 /*******************************************************************************
816  * @fn HCI_DisconnectCmd API
817  *
818  * @brief This BT API is used to terminate a connection.
819  *
820  * Related Events: HCI_CommandStatusEvent,
821  * DisconnectEvent
822  *
823  * input parameters
824  *
825  * @param connHandle - Connection handle.
826  * @param reason - Reason for disconnection:
827  * HCI_DISCONNECT_AUTH_FAILURE,
828  * HCI_DISCONNECT_REMOTE_USER_TERM,
829  * HCI_DISCONNECT_REMOTE_DEV_POWER_OFF,
830  * HCI_DISCONNECT_UNSUPPORTED_REMOTE_FEATURE,
831  * HCI_DISCONNECT_KEY_PAIRING_NOT_SUPPORTED
832  * HCI_DISCONNECT_UNACCEPTABLE_CONN_INTERVAL
833  *
834  * output parameters
835  *
836  * @param None.
837  *
838  * @return hciStatus_t
839  */
840 extern hciStatus_t HCI_DisconnectCmd( uint16 connHandle,
841  uint8 reason );
842 
843 
844 /*******************************************************************************
845  * @fn HCI_ReadRemoteVersionInfoCmd API
846  *
847  * @brief This BT API is used to request version information from the
848  * the remote device in a connection.
849  *
850  * Related Events: HCI_CommandStatusEvent,
851  * ReadRemoteVersionInfoEvent
852  *
853  * input parameters
854  *
855  * @param connHandle - Connection handle.
856  *
857  * output parameters
858  *
859  * @param None.
860  *
861  * @return hciStatus_t
862  */
863 extern hciStatus_t HCI_ReadRemoteVersionInfoCmd( uint16 connHandle );
864 
865 
866 /*******************************************************************************
867  * @fn HCI_SetEventMaskCmd API
868  *
869  * @brief This BT API is used to set the HCI event mask, which is used to
870  * determine which events are supported.
871  *
872  * Related Events: HCI_CommandCompleteEvent
873  *
874  * input parameters
875  *
876  * @param pMask - Pointer to an eight byte event mask.
877  *
878  * output parameters
879  *
880  * @param None.
881  *
882  * @return hciStatus_t
883  */
884 extern hciStatus_t HCI_SetEventMaskCmd( uint8 *pMask );
885 
886 
887 /*******************************************************************************
888  * @fn HCI_SetEventMaskPage2Cmd API
889  *
890  * @brief This BT API is used to set the HCI event mask page 2, which is
891  * used to determine which events are supported.
892  *
893  * Related Events: HCI_CommandCompleteEvent
894  *
895  * input parameters
896  *
897  * @param pMask - Pointer to an eight byte event mask.
898  *
899  * output parameters
900  *
901  * @param None.
902  *
903  * @return hciStatus_t
904  */
905 extern hciStatus_t HCI_SetEventMaskPage2Cmd( uint8 *pMask );
906 
907 
908 /*******************************************************************************
909  * @fn HCI_Reset API
910  *
911  * @brief This BT API is used to reset the Link Layer.
912  *
913  * Related Events: HCI_CommandCompleteEvent
914  *
915  * input parameters
916  *
917  * @param None.
918  *
919  * output parameters
920  *
921  * @param None.
922  *
923  * @return hciStatus_t
924  */
925 extern hciStatus_t HCI_ResetCmd( void );
926 
927 
928 /*******************************************************************************
929  * @fn HCI_ReadTransmitPowerLevelCmd API
930  *
931  * @brief This BT API is used to read the transmit power level.
932  *
933  * Related Events: HCI_CommandCompleteEvent
934  *
935  * input parameters
936  *
937  * @param connHandle - Connection handle.
938  * @param txPwrType - HCI_READ_CURRENT_TX_POWER_LEVEL,
939  * HCI_READ_MAXIMUM_TX_POWER_LEVEL
940  *
941  * output parameters
942  *
943  * @param None.
944  *
945  * @return hciStatus_t
946  */
947 extern hciStatus_t HCI_ReadTransmitPowerLevelCmd( uint16 connHandle,
948  uint8 txPwrType );
949 
950 
951 /*******************************************************************************
952  * @fn HCI_SetControllerToHostFlowCtrlCmd API
953  *
954  * @brief This BT API is used by the Host to turn flow control on or off
955  * for data sent from the Controller to Host.
956  *
957  * Note: This command is currently not supported.
958  *
959  * Related Events: HCI_CommandCompleteEvent
960  *
961  * input parameters
962  *
963  * @param flowControlEnable - HCI_CTRL_TO_HOST_FLOW_CTRL_OFF,
964  * HCI_CTRL_TO_HOST_FLOW_CTRL_ACL_ON_SYNCH_OFF,
965  * HCI_CTRL_TO_HOST_FLOW_CTRL_ACL_OFF_SYNCH_ON,
966  * HCI_CTRL_TO_HOST_FLOW_CTRL_ACL_ON_SYNCH_ON
967  *
968  * output parameters
969  *
970  * @param None.
971  *
972  * @return hciStatus_t
973  */
974 extern hciStatus_t HCI_SetControllerToHostFlowCtrlCmd( uint8 flowControlEnable );
975 
976 
977 /*******************************************************************************
978  * @fn HCI_HostBufferSizeCmd API
979  *
980  * @brief This BT API is used by the Host to notify the Controller of the
981  * maximum size ACL buffer size the Controller can send to the
982  * Host.
983  *
984  * Note: This command is currently ignored by the Controller. It
985  * is assumed that the Host can always handle the maximum
986  * BLE data packet size.
987  *
988  * Related Events: HCI_CommandCompleteEvent
989  *
990  * input parameters
991  *
992  * @param hostAclPktLen - Host ACL data packet length.
993  * @param hostSyncPktLen - Host SCO data packet length .
994  * @param hostTotalNumAclPkts - Host total number of ACL data packets.
995  * @param hostTotalNumSyncPkts - Host total number of SCO data packets.
996  *
997  * output parameters
998  *
999  * @param None.
1000  *
1001  * @return hciStatus_t
1002  */
1003 extern hciStatus_t HCI_HostBufferSizeCmd( uint16 hostAclPktLen,
1004  uint8 hostSyncPktLen,
1005  uint16 hostTotalNumAclPkts,
1006  uint16 hostTotalNumSyncPkts );
1007 
1008 
1009 /*******************************************************************************
1010  * @fn HCI_HostNumCompletedPktCmd API
1011  *
1012  * @brief This BT API is used by the Host to notify the Controller of the
1013  * number of HCI data packets that have been completed for each
1014  * connection handle since this command was previously sent to the
1015  * controller.
1016  *
1017  * The Host_Number_Of_Conpleted_Packets command is a special
1018  * command. No event is normally generated after the command
1019  * has completed. The command should only be issued by the
1020  * Host if flow control in the direction from controller to
1021  * the host is on and there is at least one connection, or
1022  * if the controller is in local loopback mode.
1023  *
1024  * Note: It is assumed that there will be at most only one handle.
1025  * Even if more than one handle is provided, the Controller
1026  * does not track Host buffers as a function of connection
1027  * handles (and isn't required to do so).
1028  *
1029  * Related Events: HCI_CommandCompleteEvent
1030  *
1031  * input parameters
1032  *
1033  * @param numHandles - Number of connection handles.
1034  * @param connHandles - Array of connection handles.
1035  * @param numCompletedPkts - Array of number of completed packets.
1036  *
1037  * output parameters
1038  *
1039  * @param None.
1040  *
1041  * @return hciStatus_t
1042  */
1043 extern hciStatus_t HCI_HostNumCompletedPktCmd( uint8 numHandles,
1044  uint16 *connHandles,
1045  uint16 *numCompletedPkts );
1046 
1047 
1048 /*******************************************************************************
1049  * @fn HCI_ReadAuthPayloadTimeoutCmd API
1050  *
1051  * @brief This HCI API is used to read the connection's Authenticated
1052  * Payload Timeout value.
1053  *
1054  * input parameters
1055  *
1056  * @param connHandle - The LL connection ID to read the APTO value from.
1057  *
1058  * output parameters
1059  *
1060  * @param aptoValue - Pointer to current APTO value, in units of 10ms.
1061  *
1062  * @return hciStatus_t
1063  */
1064 extern hciStatus_t HCI_ReadAuthPayloadTimeoutCmd( uint16 connHandle,
1065  uint16 *aptoValue );
1066 
1067 
1068 /*******************************************************************************
1069  * @fn HCI_WriteAuthPayloadTimeoutCmd API
1070  *
1071  * @brief This HCI API is used to write the connection's Authenticated
1072  * Payload Timeout value.
1073  *
1074  * input parameters
1075  *
1076  * @param connHandle - The LL connection ID to write the APTO value to.
1077  * @param aptoValue - The APTO value, in units of 10ms.
1078  *
1079  * output parameters
1080  *
1081  * @param None.
1082  *
1083  * @return hciStatus_t
1084  */
1085 extern hciStatus_t HCI_WriteAuthPayloadTimeoutCmd( uint16 connHandle,
1086  uint16 aptoValue );
1087 
1088 
1089 /*******************************************************************************
1090  * @fn HCI_ReadLocalVersionInfoCmd API
1091  *
1092  * @brief This BT API is used to read the local version information.
1093  *
1094  * Related Events: HCI_CommandCompleteEvent
1095  *
1096  * input parameters
1097  *
1098  * @param None.
1099  *
1100  * output parameters
1101  *
1102  * @param None.
1103  *
1104  * @return hciStatus_t
1105  */
1106 extern hciStatus_t HCI_ReadLocalVersionInfoCmd( void );
1107 
1108 
1109 /*******************************************************************************
1110  * @fn HCI_ReadLocalSupportedCommandsCmd API
1111  *
1112  * @brief This BT API is used to read the locally supported commands.
1113  *
1114  * Related Events: HCI_CommandCompleteEvent
1115  *
1116  * input parameters
1117  *
1118  * @param None.
1119  *
1120  * output parameters
1121  *
1122  * @param None.
1123  *
1124  * @return hciStatus_t
1125  */
1126 extern hciStatus_t HCI_ReadLocalSupportedCommandsCmd( void );
1127 
1128 
1129 /*******************************************************************************
1130  * @fn HCI_ReadLocalSupportedFeaturesCmd API
1131  *
1132  * @brief This BT API is used to read the locally supported features.
1133  *
1134  * Related Events: HCI_CommandCompleteEvent
1135  *
1136  * input parameters
1137  *
1138  * @param None.
1139  *
1140  * output parameters
1141  *
1142  * @param None.
1143  *
1144  * @return hciStatus_t
1145  */
1146 extern hciStatus_t HCI_ReadLocalSupportedFeaturesCmd( void );
1147 
1148 
1149 /*******************************************************************************
1150  * @fn HCI_ReadBDADDRCmd API
1151  *
1152  * @brief This BT API is used to read this device's BLE address (BDADDR).
1153  *
1154  * Related Events: HCI_CommandCompleteEvent
1155  *
1156  * input parameters
1157  *
1158  * @param None.
1159  *
1160  * output parameters
1161  *
1162  * @param None.
1163  *
1164  * @return hciStatus_t
1165  */
1166 extern hciStatus_t HCI_ReadBDADDRCmd( void );
1167 
1168 
1169 /*******************************************************************************
1170  * @fn HCI_ReadRssiCmd API
1171  *
1172  * @brief This BT API is used to read the RSSI of the last packet
1173  * received on a connection given by the connection handle. If
1174  * the Receiver Modem test is running (HCI_EXT_ModemTestRx), then
1175  * the RF RSSI for the last received data will be returned. If
1176  * there is no RSSI value, then HCI_RSSI_NOT_AVAILABLE will be
1177  * returned.
1178  *
1179  * Related Events: HCI_CommandCompleteEvent
1180  *
1181  * input parameters
1182  *
1183  * @param connHandle - Connection handle.
1184  *
1185  * output parameters
1186  *
1187  * @param None.
1188  *
1189  * @return hciStatus_t
1190  */
1191 extern hciStatus_t HCI_ReadRssiCmd( uint16 connHandle );
1192 
1193 /*
1194 ** HCI Low Energy Commands
1195 */
1196 
1197 /*******************************************************************************
1198  * @fn HCI_LE_SetEventMaskCmd API
1199  *
1200  * @brief This LE API is used to set the HCI LE event mask, which is used
1201  * to determine which LE events are supported.
1202  *
1203  * Related Events: HCI_CommandCompleteEvent
1204  *
1205  * input parameters
1206  *
1207  * @param pEventMask - Pointer to LE event mask of 8 bytes.
1208 
1209  *
1210  * output parameters
1211  *
1212  * @param None.
1213  *
1214  * @return hciStatus_t
1215  */
1216 extern hciStatus_t HCI_LE_SetEventMaskCmd( uint8 *pEventMask );
1217 
1218 
1219 /*******************************************************************************
1220  * @fn HCI_LE_ReadBufSizeCmd API
1221  *
1222  * @brief This LE API is used by the Host to determine the maximum ACL
1223  * data packet size allowed by the Controller.
1224  *
1225  * Related Events: HCI_CommandCompleteEvent
1226  *
1227  * input parameters
1228  *
1229  * @param None.
1230  *
1231  * output parameters
1232  *
1233  * @param None.
1234  *
1235  * @return hciStatus_t
1236  */
1237 extern hciStatus_t HCI_LE_ReadBufSizeCmd( void );
1238 
1239 
1240 /*******************************************************************************
1241  * @fn HCI_LE_ReadLocalSupportedFeaturesCmd API
1242  *
1243  * @brief This LE API is used to read the LE locally supported features.
1244  *
1245  * Related Events: HCI_CommandCompleteEvent
1246  *
1247  * input parameters
1248  *
1249  * @param None.
1250  *
1251  * output parameters
1252  *
1253  * @param None.
1254  *
1255  * @return hciStatus_t
1256  */
1257 extern hciStatus_t HCI_LE_ReadLocalSupportedFeaturesCmd( void );
1258 
1259 
1260 /*******************************************************************************
1261  * @fn HCI_LE_SetRandomAddressCmd API
1262  *
1263  * @brief This LE API is used to set this device's Random address.
1264  *
1265  * Related Events: HCI_CommandCompleteEvent
1266  *
1267  * input parameters
1268  *
1269  * @param pRandAddr - Pointer to random address.
1270  *
1271  * output parameters
1272  *
1273  * @param None.
1274  *
1275  * @return hciStatus_t
1276  */
1277 extern hciStatus_t HCI_LE_SetRandomAddressCmd( uint8 *pRandAddr );
1278 
1279 
1280 /*******************************************************************************
1281  * @fn HCI_LE_SetAdvParamCmd API
1282  *
1283  * @brief This LE API is used to set the Advertising parameters.
1284  *
1285  * Related Events: HCI_CommandCompleteEvent
1286  *
1287  * input parameters
1288  *
1289  * @param advIntervalMin - Minimum allowed advertising interval.
1290  * @param advIntervalMax - Maximum allowed advertising interval.
1291  * @param advType - HCI_CONNECTABLE_UNDIRECTED_ADV,
1292  * HCI_CONNECTABLE_DIRECTED_HDC_ADV,
1293  * HCI_SCANNABLE_UNDIRECTED,
1294  * HCI_NONCONNECTABLE_UNDIRECTED_ADV
1295  * HCI_CONNECTABLE_DIRECTED_LDC_ADV
1296  * @param ownAddrType - HCI_PUBLIC_DEVICE_ADDRESS,
1297  * HCI_RANDOM_DEVICE_ADDRESS
1298  * @param directAddrType - HCI_PUBLIC_DEVICE_ADDRESS,
1299  * HCI_RANDOM_DEVICE_ADDRESS
1300  * @param directAddr - Pointer to address of device when using
1301  * directed advertising.
1302  * @param advChannelMap - HCI_ADV_CHAN_37,
1303  * HCI_ADV_CHAN_38,
1304  * HCI_ADV_CHAN_39,
1305  * HCI_ADV_CHAN_37 | HCI_ADV_CHAN_38,
1306  * HCI_ADV_CHAN_37 | HCI_ADV_CHAN_39,
1307  * HCI_ADV_CHAN_38 | HCI_ADV_CHAN_39,
1308  * HCI_ADV_CHAN_ALL
1309  * @param advFilterPolicy - HCI_ADV_WL_POLICY_ANY_REQ,
1310  * HCI_ADV_WL_POLICY_WL_SCAN_REQ,
1311  * HCI_ADV_WL_POLICY_WL_CONNECT_REQ,
1312  * HCI_ADV_WL_POLICY_WL_ALL_REQ
1313  *
1314  * output parameters
1315  *
1316  * @param None.
1317  *
1318  * @return hciStatus_t
1319  */
1320 extern hciStatus_t HCI_LE_SetAdvParamCmd( uint16 advIntervalMin,
1321  uint16 advIntervalMax,
1322  uint8 advType,
1323  uint8 ownAddrType,
1324  uint8 directAddrType,
1325  uint8 *directAddr,
1326  uint8 advChannelMap,
1327  uint8 advFilterPolicy );
1328 
1329 
1330 /*******************************************************************************
1331  * @fn HCI_LE_SetAdvDataCmd API
1332  *
1333  * @brief This LE API is used to set the Advertising data.
1334  *
1335  * Related Events: HCI_CommandCompleteEvent
1336  *
1337  * input parameters
1338  *
1339  * @param dataLen - Length of Advertising data.
1340  * @param pData - Pointer to Advertising data.
1341  *
1342  * output parameters
1343  *
1344  * @param None.
1345  *
1346  * @return hciStatus_t
1347  */
1348 extern hciStatus_t HCI_LE_SetAdvDataCmd( uint8 dataLen,
1349  uint8 *pData );
1350 
1351 
1352 /*******************************************************************************
1353  * @fn HCI_LE_SetScanRspDataCmd API
1354  *
1355  * @brief This LE API is used to set the Advertising Scan Response data.
1356  *
1357  * Related Events: HCI_CommandCompleteEvent
1358  *
1359  * input parameters
1360  *
1361  * @param dataLen - Length of Scan Response data.
1362  * @param pData - Pointer to Scan Response data.
1363  *
1364  * output parameters
1365  *
1366  * @param None.
1367  *
1368  * @return hciStatus_t
1369  */
1370 extern hciStatus_t HCI_LE_SetScanRspDataCmd( uint8 dataLen,
1371  uint8 *pData );
1372 
1373 
1374 /*******************************************************************************
1375  * @fn HCI_LE_SetAdvEnableCmd API
1376  *
1377  * @brief This LE API is used to turn Advertising on or off.
1378  *
1379  * Related Events: HCI_CommandCompleteEvent
1380  *
1381  * input parameters
1382  *
1383  * @param advEnable - HCI_ENABLE_ADV, HCI_DISABLE_ADV
1384  *
1385  * output parameters
1386  *
1387  * @param None.
1388  *
1389  * @return hciStatus_t
1390  */
1391 extern hciStatus_t HCI_LE_SetAdvEnableCmd( uint8 advEnable );
1392 
1393 
1394 /*******************************************************************************
1395  * @fn HCI_LE_ReadAdvChanTxPowerCmd API
1396  *
1397  * @brief This LE API is used to read transmit power when Advertising.
1398  *
1399  * Related Events: HCI_CommandCompleteEvent
1400  *
1401  * input parameters
1402  *
1403  * @param None.
1404  *
1405  * output parameters
1406  *
1407  * @param None.
1408  *
1409  * @return hciStatus_t
1410  */
1411 extern hciStatus_t HCI_LE_ReadAdvChanTxPowerCmd( void );
1412 
1413 
1414 /*******************************************************************************
1415  * @fn HCI_LE_SetScanParamCmd API
1416  *
1417  * @brief This LE API is used to set the Scan parameters.
1418  *
1419  * Related Events: HCI_CommandCompleteEvent
1420  *
1421  * input parameters
1422  *
1423  * @param scanType - HCI_SCAN_PASSIVE, HCI_SCAN_ACTIVE
1424  * @param scanInterval - Time between scan events.
1425  * @param scanWindow - Time of scan before scan event ends.
1426  * Note: When the scanWindow equals the scanInterval
1427  * then scanning is continuous.
1428  * @param ownAddrType - This device's address.
1429  * @param filterPolicy - HCI_SCAN_PASSIVE, HCI_SCAN_ACTIVE
1430  *
1431  * output parameters
1432  *
1433  * @param None.
1434  *
1435  * @return hciStatus_t
1436  */
1437 extern hciStatus_t HCI_LE_SetScanParamCmd( uint8 scanType,
1438  uint16 scanInterval,
1439  uint16 scanWindow,
1440  uint8 ownAddrType,
1441  uint8 filterPolicy );
1442 
1443 
1444 /*******************************************************************************
1445  * @fn HCI_LE_SetScanEnableCmd API
1446  *
1447  * @brief This LE API is used to turn Scanning on or off.
1448  *
1449  * Related Events: HCI_CommandCompleteEvent,
1450  * AdvReportEvent
1451  *
1452  * input parameters
1453  *
1454  * @param scanEnable - HCI_SCAN_START, HCI_SCAN_STOP
1455  * @param filterDuplicates - HCI_FILTER_REPORTS_ENABLE,
1456  * HCI_FILTER_REPORTS_DISABLE
1457  *
1458  * output parameters
1459  *
1460  * @param None.
1461  *
1462  * @return hciStatus_t
1463  */
1464 extern hciStatus_t HCI_LE_SetScanEnableCmd( uint8 scanEnable,
1465  uint8 filterDuplicates );
1466 
1467 
1468 /*******************************************************************************
1469  * @fn HCI_LE_CreateConnCmd API
1470  *
1471  * @brief This LE API is used to create a connection.
1472  *
1473  * Related Events: HCI_CommandStatusEvent,
1474  * ConnectionCompleteEvent
1475  *
1476  * input parameters
1477  *
1478  * @param scanInterval - Time between Init scan events.
1479  * @param scanWindow - Time of scan before Init scan event ends.
1480  * Note: When the scanWindow equals the
1481  * scanInterval then scanning is
1482  * continuous.
1483  * @param initFilterPolicy - HCI_INIT_WL_POLICY_USE_PEER_ADDR,
1484  * HCI_INIT_WL_POLICY_USE_WHITE_LIST
1485  * @param addrTypePeer - HCI_PUBLIC_DEVICE_ADDRESS,
1486  * HCI_RANDOM_DEVICE_ADDRESS
1487  * @param peerAddr - Pointer to peer device's address.
1488  * @param ownAddrType - HCI_PUBLIC_DEVICE_ADDRESS,
1489  * HCI_RANDOM_DEVICE_ADDRESS
1490  * @param connIntervalMin - Minimum allowed connection interval.
1491  * @param connIntervalMax - Maximum allowed connection interval.
1492  * @param connLatency - Number of skipped events (slave latency).
1493  * @param connTimeout - Connection supervision timeout.
1494  * @param minLen - Info parameter about min length of conn.
1495  * @param maxLen - Info parameter about max length of conn.
1496  *
1497  * output parameters
1498  *
1499  * @param None.
1500  *
1501  * @return hciStatus_t
1502  */
1503 extern hciStatus_t HCI_LE_CreateConnCmd( uint16 scanInterval,
1504  uint16 scanWindow,
1505  uint8 initFilterPolicy,
1506  uint8 addrTypePeer,
1507  uint8 *peerAddr,
1508  uint8 ownAddrType,
1509  uint16 connIntervalMin,
1510  uint16 connIntervalMax,
1511  uint16 connLatency,
1512  uint16 connTimeout,
1513  uint16 minLen,
1514  uint16 maxLen );
1515 
1516 
1517 /*******************************************************************************
1518  * @fn HCI_LE_CreateConnCancelCmd API
1519  *
1520  * @brief This LE API is used to cancel a create connection.
1521  *
1522  * Related Events: HCI_CommandCompleteEvent
1523  *
1524  * input parameters
1525  *
1526  * @param None.
1527  *
1528  * output parameters
1529  *
1530  * @param None.
1531  *
1532  * @return hciStatus_t
1533  */
1534 extern hciStatus_t HCI_LE_CreateConnCancelCmd( void );
1535 
1536 
1537 /*******************************************************************************
1538  * @fn HCI_LE_ReadWhiteListSizeCmd API
1539  *
1540  * @brief This LE API is used to read the white list.
1541  *
1542  * Related Events: HCI_CommandCompleteEvent
1543  *
1544  * input parameters
1545  *
1546  * @param None.
1547  *
1548  * output parameters
1549  *
1550  * @param None.
1551  *
1552  * @return hciStatus_t
1553  */
1554 extern hciStatus_t HCI_LE_ReadWhiteListSizeCmd( void );
1555 
1556 
1557 /*******************************************************************************
1558  * @fn HCI_LE_ClearWhiteListCmd API
1559  *
1560  * @brief This LE API is used to clear the white list.
1561  *
1562  * Related Events: HCI_CommandCompleteEvent
1563  *
1564  * input parameters
1565  *
1566  * @param None.
1567  *
1568  * output parameters
1569  *
1570  * @param None.
1571  *
1572  * @return hciStatus_t
1573  */
1574 extern hciStatus_t HCI_LE_ClearWhiteListCmd( void );
1575 
1576 
1577 /*******************************************************************************
1578  * @fn HCI_LE_AddWhiteListCmd API
1579  *
1580  * @brief This LE API is used to add a white list entry.
1581  *
1582  * Related Events: HCI_CommandCompleteEvent
1583  *
1584  * input parameters
1585  *
1586  * @param addrType - HCI_PUBLIC_DEVICE_ADDRESS, HCI_RANDOM_DEVICE_ADDRESS
1587  * @param devAddr - Pointer to address of device to put in white list.
1588  *
1589  * output parameters
1590  *
1591  * @param None.
1592  *
1593  * @return hciStatus_t
1594  */
1595 extern hciStatus_t HCI_LE_AddWhiteListCmd( uint8 addrType,
1596  uint8 *devAddr );
1597 
1598 
1599 /*******************************************************************************
1600  * @fn HCI_LE_RemoveWhiteListCmd API
1601  *
1602  * @brief This LE API is used to remove a white list entry.
1603  *
1604  * Related Events: HCI_CommandCompleteEvent
1605  *
1606  * input parameters
1607  *
1608  * @param addrType - HCI_PUBLIC_DEVICE_ADDRESS, HCI_RANDOM_DEVICE_ADDRESS
1609  * @param devAddr - Pointer to address of device to remove from the
1610  * white list.
1611  *
1612  * output parameters
1613  *
1614  * @param None.
1615  *
1616  * @return hciStatus_t
1617  */
1618 extern hciStatus_t HCI_LE_RemoveWhiteListCmd( uint8 addrType,
1619  uint8 *devAddr );
1620 
1621 
1622 /*******************************************************************************
1623  * @fn HCI_LE_ConnUpdateCmd API
1624  *
1625  * @brief This LE API is used to update the connection parameters.
1626  *
1627  * Related Events: HCI_CommandStatusEvent,
1628  * ConnectionUpdateCompleteEvent
1629  *
1630  * input parameters
1631  *
1632  * @param connHandle - Connection handle.
1633  * @param connIntervalMin - Minimum allowed connection interval.
1634  * @param connIntervalMax - Maximum allowed connection interval.
1635  * @param connLatency - Number of skipped events (slave latency).
1636  * @param connTimeout - Connection supervision timeout.
1637  * @param minLen - Info parameter about min length of conn.
1638  * @param maxLen - Info parameter about max length of conn.
1639  *
1640  * output parameters
1641  *
1642  * @param None.
1643  *
1644  * @return hciStatus_t
1645  */
1646 extern hciStatus_t HCI_LE_ConnUpdateCmd( uint16 connHandle,
1647  uint16 connIntervalMin,
1648  uint16 connIntervalMax,
1649  uint16 connLatency,
1650  uint16 connTimeout,
1651  uint16 minLen,
1652  uint16 maxLen );
1653 
1654 
1655 /*******************************************************************************
1656  * @fn HCI_LE_SetHostChanClassificationCmd API
1657  *
1658  * @brief This LE API is used to update the current data channel map.
1659  *
1660  * Related Events: HCI_CommandCompleteEvent
1661  *
1662  * input parameters
1663  *
1664  * @param chanMap - Pointer to the new channel map.
1665  *
1666  * output parameters
1667  *
1668  * @param None.
1669  *
1670  * @return hciStatus_t
1671  */
1672 extern hciStatus_t HCI_LE_SetHostChanClassificationCmd( uint8 *chanMap );
1673 
1674 
1675 /*******************************************************************************
1676  * @fn HCI_LE_ReadChannelMapCmd API
1677  *
1678  * @brief This LE API is used to read a connection's data channel map.
1679  *
1680  * Related Events: HCI_CommandCompleteEvent
1681  *
1682  * input parameters
1683  *
1684  * @param connHandle - Connection handle.
1685  *
1686  * output parameters
1687  *
1688  * @param None.
1689  *
1690  * @return hciStatus_t
1691  */
1692 extern hciStatus_t HCI_LE_ReadChannelMapCmd( uint16 connHandle );
1693 
1694 
1695 /*******************************************************************************
1696  * @fn HCI_LE_ReadRemoteUsedFeaturesCmd API
1697  *
1698  * @brief This LE API is used to read the remote device's used features.
1699  *
1700  * Related Events: HCI_CommandStatusEvent,
1701  * ReadRemoteUsedFeaturesCompleteEvent
1702  *
1703  * input parameters
1704  *
1705  * @param connHandle - Connection handle.
1706  *
1707  * output parameters
1708  *
1709  * @param None.
1710  *
1711  * @return hciStatus_t
1712  */
1713 extern hciStatus_t HCI_LE_ReadRemoteUsedFeaturesCmd( uint16 connHandle );
1714 
1715 
1716 /*******************************************************************************
1717  * @fn HCI_LE_EncryptCmd API
1718  *
1719  * @brief This LE API is used to perform an encryption using AES128.
1720  *
1721  * Note: Input parameters are ordered MSB..LSB.
1722  *
1723  * Related Events: HCI_CommandCompleteEvent
1724  *
1725  * input parameters
1726  *
1727  * @param key - Pointer to 16 byte encryption key.
1728  * @param plainText - Pointer to 16 byte plaintext data.
1729  *
1730  * output parameters
1731  *
1732  * @param None.
1733  *
1734  * @return hciStatus_t
1735  */
1736 extern hciStatus_t HCI_LE_EncryptCmd( uint8 *key,
1737  uint8 *plainText );
1738 
1739 
1740 /*******************************************************************************
1741  * @fn HCI_LE_RandCmd API
1742  *
1743  * @brief This LE API is used to generate a random number.
1744  *
1745  * Related Events: HCI_CommandCompleteEvent
1746  *
1747  * input parameters
1748  *
1749  * @param None.
1750  *
1751  * output parameters
1752  *
1753  * @param None.
1754  *
1755  * @return hciStatus_t
1756  */
1757 extern hciStatus_t HCI_LE_RandCmd( void );
1758 
1759 
1760 /*******************************************************************************
1761  * @fn HCI_LE_StartEncyptCmd API
1762  *
1763  * @brief This LE API is used to start encryption in a connection.
1764  *
1765  * Related Events: HCI_CommandStatusEvent,
1766  * EncChangeEvent or
1767  * EncKeyRefreshEvent
1768  *
1769  * input parameters
1770  *
1771  * @param connHandle - Connection handle.
1772  * @param random - Pointer to eight byte Random number.
1773  * @param encDiv - Pointer to two byte Encrypted Diversifier.
1774  * @param ltk - Pointer to 16 byte Long Term Key.
1775  *
1776  * output parameters
1777  *
1778  * @param None.
1779  *
1780  * @return hciStatus_t
1781  */
1782 extern hciStatus_t HCI_LE_StartEncyptCmd( uint16 connHandle,
1783  uint8 *random,
1784  uint8 *encDiv,
1785  uint8 *ltk );
1786 
1787 
1788 /*******************************************************************************
1789  * @fn HCI_LE_LtkReqReplyCmd API
1790  *
1791  * @brief This LE API is used by the Host to send to the Controller a
1792  * positive LTK reply.
1793  *
1794  * Related Events: HCI_CommandCompleteEvent
1795  *
1796  * input parameters
1797  *
1798  * @param connHandle - Connection handle.
1799  * @param ltk - Pointer to 16 byte Long Term Key.
1800  *
1801  * output parameters
1802  *
1803  * @param None.
1804  *
1805  * @return hciStatus_t
1806  */
1807 extern hciStatus_t HCI_LE_LtkReqReplyCmd( uint16 connHandle,
1808  uint8 *ltk );
1809 
1810 
1811 /*******************************************************************************
1812  * @fn HCI_LE_LtkReqNegReplyCmd API
1813  *
1814  * @brief This LE API is used by the Host to send to the Controller a
1815  * negative LTK reply.
1816  *
1817  * Related Events: HCI_CommandCompleteEvent
1818  *
1819  * input parameters
1820  *
1821  * @param connHandle - Connection handle.
1822  *
1823  * output parameters
1824  *
1825  * @param None.
1826  *
1827  * @return hciStatus_t
1828  */
1829 extern hciStatus_t HCI_LE_LtkReqNegReplyCmd( uint16 connHandle );
1830 
1831 
1832 /*******************************************************************************
1833  * @fn HCI_LE_ReadSupportedStatesCmd API
1834  *
1835  * @brief This LE API is used to read the Controller's supported states.
1836  *
1837  * Related Events: HCI_CommandCompleteEvent
1838  *
1839  * input parameters
1840  *
1841  * @param None.
1842  *
1843  * output parameters
1844  *
1845  * @param None.
1846  *
1847  * @return hciStatus_t
1848  */
1849 extern hciStatus_t HCI_LE_ReadSupportedStatesCmd( void );
1850 
1851 
1852 /*******************************************************************************
1853  * @fn HCI_LE_ReceiverTestCmd API
1854  *
1855  * @brief This LE API is used to start the receiver Direct Test Mode test.
1856  *
1857  * Note: A HCI reset should be issued when done using DTM!
1858  *
1859  * Related Events: HCI_CommandCompleteEvent
1860  *
1861  * input parameters
1862  *
1863  * @param rxChan - Rx Channel k=0..39, where F=2402+(k*2MHz).
1864  *
1865  * output parameters
1866  *
1867  * @param None.
1868  *
1869  * @return hciStatus_t
1870  */
1871 extern hciStatus_t HCI_LE_ReceiverTestCmd( uint8 rxChan );
1872 
1873 
1874 /*******************************************************************************
1875  * @fn HCI_LE_TransmitterTestCmd API
1876  *
1877  * @brief This LE API is used to start the transmit Direct Test Mode test.
1878  *
1879  * Note: The BLE device is to transmit at maximum power!
1880  *
1881  * Note: A HCI reset should be issued when done using DTM!
1882  *
1883  * input parameters
1884  *
1885  * @param txChan - Tx RF frequency k=0..39, where F=2402+(k*2MHz).
1886  * @param dataLen - Test data length: 0..37 bytes
1887  * @param payloadType - Type of packet payload, per Direct Test Mode spec:
1888  * HCI_DIRECT_TEST_PAYLOAD_PRBS9,
1889  * HCI_DIRECT_TEST_PAYLOAD_0x0F,
1890  * HCI_DIRECT_TEST_PAYLOAD_0x55,
1891  * HCI_DIRECT_TEST_PAYLOAD_PRBS15,
1892  * HCI_DIRECT_TEST_PAYLOAD_0xFF,
1893  * HCI_DIRECT_TEST_PAYLOAD_0x00,
1894  * HCI_DIRECT_TEST_PAYLOAD_0xF0,
1895  * HCI_DIRECT_TEST_PAYLOAD_0xAA
1896  *
1897  * output parameters
1898  *
1899  * @param None.
1900  *
1901  * @return hciStatus_t
1902  */
1903 extern hciStatus_t HCI_LE_TransmitterTestCmd( uint8 txChan,
1904  uint8 dataLen,
1905  uint8 pktPayload );
1906 
1907 
1908 /*******************************************************************************
1909  * @fn HCI_LE_TestEndCmd API
1910  *
1911  * @brief This LE API is used to end the Direct Test Mode test.
1912  *
1913  * Note: A HCI reset should be issued when done using DTM!
1914  *
1915  * Related Events: HCI_CommandCompleteEvent
1916  *
1917  * input parameters
1918  *
1919  * @param None.
1920  *
1921  * output parameters
1922  *
1923  * @param None.
1924  *
1925  * @return hciStatus_t
1926  */
1927 extern hciStatus_t HCI_LE_TestEndCmd( void );
1928 
1929 // V4.1
1930 
1931 /*******************************************************************************
1932  * @fn HCI_LE_RemoteConnParamReqReplyCmd API
1933  *
1934  * @brief This LE API is used to positively reply to the HCI LE Remote
1935  * Connection Parameter Request event from the Controller. This
1936  * command indicates that the Host has accepted the remote
1937  * device's request to change connection parameters.
1938  *
1939  * Related Events: HCI_CommandCompleteEvent
1940  *
1941  * input parameters
1942  *
1943  * @param connHandle - Connection handle.
1944  * @param connIntervalMin - Minimum allowed connection interval.
1945  * @param connIntervalMax - Maximum allowed connection interval.
1946  * @param connLatency - Number of skipped events (slave latency).
1947  * @param connTimeout - Connection supervision timeout.
1948  * @param minLen - Info parameter about min length of conn.
1949  * @param maxLen - Info parameter about max length of conn.
1950  *
1951  * output parameters
1952  *
1953  * @param None.
1954  *
1955  * @return hciStatus_t
1956  */
1957 extern hciStatus_t HCI_LE_RemoteConnParamReqReplyCmd( uint16 connHandle,
1958  uint16 connIntervalMin,
1959  uint16 connIntervalMax,
1960  uint16 connLatency,
1961  uint16 connTimeout,
1962  uint16 minLen,
1963  uint16 maxLen );
1964 
1965 
1966 /*******************************************************************************
1967  * @fn HCI_LE_RemoteConnParamReqNegReplyCmd API
1968  *
1969  * @brief This LE API is used to positively reply to the HCI LE Remote
1970  * Connection Parameter Request event from the Controller. This
1971  * command indicates that the Host has accepted the remote
1972  * device's request to change connection parameters.
1973  *
1974  * Related Events: HCI_CommandCompleteEvent
1975  *
1976  * input parameters
1977  *
1978  * @param connHandle - Connection handle.
1979  * @param reason - Reason connection parameter request was rejected.
1980  *
1981  * output parameters
1982  *
1983  * @param None.
1984  *
1985  * @return hciStatus_t
1986  */
1987 extern hciStatus_t HCI_LE_RemoteConnParamReqNegReplyCmd( uint16 connHandle,
1988  uint8 reason );
1989 
1990 
1991 // V4.2 - Extended Data Length
1992 
1993 /*******************************************************************************
1994  * @fn HCI_LE_SetDataLenCmd API
1995  *
1996  * @brief This LE API is used to set the maximum transmission packet size
1997  * and the maximum packet transmission time for the connection.
1998  *
1999  * input parameters
2000  *
2001  * @param connHandle - Connection handle.
2002  * @param txOctets - Maximum transmit payload size (in bytes).
2003  * @param txTime - Maximum transmit time (in us).
2004  *
2005  * output parameters
2006  *
2007  * @param None.
2008  *
2009  * @return hciStatus_t
2010  */
2011 extern hciStatus_t HCI_LE_SetDataLenCmd( uint16 connHandle,
2012  uint16 txOctets,
2013  uint16 txTime );
2014 
2015 
2016 /*******************************************************************************
2017  * @fn HCI_LE_ReadSuggestedDefaultDataLenCmd API
2018  *
2019  * @brief This LE API is used to read the default maximum trasmit packet
2020  * size and the default maximum packet transmit time to be used
2021  * for new connections.
2022  *
2023  * input parameters
2024  *
2025  * @param None.
2026  *
2027  * output parameters
2028  *
2029  * @param None.
2030  *
2031  * @return hciStatus_t
2032  */
2033 extern hciStatus_t HCI_LE_ReadSuggestedDefaultDataLenCmd( void );
2034 
2035 
2036 /*******************************************************************************
2037  * @fn HCI_LE_WriteSuggestedDefaultDataLenCmd API
2038  *
2039  * @brief This LE API is used to set the default maximum transmission
2040  * packet size and the default maximum packet transmission time
2041  * for the connection.
2042  *
2043  * input parameters
2044  *
2045  * @param txOctets - Maximum transmit payload size (in bytes).
2046  * @param txTime - Maximum transmit time (in us).
2047  *
2048  * output parameters
2049  *
2050  * @param None.
2051  *
2052  * @return hciStatus_t
2053  */
2054 extern hciStatus_t HCI_LE_WriteSuggestedDefaultDataLenCmd( uint16 txOctets,
2055  uint16 txTime );
2056 
2057 
2058 /*******************************************************************************
2059  * @fn HCI_LE_ReadMaxDataLenCmd API
2060  *
2061  * @brief This LE API is used to read the maximum supported transmit and
2062  * receive payload octets and packet duration times.
2063  *
2064  * input parameters
2065  *
2066  * @param None.
2067  *
2068  * output parameters
2069  *
2070  * @param None.
2071  *
2072  * @return hciStatus_t
2073  */
2074 extern hciStatus_t HCI_LE_ReadMaxDataLenCmd( void );
2075 
2076 
2077 // V4.2 - Privacy 1.2
2078 
2079 /*******************************************************************************
2080  * @fn HCI_LE_AddDeviceToResolvingListCmd API
2081  *
2082  * @brief This LE API is used to add one device to the list of address
2083  * translations used to resolve Resolvable Private Addresses in
2084  * the Controller.
2085  *
2086  * input parameters
2087  *
2088  * @param peerIdAddrType - HCI_PUBLIC_DEVICE_ADDRESS,
2089  * HCI_RANDOM_DEVICE_ADDRESS
2090  * @param peerIdAddr - Peer device Identity Address.
2091  * @param peerIRK - IRK of peer device.
2092  * @param localIRK - IRK for own device.
2093  *
2094  * output parameters
2095  *
2096  * @param None.
2097  *
2098  * @return hciStatus_t
2099  */
2100 extern hciStatus_t HCI_LE_AddDeviceToResolvingListCmd( uint8 peerIdAddrType,
2101  uint8 *peerIdAddr,
2102  uint8 *peerIRK,
2103  uint8 *localIRK );
2104 
2105 
2106 /*******************************************************************************
2107  * @fn HCI_LE_RemoveDeviceFromResolvingListCmd API
2108  *
2109  * @brief This LE API is used to remove one device fromthe list of
2110  * address translations used to resolve Resolvable Private
2111  * Addresses in the Controller.
2112  *
2113  * input parameters
2114  *
2115  * @param peerIdAddrType - HCI_PUBLIC_DEVICE_ADDRESS,
2116  * HCI_RANDOM_DEVICE_ADDRESS
2117  * @param peerIdAddr - Peer device Identity Address.
2118  *
2119  * output parameters
2120  *
2121  * @param None.
2122  *
2123  * @return hciStatus_t
2124  */
2125 extern hciStatus_t HCI_LE_RemoveDeviceFromResolvingListCmd( uint8 peerIdAddrType,
2126  uint8 *peerIdAddr );
2127 
2128 
2129 /*******************************************************************************
2130  * @fn HCI_LE_ClearResolvingListCmd API
2131  *
2132  * @brief This LE API is used to remove all devices from the list of
2133  * address translations used to resolve Resolvable Private
2134  * addresses in the Controller.
2135  *
2136  * input parameters
2137  *
2138  * @param None.
2139  *
2140  * output parameters
2141  *
2142  * @param None.
2143  *
2144  * @return hciStatus_t
2145  */
2146 extern hciStatus_t HCI_LE_ClearResolvingListCmd( void );
2147 
2148 
2149 /*******************************************************************************
2150  * @fn HCI_LE_ReadResolvingListSizeCmd API
2151  *
2152  * @brief This LE API is used to read the total number of address
2153  * translation entries in the resolving list that can be stored
2154  * in the Controller.
2155  *
2156  * input parameters
2157  *
2158  * @param None.
2159  *
2160  * output parameters
2161  *
2162  * @param None.
2163  *
2164  * @return hciStatus_t
2165  */
2166 extern hciStatus_t HCI_LE_ReadResolvingListSizeCmd( void );
2167 
2168 
2169 /*******************************************************************************
2170  * @fn HCI_LE_ReadPeerResolvableAddressCmd API
2171  *
2172  * @brief This LE API is used to get the current peer Resolvable Private
2173  * Address being used for the corresponding peer Public or
2174  * Random (Static) Identity Address.
2175  *
2176  * Note: The peer's Resolvable Private Address being used may
2177  * change after this command is called.
2178  *
2179  * input parameters
2180  *
2181  * @param peerIdAddrType - HCI_PUBLIC_DEVICE_ADDRESS,
2182  * HCI_RANDOM_DEVICE_ADDRESS
2183  * @param peerIdAddr - Peer device Identity Address.
2184  *
2185  * output parameters
2186  *
2187  * @param None.
2188  *
2189  * @return hciStatus_t
2190  */
2191 extern hciStatus_t HCI_LE_ReadPeerResolvableAddressCmd( uint8 peerIdAddrType,
2192  uint8 *peerIdAddr );
2193 
2194 
2195 /*******************************************************************************
2196  * @fn HCI_LE_ReadLocalResolvableAddressCmd API
2197  *
2198  * @brief This LE API is used to get the current local Resolvable Private
2199  * Address being used for the corresponding local Public or
2200  * Random (Static) Identity Address.
2201  *
2202  * Note: The local Resolvable Private Address being used may
2203  * change after this command is called.
2204  *
2205  * input parameters
2206  *
2207  * @param localIdAddrType - HCI_PUBLIC_DEVICE_ADDRESS,
2208  * HCI_RANDOM_DEVICE_ADDRESS
2209  * @param localIdAddr - Local device Identity Address.
2210  *
2211  * output parameters
2212  *
2213  * @param None.
2214  *
2215  * @return hciStatus_t
2216  */
2217 extern hciStatus_t HCI_LE_ReadLocalResolvableAddressCmd( uint8 localIdAddrType,
2218  uint8 *localIdAddr );
2219 
2220 
2221 /*******************************************************************************
2222  * @fn HCI_LE_SetAddressResolutionEnableCmd API
2223  *
2224  * @brief This LE API is used to enable resolution of Resolvable Private
2225  * Addresses in the Controller. This causes the Controller to
2226  * use the resolving list whenever the Controller receives a
2227  * local or peer Resolvable Private Address.
2228  *
2229  * input parameters
2230  *
2231  * @param addrResolutionEnable - HCI_DISABLE_ADDR_RESOLUTION,
2232  HCI_ENABLE_ADDR_RESOLUTION
2233  *
2234  * output parameters
2235  *
2236  * @param None.
2237  *
2238  * @return hciStatus_t
2239  */
2240 extern hciStatus_t HCI_LE_SetAddressResolutionEnableCmd( uint8 addrResolutionEnable );
2241 
2242 
2243 /*******************************************************************************
2244  * @fn HCI_LE_SetResolvablePrivateAddressTimeoutCmd API
2245  *
2246  * @brief This LE API is used to set the length of time the Controller
2247  * uses a Resolvable Private Address before a new Resolvable
2248  * Private Address is generated and starts being used.
2249  *
2250  * Note: This timeout applies to all addresses generated by
2251  * the Controller..
2252  *
2253  * input parameters
2254  *
2255  * @param rpaTimeout - RPA timeout (in secs).
2256  *
2257  * output parameters
2258  *
2259  * @param None.
2260  *
2261  * @return hciStatus_t
2262  */
2263 extern hciStatus_t HCI_LE_SetResolvablePrivateAddressTimeoutCmd( uint16 rpaTimeout );
2264 
2265 
2266 // V4.2 - Secure Connections
2267 
2268 /*******************************************************************************
2269  * @fn HCI_LE_ReadLocalP256PublicKeyCmd API
2270  *
2271  * @brief This LE API is used to read the local P-256 public key from the
2272  * Controller. The Controller shall generate a new P-256 public/
2273  * private key pair upon receipt of this command.
2274  *
2275  * Note: Generates LE Read Local P256 Public Key Complete event.
2276  *
2277  * WARNING: THIS ROUTINE WILL TIE UP THE LL FOR ABOUT 160ms!
2278  *
2279  * input parameters
2280  *
2281  * @param None.
2282  *
2283  * output parameters
2284  *
2285  * @param None.
2286  *
2287  * @return hciStatus_t
2288  */
2289 extern hciStatus_t HCI_LE_ReadLocalP256PublicKeyCmd( void );
2290 
2291 
2292 /*******************************************************************************
2293  * @fn HCI_LE_GenerateDHKeyCmd API
2294  *
2295  * @brief This LE API is used to initiate the generation of a Diffie-
2296  * Hellman key in the Controller for use over the LE transport.
2297  * This command takes the remote P-256 public key as input. The
2298  * Diffie-Hellman key generation uses the private key generated
2299  * by LE_Read_Local_P256_Public_Key command.
2300  *
2301  * Note: Generates LE DHKey Generation Complete event.
2302  *
2303  * WARNING: THIS ROUTINE WILL TIE UP THE LL FOR ABOUT 160ms!
2304  *
2305  * input parameters
2306  *
2307  * @param publicKey: The remote P-256 public key (X-Y format).
2308  *
2309  * output parameters
2310  *
2311  * @param None.
2312  *
2313  * @return hciStatus_t
2314  */
2315 extern hciStatus_t HCI_LE_GenerateDHKeyCmd( uint8 *publicKey );
2316 
2317 
2318 // V5.0 - 2Mbps PHY
2319 
2320 /*******************************************************************************
2321  * @fn HCI_LE_ReadPhyCmd API
2322  *
2323  * @brief This LE API is used to read the current transmitter and receiver
2324  * PHY.
2325  *
2326  * input parameters
2327  *
2328  * @param connHandle - Connection handle.
2329  *
2330  * output parameters
2331  *
2332  * @param None.
2333  *
2334  * @return hciStatus_t
2335  */
2336 extern hciStatus_t HCI_LE_ReadPhyCmd( uint16 connHandle );
2337 
2338 
2339 /*******************************************************************************
2340  * @fn HCI_LE_SetDefaultPhyCmd API
2341  *
2342  * @brief This LE API allows the Host to specify its preferred values for
2343  * the transmitter and receiver PHY to be used for all subsequent
2344  * connections.
2345  *
2346  * input parameters
2347  *
2348  * @param allPhys - Host preference on how to handle txPhy and rxPhy.
2349  * @param txPhy - Bit field of Host preferred Tx PHY.
2350  * @param rxPhy - Bit field of Host preferred Rx PHY.
2351  *
2352  * output parameters
2353  *
2354  * @param None.
2355  *
2356  * @return hciStatus_t
2357  */
2358 extern hciStatus_t HCI_LE_SetDefaultPhyCmd( uint8 allPhys,
2359  uint8 txPhy,
2360  uint8 rxPhy );
2361 
2362 
2363 /*******************************************************************************
2364  * @fn HCI_LE_SetPhyCmd API
2365  *
2366  * @brief This LE API is used to request a change to the transmitter and
2367  * receiver PHY for a connection.
2368  *
2369  * input parameters
2370  *
2371  * @param connHandle - Connection handle.
2372  * @param allPhys - Host preference on how to handle txPhy and rxPhy.
2373  * @param txPhy - Bit field of Host preferred Tx PHY.
2374  * @param rxPhy - Bit field of Host preferred Rx PHY.
2375  *
2376  * output parameters
2377  *
2378  * @param None.
2379  *
2380  * @return hciStatus_t
2381  */
2382 extern hciStatus_t HCI_LE_SetPhyCmd( uint16 connHandle,
2383  uint8 allPhys,
2384  uint8 txPhy,
2385  uint8 rxPhy );
2386 
2387 
2388  /*******************************************************************************
2389  * @fn HCI_LE_EnhancedRxTestCmd API
2390  *
2391  * @brief This LE API is used to start a test where the DUT receives
2392  * reference packets at a fixed interval. The tester generates
2393  * the test reference packets.
2394  *
2395  * input parameters
2396  *
2397  * @param rxChan - Rx Channel k=0..39, where F=2402+(k*2MHz).
2398  * @param rxPhy - Rx PHY to use.
2399  * @param modIndex - HCI_DTM_STANDARD_MODULATION_INDEX,
2400  * HCI_DTM_STABLE_MODULATION_INDEX
2401  *
2402  * output parameters
2403  *
2404  * @param None.
2405  *
2406  * @return hciStatus_t
2407  */
2408 extern hciStatus_t HCI_LE_EnhancedRxTestCmd( uint8 rxChan,
2409  uint8 rxPhy,
2410  uint8 modIndex );
2411 
2412 
2413 /*******************************************************************************
2414  * @fn HCI_LE_EnhancedTxTestCmd API
2415  *
2416  * @brief This LE API is used to start a test where the DUT generates
2417  * test reference packets at a fixed interval. The Controller
2418  * shall transmit at maximum power.
2419  *
2420  * input parameters
2421  *
2422  * @param txChan - Tx RF channel k=0..39, where F=2402+(k*2MHz).
2423  * @param payloadLen - Byte length (0..37) in payload for each packet.
2424  * @param payloadType - The type of pattern to transmit.
2425  * @param txPhy - Tx PHY to use.
2426  *
2427  * output parameters
2428  *
2429  * @param None.
2430  *
2431  * @return hciStatus_t
2432  */
2433 extern hciStatus_t HCI_LE_EnhancedTxTestCmd( uint8 txChan,
2434  uint8 payloadLen,
2435  uint8 payloadType,
2436  uint8 txPhy );
2437 
2438 /*
2439 ** HCI Vendor Specific Commands: Link Layer Extensions
2440 */
2441 
2442 /*******************************************************************************
2443  * @fn HCI_EXT_SetRxGainCmd API
2444  *
2445  * @brief This HCI Extension API is used to set the receiver gain.
2446  *
2447  * Related Events: HCI_VendorSpecifcCommandCompleteEvent
2448  *
2449  * input parameters
2450  *
2451  * @param rxGain - HCI_EXT_RX_GAIN_STD, HCI_EXT_RX_GAIN_HIGH
2452  *
2453  * output parameters
2454  *
2455  * @param None.
2456  *
2457  * @return hciStatus_t
2458  */
2459 extern hciStatus_t HCI_EXT_SetRxGainCmd( uint8 rxGain );
2460 
2461 
2462 /*******************************************************************************
2463  * @fn HCI_EXT_SetTxPowerCmd API
2464  *
2465  * @brief This HCI Extension API is used to set the transmit power.
2466  *
2467  * Related Events: HCI_VendorSpecifcCommandCompleteEvent
2468  *
2469  * input parameters
2470  *
2471  * @param txPower - For CC254x: HCI_EXT_TX_POWER_MINUS_23_DBM,
2472  * HCI_EXT_TX_POWER_MINUS_6_DBM,
2473  * HCI_EXT_TX_POWER_0_DBM,
2474  * HCI_EXT_TX_POWER_4_DBM
2475  *
2476  * For CC26xx: HCI_EXT_TX_POWER_MINUS_21_DBM,
2477  * HCI_EXT_TX_POWER_MINUS_18_DBM,
2478  * HCI_EXT_TX_POWER_MINUS_15_DBM,
2479  * HCI_EXT_TX_POWER_MINUS_12_DBM,
2480  * HCI_EXT_TX_POWER_MINUS_9_DBM,
2481  * HCI_EXT_TX_POWER_MINUS_6_DBM,
2482  * HCI_EXT_TX_POWER_MINUS_3_DBM,
2483  * HCI_EXT_TX_POWER_0_DBM,
2484  * HCI_EXT_TX_POWER_1_DBM,
2485  * HCI_EXT_TX_POWER_2_DBM,
2486  * HCI_EXT_TX_POWER_3_DBM,
2487  * HCI_EXT_TX_POWER_4_DBM,
2488  * HCI_EXT_TX_POWER_5_DBM
2489  *
2490  * output parameters
2491  *
2492  * @param None.
2493  *
2494  * @return hciStatus_t
2495  */
2496 extern hciStatus_t HCI_EXT_SetTxPowerCmd( uint8 txPower );
2497 
2498 
2499 /*******************************************************************************
2500  * @fn HCI_EXT_OnePktPerEvtCmd API
2501  *
2502  * @brief This HCI Extension API is used to set whether a connection will
2503  * be limited to one packet per event.
2504  *
2505  * Related Events: HCI_VendorSpecifcCommandCompleteEvent
2506  *
2507  * input parameters
2508  *
2509  * @param control - HCI_EXT_ENABLE_ONE_PKT_PER_EVT,
2510  * HCI_EXT_DISABLE_ONE_PKT_PER_EVT
2511  *
2512  * output parameters
2513  *
2514  * @param None.
2515  *
2516  * @return hciStatus_t
2517  */
2518 extern hciStatus_t HCI_EXT_OnePktPerEvtCmd( uint8 control );
2519 
2520 
2521 /*******************************************************************************
2522  * @fn HCI_EXT_ClkDivOnHaltCmd API
2523  *
2524  * @brief This HCI Extension API is used to set whether the system clock
2525  * will be divided when the MCU is halted.
2526  *
2527  * Related Events: HCI_VendorSpecifcCommandCompleteEvent
2528  *
2529  * input parameters
2530  *
2531  * @param control - HCI_EXT_ENABLE_CLK_DIVIDE_ON_HALT,
2532  * HCI_EXT_DISABLE_CLK_DIVIDE_ON_HALT
2533  *
2534  * output parameters
2535  *
2536  * @param None.
2537  *
2538  * @return hciStatus_t
2539  */
2540 extern hciStatus_t HCI_EXT_ClkDivOnHaltCmd( uint8 control );
2541 
2542 
2543 /*******************************************************************************
2544  * @fn HCI_EXT_DeclareNvUsageCmd API
2545  *
2546  * @brief This HCI Extension API is used to indicate to the Controller
2547  * whether or not the Host will be using the NV memory during BLE
2548  * operations.
2549  *
2550  * Related Events: HCI_VendorSpecifcCommandCompleteEvent
2551  *
2552  * input parameters
2553  *
2554  * @param mode - HCI_EXT_NV_IN_USE, HCI_EXT_NV_NOT_IN_USE
2555  *
2556  * output parameters
2557  *
2558  * @param None.
2559  *
2560  * @return hciStatus_t
2561  */
2562 extern hciStatus_t HCI_EXT_DeclareNvUsageCmd( uint8 mode );
2563 
2564 
2565 /*******************************************************************************
2566  * @fn HCI_EXT_DecryptCmd API
2567  *
2568  * @brief This HCI Extension API is used to decrypt encrypted data using
2569  * AES128.
2570  *
2571  * Related Events: HCI_VendorSpecifcCommandCompleteEvent
2572  *
2573  * input parameters
2574  *
2575  * @param key - Pointer to 16 byte encryption key.
2576  * @param encText - Pointer to 16 byte encrypted data.
2577  *
2578  * output parameters
2579  *
2580  * @param None.
2581  *
2582  * @return hciStatus_t
2583  */
2584 extern hciStatus_t HCI_EXT_DecryptCmd( uint8 *key,
2585  uint8 *encText );
2586 
2587 
2588 /*******************************************************************************
2589  * @fn HCI_EXT_SetLocalSupportedFeaturesCmd API
2590  *
2591  * @brief This HCI Extension API is used to write this device's supported
2592  * features.
2593  *
2594  * Related Events: HCI_VendorSpecifcCommandCompleteEvent
2595  *
2596  * input parameters
2597  *
2598  * @param localFeatures - Pointer to eight bytes of local features.
2599  *
2600  * output parameters
2601  *
2602  * @param None.
2603  *
2604  * @return hciStatus_t
2605  */
2606 extern hciStatus_t HCI_EXT_SetLocalSupportedFeaturesCmd( uint8 *localFeatures );
2607 
2608 
2609 /*******************************************************************************
2610  * @fn HCI_EXT_SetFastTxResponseTimeCmd API
2611  *
2612  * @brief This HCI Extension API is used to set whether transmit data is
2613  * sent as soon as possible even when slave latency is used.
2614  *
2615  * Related Events: HCI_VendorSpecifcCommandCompleteEvent
2616  *
2617  * input parameters
2618  *
2619  * @param control - HCI_EXT_ENABLE_FAST_TX_RESP_TIME,
2620  * HCI_EXT_DISABLE_FAST_TX_RESP_TIME
2621  *
2622  * output parameters
2623  *
2624  * @param None.
2625  *
2626  * @return hciStatus_t
2627  */
2628 extern hciStatus_t HCI_EXT_SetFastTxResponseTimeCmd( uint8 control );
2629 
2630 
2631 /*******************************************************************************
2632  * @fn HCI_EXT_SetSlaveLatencyOverrideCmd API
2633  *
2634  * @brief This HCI Extension API is used to to enable or disable
2635  * suspending slave latency.
2636  *
2637  * Related Events: HCI_VendorSpecifcCommandCompleteEvent
2638  *
2639  * input parameters
2640  *
2641  * @param control - HCI_EXT_ENABLE_SL_OVERRIDE,
2642  * HCI_EXT_DISABLE_SL_OVERRIDE
2643  *
2644  * output parameters
2645  *
2646  * @param None.
2647  *
2648  * @return hciStatus_t
2649  */
2650 extern hciStatus_t HCI_EXT_SetSlaveLatencyOverrideCmd( uint8 control );
2651 
2652 
2653 /*******************************************************************************
2654  * @fn HCI_EXT_ModemTestTxCmd
2655  *
2656  * @brief This API is used start a continuous transmitter modem test,
2657  * using either a modulated or unmodulated carrier wave tone, at
2658  * the frequency that corresponds to the specified RF channel. Use
2659  * HCI_EXT_EndModemTest command to end the test.
2660  *
2661  * Note: A Controller reset will be issued by HCI_EXT_EndModemTest!
2662  * Note: The BLE device will transmit at maximum power.
2663  * Note: This API can be used to verify this device meets Japan's
2664  * TELEC regulations.
2665  *
2666  * Related Events: HCI_VendorSpecifcCommandCompleteEvent
2667  *
2668  * input parameters
2669  *
2670  * @param cwMode - HCI_EXT_TX_MODULATED_CARRIER,
2671  * HCI_EXT_TX_UNMODULATED_CARRIER
2672  * txChan - Transmit RF channel k=0..39, where BLE F=2402+(k*2MHz).
2673  *
2674  * output parameters
2675  *
2676  * @param None.
2677  *
2678  * @return hciStatus_t
2679  */
2680 extern hciStatus_t HCI_EXT_ModemTestTxCmd( uint8 cwMode,
2681  uint8 txChan );
2682 
2683 
2684 /*******************************************************************************
2685  * @fn HCI_EXT_ModemHopTestTxCmd
2686  *
2687  * @brief This API is used to start a continuous transmitter direct test
2688  * mode test using a modulated carrier wave and transmitting a
2689  * 37 byte packet of Pseudo-Random 9-bit data. A packet is
2690  * transmitted on a different frequency (linearly stepping through
2691  * all RF channels 0..39) every 625us. Use HCI_EXT_EndModemTest
2692  * command to end the test.
2693  *
2694  * Note: A Controller reset will be issued by HCI_EXT_EndModemTest!
2695  * Note: The BLE device will transmit at maximum power.
2696  * Note: This API can be used to verify this device meets Japan's
2697  * TELEC regulations.
2698  *
2699  * input parameters
2700  *
2701  * @param None.
2702  *
2703  * output parameters
2704  *
2705  * @param None.
2706  *
2707  * @return hciStatus_t
2708  */
2709 extern hciStatus_t HCI_EXT_ModemHopTestTxCmd( void );
2710 
2711 
2712 /*******************************************************************************
2713  * @fn HCI_EXT_ModemTestRxCmd
2714  *
2715  * @brief This API is used to start a continuous receiver modem test
2716  * using a modulated carrier wave tone, at the frequency that
2717  * corresponds to the specific RF channel. Any received data is
2718  * discarded. Receiver gain may be adjusted using the
2719  * HCI_EXT_SetRxGain command. RSSI may be read during this test
2720  * by using the HCI_ReadRssi command. Use HCI_EXT_EndModemTest
2721  * command to end the test.
2722  *
2723  * Note: A Controller reset will be issued by HCI_EXT_EndModemTest!
2724  * Note: The BLE device will transmit at maximum power.
2725  *
2726  * input parameters
2727  *
2728  * @param rxChan - Receiver RF channel k=0..39, where BLE F=2402+(k*2MHz).
2729  *
2730  * output parameters
2731  *
2732  * @param None.
2733  *
2734  * @return hciStatus_t
2735  */
2736 extern hciStatus_t HCI_EXT_ModemTestRxCmd( uint8 rxChan );
2737 
2738 
2739 /*******************************************************************************
2740  * @fn HCI_EXT_EndModemTestCmd
2741  *
2742  * @brief This API is used to shutdown a modem test. A complete Controller
2743  * reset will take place.
2744  *
2745  * input parameters
2746  *
2747  * @param None.
2748  *
2749  * output parameters
2750  *
2751  * @param None.
2752  *
2753  * @return hciStatus_t
2754  */
2755 extern hciStatus_t HCI_EXT_EndModemTestCmd( void );
2756 
2757 
2758 /*******************************************************************************
2759  * @fn HCI_EXT_SetBDADDRCmd
2760  *
2761  * @brief This API is used to set this device's BLE address (BDADDR).
2762  *
2763  * Note: This command is only allowed when the device's state is
2764  * Standby.
2765  *
2766  * Related Events: HCI_VendorSpecifcCommandCompleteEvent
2767  *
2768  * input parameters
2769  *
2770  * @param bdAddr - A pointer to a buffer to hold this device's address.
2771  * An invalid address (i.e. all FF's) will restore this
2772  * device's address to the address set at initialization.
2773  *
2774  * output parameters
2775  *
2776  * @param None.
2777  *
2778  * @return hciStatus_t
2779  */
2780 extern hciStatus_t HCI_EXT_SetBDADDRCmd( uint8 *bdAddr );
2781 
2782 
2783 /*******************************************************************************
2784  * @fn HCI_EXT_SetSCACmd
2785  *
2786  * @brief This API is used to set this device's Sleep Clock Accuracy.
2787  *
2788  * Note: For a slave device, this value is directly used, but only
2789  * if power management is enabled. For a master device, this
2790  * value is converted into one of eight ordinal values
2791  * representing a SCA range, as specified in Table 2.2,
2792  * Vol. 6, Part B, Section 2.3.3.1 of the Core specification.
2793  *
2794  * Note: This command is only allowed when the device is not in a
2795  * connection.
2796  *
2797  * Note: The device's SCA value remains unaffected by a HCI_Reset.
2798  *
2799  * input parameters
2800  *
2801  * @param scaInPPM - A SCA value in PPM from 0..500.
2802  *
2803  * output parameters
2804  *
2805  * @param None.
2806  *
2807  * @return hciStatus_t
2808  */
2809 extern hciStatus_t HCI_EXT_SetSCACmd( uint16 scaInPPM );
2810 
2811 
2812 /*******************************************************************************
2813  * @fn HCI_EXT_EnablePTMCmd
2814  *
2815  * @brief This HCI Extension API is used to enable Production Test Mode.
2816  *
2817  * Note: This function can only be directly called from the
2818  * application and is not available via an external transport
2819  * interface such as RS232. Also, no vendor specific
2820  * command complete will be returned.
2821  *
2822  * input parameters
2823  *
2824  * @param None.
2825  *
2826  * output parameters
2827  *
2828  * @param None.
2829  *
2830  * @return hciStatus_t
2831  */
2832 extern hciStatus_t HCI_EXT_EnablePTMCmd( void );
2833 
2834 
2835 /*******************************************************************************
2836  * @fn HCI_EXT_SetFreqTuneCmd
2837  *
2838  * @brief This HCI Extension API is used to set the frequency tuning up
2839  * or down. Setting the mode up/down decreases/increases the amount
2840  * of capacitance on the external crystal oscillator.
2841  *
2842  * Note: This is a Production Test Mode only command!
2843  *
2844  * input parameters
2845  *
2846  * @param step - HCI_PTM_SET_FREQ_TUNE_UP, HCI_PTM_SET_FREQ_TUNE_DOWN
2847  *
2848  * output parameters
2849  *
2850  * @param None.
2851  *
2852  * @return hciStatus_t
2853  */
2854 extern hciStatus_t HCI_EXT_SetFreqTuneCmd( uint8 step );
2855 
2856 
2857 /*******************************************************************************
2858  * @fn HCI_EXT_SaveFreqTuneCmd
2859  *
2860  * @brief This HCI Extension API is used to save the frequency tuning
2861  * value to flash.
2862  *
2863  * Note: This is a Production Test Mode only command!
2864  *
2865  * input parameters
2866  *
2867  * @param None.
2868  *
2869  * output parameters
2870  *
2871  * @param None.
2872  *
2873  * @return hciStatus_t
2874  */
2875 extern hciStatus_t HCI_EXT_SaveFreqTuneCmd( void );
2876 
2877 
2878 /*******************************************************************************
2879  * @fn HCI_EXT_SetMaxDtmTxPowerCmd API
2880  *
2881  * @brief This HCI Extension API is used to set the maximum transmit
2882  * output power for Direct Test Mode.
2883  *
2884  * Related Events: HCI_VendorSpecifcCommandCompleteEvent
2885  *
2886  * input parameters
2887  *
2888  * @param txPower - For CC254x: LL_EXT_TX_POWER_MINUS_23_DBM,
2889  * LL_EXT_TX_POWER_MINUS_6_DBM,
2890  * LL_EXT_TX_POWER_0_DBM,
2891  * LL_EXT_TX_POWER_4_DBM
2892  *
2893  * For CC26xx: HCI_EXT_TX_POWER_MINUS_21_DBM,
2894  * HCI_EXT_TX_POWER_MINUS_18_DBM,
2895  * HCI_EXT_TX_POWER_MINUS_15_DBM,
2896  * HCI_EXT_TX_POWER_MINUS_12_DBM,
2897  * HCI_EXT_TX_POWER_MINUS_9_DBM,
2898  * HCI_EXT_TX_POWER_MINUS_6_DBM,
2899  * HCI_EXT_TX_POWER_MINUS_3_DBM,
2900  * HCI_EXT_TX_POWER_0_DBM,
2901  * HCI_EXT_TX_POWER_1_DBM,
2902  * HCI_EXT_TX_POWER_2_DBM,
2903  * HCI_EXT_TX_POWER_3_DBM,
2904  * HCI_EXT_TX_POWER_4_DBM,
2905  * HCI_EXT_TX_POWER_5_DBM
2906  *
2907  * output parameters
2908  *
2909  * @param None.
2910  *
2911  * @return hciStatus_t
2912  */
2913 extern hciStatus_t HCI_EXT_SetMaxDtmTxPowerCmd( uint8 txPower );
2914 
2915 
2916 /*******************************************************************************
2917  * @fn HCI_EXT_MapPmIoPortCmd Vendor Specific API
2918  *
2919  * @brief This HCI Extension API is used to configure and map a CC254x I/O
2920  * Port as a General Purpose I/O (GPIO) output signal that reflects
2921  * the Power Management (PM) state of the CC254x device. The GPIO
2922  * output will be High on Wake, and Low upon entering Sleep. This
2923  * feature can be disabled by specifying HCI_EXT_PM_IO_PORT_NONE
2924  * for the ioPort (ioPin is then ignored). The system default value
2925  * upon hardware reset is disabled. This command can be used to
2926  * control an external DC-DC Converter (its actual intent) such has
2927  * the TI TPS62730 (or any similar converter that works the same
2928  * way). This command should be used with extreme care as it will
2929  * override how the Port/Pin was previously configured! This
2930  * includes the mapping of Port 0 pins to 32kHz clock output,
2931  * Analog I/O, UART, Timers; Port 1 pins to Observables, Digital
2932  * Regulator status, UART, Timers; Port 2 pins to an external 32kHz
2933  * XOSC. The selected Port/Pin will be configured as an output GPIO
2934  * with interrupts masked. Careless use can result in a
2935  * reconfiguration that could disrupt the system. It is therefore
2936  * the user's responsibility to ensure the selected Port/Pin does
2937  * not cause any conflicts in the system.
2938  *
2939  * Note: Only Pins 0, 3 and 4 are valid for Port 2 since Pins 1
2940  * and 2 are mapped to debugger signals DD and DC.
2941  *
2942  * Note: Port/Pin signal change will only occur when Power Savings
2943  * is enabled.
2944  *
2945  * input parameters
2946  *
2947  * @param ioPort - HCI_EXT_PM_IO_PORT_P0,
2948  * HCI_EXT_PM_IO_PORT_P1,
2949  * HCI_EXT_PM_IO_PORT_P2,
2950  * HCI_EXT_PM_IO_PORT_NONE
2951  *
2952  * @param ioPin - HCI_EXT_PM_IO_PORT_PIN0,
2953  * HCI_EXT_PM_IO_PORT_PIN1,
2954  * HCI_EXT_PM_IO_PORT_PIN2,
2955  * HCI_EXT_PM_IO_PORT_PIN3,
2956  * HCI_EXT_PM_IO_PORT_PIN4,
2957  * HCI_EXT_PM_IO_PORT_PIN5,
2958  * HCI_EXT_PM_IO_PORT_PIN6,
2959  * HCI_EXT_PM_IO_PORT_PIN7
2960  *
2961  * output parameters
2962  *
2963  * @param None.
2964  *
2965  * @return hciStatus_t
2966  */
2967 extern hciStatus_t HCI_EXT_MapPmIoPortCmd( uint8 ioPort, uint8 ioPin );
2968 
2969 
2970 /*******************************************************************************
2971  * @fn HCI_EXT_DisconnectImmedCmd API
2972  *
2973  * @brief This HCI Extension API is used to disconnect the connection
2974  * immediately.
2975  *
2976  * Note: The connection (if valid) is immediately terminated
2977  * without notifying the remote device. The Host is still
2978  * notified.
2979  *
2980  * input parameters
2981  *
2982  * @param connHandle - Connection handle.
2983  *
2984  * output parameters
2985  *
2986  * @param None.
2987  *
2988  * @return hciStatus_t
2989  */
2990 extern hciStatus_t HCI_EXT_DisconnectImmedCmd( uint16 connHandle );
2991 
2992 
2993 /*******************************************************************************
2994  * @fn HCI_EXT_PacketErrorRate Vendor Specific API
2995  *
2996  * @brief This function is used to Reset or Read the Packet Error Rate
2997  * counters for a connection.
2998  *
2999  * Note: The counters are only 16 bits. At the shortest connection
3000  * interval, this provides a bit over 8 minutes of data.
3001  *
3002  * input parameters
3003  *
3004  * @param connHandle - The LL connection ID on which to send this data.
3005  * @param command - HCI_EXT_PER_RESET, HCI_EXT_PER_READ
3006  *
3007  * output parameters
3008  *
3009  * @param None.
3010  *
3011  * @return hciStatus_t
3012  */
3013 extern hciStatus_t HCI_EXT_PacketErrorRateCmd( uint16 connHandle, uint8 command );
3014 
3015 
3016 /*******************************************************************************
3017  * @fn HCI_EXT_PERbyChanCmd Vendor Specific API
3018  *
3019  * @brief This HCI Extension API is used to start or end Packet Error Rate
3020  * by Channel counter accumulation for a connection. If the
3021  * pointer is not NULL, it is assumed there is sufficient memory
3022  * for the PER data, per the type perByChan_t. If NULL, then
3023  * the operation is considered disabled.
3024  *
3025  * Note: It is the user's responsibility to make sure there is
3026  * sufficient memory for the data, and that the counters
3027  * are cleared prior to first use.
3028  *
3029  * Note: The counters are only 16 bits. At the shortest connection
3030  * interval, this provides a bit over 8 minutes of data.
3031  *
3032  * input parameters
3033  *
3034  * @param connHandle - The LL connection ID on which to send this data.
3035  * @param perByChan - Pointer to PER by Channel data, or NULL.
3036  *
3037  * output parameters
3038  *
3039  * @param None.
3040  *
3041  * @return hciStatus_t
3042  */
3043 extern hciStatus_t HCI_EXT_PERbyChanCmd( uint16 connHandle, perByChan_t *perByChan );
3044 
3045 
3046 /*******************************************************************************
3047  * @fn HCI_EXT_ExtendRfRangeCmd API
3048  *
3049  * @brief This HCI Extension API is used to Extend Rf Range using the TI
3050  * CC2590 2.4 GHz RF Front End device.
3051  *
3052  * Related Events: HCI_VendorSpecifcCommandCompleteEvent
3053  *
3054  * input parameters
3055  *
3056  * @param None.
3057  *
3058  * output parameters
3059  *
3060  * @param None.
3061  *
3062  * @return hciStatus_t
3063  */
3064 extern hciStatus_t HCI_EXT_ExtendRfRangeCmd( void );
3065 
3066 
3067 /*******************************************************************************
3068  * @fn HCI_EXT_HaltDuringRfCmd API
3069  *
3070  * @brief This HCI Extension API is used to enable or disable halting the
3071  * CPU during RF. The system defaults to enabled.
3072  *
3073  * Related Events: HCI_VendorSpecifcCommandCompleteEvent
3074  *
3075  * input parameters
3076  *
3077  * @param mode - HCI_EXT_HALT_DURING_RF_ENABLE,
3078  * HCI_EXT_HALT_DURING_RF_DISABLE
3079  *
3080  * output parameters
3081  *
3082  * @param None.
3083  *
3084  * @return hciStatus_t
3085  */
3086 extern hciStatus_t HCI_EXT_HaltDuringRfCmd( uint8 mode );
3087 
3088 
3089 /*******************************************************************************
3090  * @fn HCI_EXT_AdvEventNoticeCmd Vendor Specific API
3091  *
3092  * @brief This HCI Extension API is used to enable or disable a
3093  * notification to the specified task using the specified task
3094  * event whenever a Adv event ends. A non-zero taskEvent value is
3095  * taken to be "enable", while a zero valued taskEvent is taken
3096  * to be "disable".
3097  *
3098  * input parameters
3099  *
3100  * @param taskID - User's task ID.
3101  * @param taskEvent - User's task event.
3102  *
3103  * output parameters
3104  *
3105  * @param None.
3106  *
3107  * @return hciStatus_t
3108  */
3109 extern hciStatus_t HCI_EXT_AdvEventNoticeCmd( uint8 taskID, uint16 taskEvent );
3110 
3111 
3112 /*******************************************************************************
3113  * @fn HCI_EXT_ScanEventNoticeCmd Vendor Specific API
3114  *
3115  * @brief This HCI Extension API is used to enable or disable a
3116  * notification to the specified task using the specified task
3117  * event whenever a Scan event ends. A non-zero taskEvent value is
3118  * taken to be "enable", while a zero valued taskEvent is taken
3119  * to be "disable".
3120  *
3121  * input parameters
3122  *
3123  * @param taskID - User's task ID.
3124  * @param taskEvent - User's task event.
3125  *
3126  * output parameters
3127  *
3128  * @param None.
3129  *
3130  * @return hciStatus_t
3131  */
3132 extern hciStatus_t HCI_EXT_ScanEventNoticeCmd( uint8 taskID, uint16 taskEvent );
3133 
3134 
3135 /*******************************************************************************
3136  * @fn HCI_EXT_ConnEventNoticeCmd Vendor Specific API
3137  *
3138  * @brief This HCI Extension API is used to enable or disable a
3139  * notification to the specified task using the specified task
3140  * event whenever a Connection event ends. A non-zero taskEvent
3141  * value is taken to be "enable", while a zero valued taskEvent
3142  * taken to be "disable".
3143  *
3144  * Note: This command does not check if the taskID and/or taskEvent are valid!
3145  *
3146  * input parameters
3147  *
3148  * @param connHandle - The HCI connection ID for connection event notice.
3149  * @param taskID - User's task ID.
3150  * @param taskEvent - User's task event.
3151  *
3152  * output parameters
3153  *
3154  * @param None.
3155  *
3156  * @return hciStatus_t
3157  */
3158 extern hciStatus_t HCI_EXT_ConnEventNoticeCmd( uint16 connHandle, uint8 taskID, uint16 taskEvent );
3159 
3160 
3161 /*******************************************************************************
3162  * @fn HCI_EXT_BuildRevisionCmd Vendor Specific API
3163  *
3164  * @brief This HCI Extension API is used set a user revision number or
3165  * read the build revision number.
3166  *
3167  * input parameters
3168  *
3169  * @param mode - HCI_EXT_SET_USER_REVISION | HCI_EXT_READ_BUILD_REVISION
3170  *
3171  * output parameters
3172  *
3173  * @param None.
3174  *
3175  * @return hciStatus_t
3176  */
3177 extern hciStatus_t HCI_EXT_BuildRevisionCmd( uint8 mode, uint16 userRevNum );
3178 
3179 
3180 /*******************************************************************************
3181  * @fn HCI_EXT_DelaySleepCmd Vendor Specific API
3182  *
3183  * @brief This HCI Extension API is used set the sleep delay.
3184  *
3185  * input parameters
3186  *
3187  * @param delay - 0..1000, in milliseconds.
3188  *
3189  * output parameters
3190  *
3191  * @param None.
3192  *
3193  * @return hciStatus_t
3194  */
3195 extern hciStatus_t HCI_EXT_DelaySleepCmd( uint16 delay );
3196 
3197 
3198 /*******************************************************************************
3199  * @fn HCI_EXT_ResetSystemCmd Vendor Specific API
3200  *
3201  * @brief This HCI Extension API is used to issue a soft or hard
3202  * system reset.
3203  *
3204  * input parameters
3205  *
3206  * @param mode - HCI_EXT_RESET_SYSTEM_HARD | HCI_EXT_RESET_SYSTEM_SOFT
3207  *
3208  * output parameters
3209  *
3210  * @param None.
3211  *
3212  * @return hciStatus_t
3213  */
3214 extern hciStatus_t HCI_EXT_ResetSystemCmd( uint8 mode );
3215 
3216 
3217 /*******************************************************************************
3218  * @fn HCI_EXT_LLTestModeCmd Vendor Specific API
3219  *
3220  * @brief This HCI Extension API is used to send a LL Test Mode test case.
3221  *
3222  * input parameters
3223  *
3224  * @param testCase - See list of defines in ll_common.h.
3225  *
3226  * output parameters
3227  *
3228  * @param None.
3229  *
3230  * @return hciStatus_t
3231  */
3232 extern hciStatus_t HCI_EXT_LLTestModeCmd( uint8 testCase );
3233 
3234 
3235 /*******************************************************************************
3236  * @fn HCI_EXT_OverlappedProcessingCmd Vendor Specific API
3237  *
3238  * @brief This HCI Extension API is used to enable or disable overlapped
3239  * processing.
3240  *
3241  * input parameters
3242  *
3243  * @param mode - HCI_EXT_ENABLE_OVERLAPPED_PROCESSING |
3244  * HCI_EXT_DISABLE_OVERLAPPED_PROCESSING
3245  *
3246  * output parameters
3247  *
3248  * @param None.
3249  *
3250  * @return hciStatus_t
3251  */
3252 extern hciStatus_t HCI_EXT_OverlappedProcessingCmd( uint8 mode );
3253 
3254 
3255 /*******************************************************************************
3256  * @fn HCI_EXT_NumComplPktsLimitCmd Vendor Specific API
3257  *
3258  * @brief This HCI Extension API is used to set the minimum number of
3259  * completed packets which must be met before a Number of
3260  * Completed Packets event is returned. If the limit is not
3261  * reach by the end of the connection event, then a Number of
3262  * Completed Packets event will be returned (if non-zero) based
3263  * on the flushOnEvt flag.
3264  *
3265  * input parameters
3266  *
3267  * @param limit - From 1 to HCI_MAX_NUM_DATA_BUFFERS.
3268  * @param flushOnEvt - HCI_EXT_DISABLE_NUM_COMPL_PKTS_ON_EVENT |
3269  * HCI_EXT_ENABLE_NUM_COMPL_PKTS_ON_EVENT
3270  *
3271  * output parameters
3272  *
3273  * @param None.
3274  *
3275  * @return hciStatus_t
3276  */
3277 extern hciStatus_t HCI_EXT_NumComplPktsLimitCmd( uint8 limit,
3278  uint8 flushOnEvt );
3279 
3280 
3281 /*******************************************************************************
3282  * @fn HCI_EXT_GetConnInfoCmd Vendor Specific API
3283  *
3284  * @brief This API is used to get connection related information, which
3285  * includes the number of allocated connections, the number of
3286  * active connections, and for each active connection, the
3287  * connection ID, the connection role (Master or Slave), the peer
3288  * address and peer address type. The number of allocated
3289  * connections is based on a default build value that can be
3290  * changed using MAX_NUM_BLE_CONNS. The number of active
3291  * connections refers to active BLE connections.
3292  *
3293  * Note: If all the parameters are NULL, then the command is assumed to have
3294  * originated from the transport layer. Otherwise, they are assumed to
3295  * have originated from a direct call by the Application and any
3296  * non-NULL pointer will be directly used.
3297  *
3298  * input parameters
3299  *
3300  * @param numAllocConns - Pointer for number of build time connections.
3301  * @param numActiveConns - Pointer for number of active BLE connections.
3302  * @param activeConnInfo - Pointer for active connection information.
3303  *
3304  * output parameters
3305  *
3306  * @param numAllocConns - Number of build time connections allowed.
3307  * @param numActiveConns - Number of active BLE connections.
3308  * @param activeConnInfo - Active connection information.
3309  *
3310  * @return hciStatus_t
3311  */
3312 extern hciStatus_t HCI_EXT_GetConnInfoCmd( uint8 *numAllocConns,
3313  uint8 *numActiveConns,
3314  hciConnInfo_t *activeConnInfo );
3315 
3316 
3317 /*******************************************************************************
3318  * @fn HCI_EXT_SetMaxDataLenCmd API
3319  *
3320  * @brief This LE API is used to set the maximum supported Rx and Tx
3321  * Octets (in bytes) and Time (in us).
3322  *
3323  * Note: Any parameter not within a valid range will leave the
3324  * corresponding supportedMax value unchanged.
3325  *
3326  * input parameters
3327  *
3328  * @param txOctets - Value of maximum supported Tx octets (in bytes).
3329  * @param txTime - Value of maximum supported Tx time (in us).
3330  * @param rxOctets - Value of maximum supported Rx octets (in bytes).
3331  * @param rxTime - Value of maximum supported Rx time (in us).
3332  *
3333  * output parameters
3334  *
3335  * @param None.
3336  *
3337  * @return hciStatus_t
3338  */
3339 extern hciStatus_t HCI_EXT_SetMaxDataLenCmd( uint16 txOctets,
3340  uint16 txTime,
3341  uint16 rxOctets,
3342  uint16 rxTime );
3343 
3344 
3345 /*******************************************************************************
3346  * @fn HCI_EXT_ScanReqRptCmd API
3347  *
3348  * @brief This LE API is used to enable/disable Scan Request Reports.
3349  *
3350  * input parameters
3351  *
3352  * @param mode - HCI_EXT_DISABLE_SCAN_REQUEST_REPORT |
3353  * HCI_EXT_ENABLE_SCAN_REQUEST_REPORT
3354  *
3355  * output parameters
3356  *
3357  * @param None.
3358  *
3359  * @return hciStatus_t
3360  */
3361 extern hciStatus_t HCI_EXT_ScanReqRptCmd( uint8 mode );
3362 
3363 
3364 /*******************************************************************************
3365  * @fn HCI_EXT_ScanReqRptCmd API
3366  *
3367  * @brief This LE API is used to enable/disable Scan Request Reports.
3368  *
3369  * input parameters
3370  *
3371  * @param mode - HCI_EXT_DISABLE_SCAN_REQUEST_REPORT |
3372  * HCI_EXT_ENABLE_SCAN_REQUEST_REPORT
3373  *
3374  * output parameters
3375  *
3376  * @param None.
3377  *
3378  * @return hciStatus_t
3379  */
3380 extern hciStatus_t HCI_EXT_ScanReqRptCmd( uint8 mode );
3381 
3382 
3383 #ifdef __cplusplus
3384 }
3385 #endif
3386 
3387 #endif /* HCI_H */
Definition: hci.h:387
Definition: hci.h:597
#define B_ADDR_LEN
Default Public and Random Address Length.
Definition: bcomdef.h:114
Definition: hci.h:432
Definition: hci.h:542
Definition: hci.h:461
Definition: hci.h:563
Definition: hci.h:470
Definition: hci.h:479
Definition: hci.h:370
Definition: hci.h:452
Definition: hci.h:410
Definition: hci.h:585
Definition: hci.h:621
Definition: hci.h:352
Definition: osal.h:89
#define B_MAX_ADV_LEN
BLE Maximum Advertising Packet Length.
Definition: bcomdef.h:129
Definition: hci.h:396
Definition: hci.h:518
Definition: hci.h:495
Definition: hci.h:579
Definition: hci.h:488
Definition: hci.h:511
Definition: hci.h:531
Definition: hci.h:609
Definition: hci.h:572
#define B_RANDOM_NUM_SIZE
BLE Random Number Size.
Definition: bcomdef.h:132
Definition: hci.h:336
Definition: hci.h:504
Definition: hci.h:377
Definition: hci.h:442