Mistake on this page?
Report an issue in GitHub or email us
dm_api.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file
4  *
5  * \brief Device Manager subsystem API.
6  *
7  * Copyright (c) 2016-2019 Arm Ltd. All Rights Reserved.
8  *
9  * Copyright (c) 2019-2020 Packetcraft, Inc.
10  *
11  * Licensed under the Apache License, Version 2.0 (the "License");
12  * you may not use this file except in compliance with the License.
13  * You may obtain a copy of the License at
14  *
15  * http://www.apache.org/licenses/LICENSE-2.0
16  *
17  * Unless required by applicable law or agreed to in writing, software
18  * distributed under the License is distributed on an "AS IS" BASIS,
19  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  * See the License for the specific language governing permissions and
21  * limitations under the License.
22  */
23 /*************************************************************************************************/
24 #ifndef DM_API_H
25 #define DM_API_H
26 
27 #include "hci_api.h"
28 #include "cfg_stack.h"
29 #include "smp_defs.h"
30 #include "sec_api.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 /*! \addtogroup STACK_DM_API
37  * \{ */
38 
39 /**************************************************************************************************
40  Macros
41 **************************************************************************************************/
42 
43 /** \name GAP Device Role
44  * Connectable GAP Roles.
45  */
46 /**@{*/
47 #define DM_ROLE_MASTER HCI_ROLE_MASTER /*!< \brief Role is master */
48 #define DM_ROLE_SLAVE HCI_ROLE_SLAVE /*!< \brief Role is slave */
49 /**@}*/
50 
51 /** \name GAP Discovery Mode
52  * When setup as a discoverable device, these are the possible modes of discovery.
53  */
54 /**@{*/
55 #define DM_DISC_MODE_NONE 0 /*!< \brief GAP non-discoverable */
56 #define DM_DISC_MODE_LIMITED 1 /*!< \brief GAP limited discoverable mode */
57 #define DM_DISC_MODE_GENERAL 2 /*!< \brief GAP general discoverable mode */
58 /**@}*/
59 
60 /** \name GAP Advertising Type
61  * Type of connectable or disconverable advertising to perform.
62  */
63 /**@{*/
64 #define DM_ADV_CONN_UNDIRECT 0 /*!< \brief Connectable and scannable undirected advertising */
65 #define DM_ADV_CONN_DIRECT 1 /*!< \brief Connectable directed advertising */
66 #define DM_ADV_SCAN_UNDIRECT 2 /*!< \brief Scannable undirected advertising */
67 #define DM_ADV_NONCONN_UNDIRECT 3 /*!< \brief Non-connectable and non-scannable undirected advertising */
68 #define DM_ADV_CONN_DIRECT_LO_DUTY 4 /*!< \brief Connectable directed low duty cycle advertising */
69 /**@}*/
70 
71 /** \name GAP AE Advertising Types
72  * Advertising extension types - AE only.
73  */
74 /**@{*/
75 #define DM_EXT_ADV_CONN_UNDIRECT 5 /*!< \brief Connectable undirected advertising */
76 #define DM_EXT_ADV_NONCONN_DIRECT 6 /*!< \brief Non-connectable and non-scannable directed advertising */
77 #define DM_EXT_ADV_SCAN_DIRECT 7 /*!< \brief Scannable directed advertising */
78 #define DM_ADV_NONE 255 /*!< \brief For internal use only */
79 /**@}*/
80 
81 /** \name GAP Advertising Report Type
82  * Type of an advertising report observed while scanning.
83  */
84 /**@{*/
85 #define DM_RPT_CONN_UNDIRECT 0 /*!< \brief Connectable and scannable undirected advertising */
86 #define DM_RPT_CONN_DIRECT 1 /*!< \brief Connectable directed advertising */
87 #define DM_RPT_SCAN_UNDIRECT 2 /*!< \brief Scannable undirected advertising */
88 #define DM_RPT_NONCONN_UNDIRECT 3 /*!< \brief Non-connectable undirected advertising */
89 #define DM_RPT_SCAN_RESPONSE 4 /*!< \brief Scan response */
90 /**@}*/
91 
92 /** \name GAP Advertising Data Location
93  * Whether data is located in the advertising data or in the scan response data
94  */
95 /**@{*/
96 #define DM_DATA_LOC_ADV 0 /*!< \brief Locate data in the advertising data */
97 #define DM_DATA_LOC_SCAN 1 /*!< \brief Locate data in the scan response data */
98 /**@}*/
99 
100 /** \name GAP Scan Type
101  * When setup as a connectable or observer device, this is the type of scanning to perform.
102  */
103 /**@{*/
104 #define DM_SCAN_TYPE_PASSIVE 0 /*!< \brief Passive scan */
105 #define DM_SCAN_TYPE_ACTIVE 1 /*!< \brief Active scan */
106 /**@}*/
107 
108 /** \name GAP Advertising Channel Map
109  * Advertising channel map codes
110  */
111 /**@{*/
112 #define DM_ADV_CHAN_37 HCI_ADV_CHAN_37 /*!< \brief Advertising channel 37 */
113 #define DM_ADV_CHAN_38 HCI_ADV_CHAN_38 /*!< \brief Advertising channel 38 */
114 #define DM_ADV_CHAN_39 HCI_ADV_CHAN_39 /*!< \brief Advertising channel 39 */
115 /*! \brief All advertising channels */
116 #define DM_ADV_CHAN_ALL (HCI_ADV_CHAN_37 | HCI_ADV_CHAN_38 | HCI_ADV_CHAN_39)
117 /**@}*/
118 
119 /** \name DM Client IDs
120  * The client ID parameter to function DmConnRegister()
121  */
122 /**@{*/
123 #define DM_CLIENT_ID_ATT 0 /*!< \brief Identifier for attribute protocol, for internal use only */
124 #define DM_CLIENT_ID_SMP 1 /*!< \brief Identifier for security manager protocol, for internal use only */
125 #define DM_CLIENT_ID_DM 2 /*!< \brief Identifier for device manager, for internal use only */
126 #define DM_CLIENT_ID_APP 3 /*!< \brief Identifier for the application */
127 #define DM_CLIENT_ID_L2C 4 /*!< \brief Identifier for L2CAP */
128 #define DM_CLIENT_ID_MAX 5 /*!< \brief For internal use only */
129 /**@}*/
130 
131 /** \name DM Unknown IDs
132  * Values for unknown or unspecificed device identifiers.
133  */
134 /**@{*/
135 /*! \brief Unknown connection ID or other error */
136 #define DM_CONN_ID_NONE 0
137 
138 /*! \brief Unknown sync ID or other error */
139 #define DM_SYNC_ID_NONE 0
140 
141 /*! \brief Unknown Connected Isochronous Group (CIG) ID or other error */
142 #define DM_CIG_ID_NONE 0xFF
143 
144 /*! \brief Unknown Connected Isochronous Stream (CIS) ID or other error */
145 #define DM_CIS_ID_NONE 0xFF
146 /**@}*/
147 
148 /** \name GAP Address Type
149  * The address type to use over the air or that is associated with a received address.
150  */
151 /**@{*/
152 #define DM_ADDR_PUBLIC 0x00 /*!< \brief Public device address */
153 #define DM_ADDR_RANDOM 0x01 /*!< \brief Random device address */
154 #define DM_ADDR_PUBLIC_IDENTITY 0x02 /*!< \brief Public identity address (corresponds to resolved private address) */
155 #define DM_ADDR_RANDOM_IDENTITY 0x03 /*!< \brief Random (static) identity address (corresponds to resolved private address) */
156 #define DM_ADDR_RANDOM_UNRESOLVED 0xFE /*!< \brief Random device address (Controller unable to resolve) */
157 #define DM_ADDR_NONE 0xFF /*!< \brief No address provided (anonymous) */
158 /**@}*/
159 
160 /** \name GAP Advertising Data Types
161  * Advertising data types flags.
162  */
163 /**@{*/
164 #define DM_ADV_TYPE_FLAGS 0x01 /*!< \brief Flag bits */
165 #define DM_ADV_TYPE_16_UUID_PART 0x02 /*!< \brief Partial list of 16 bit UUIDs */
166 #define DM_ADV_TYPE_16_UUID 0x03 /*!< \brief Complete list of 16 bit UUIDs */
167 #define DM_ADV_TYPE_32_UUID_PART 0x04 /*!< \brief Partial list of 32 bit UUIDs */
168 #define DM_ADV_TYPE_32_UUID 0x05 /*!< \brief Complete list of 32 bit UUIDs */
169 #define DM_ADV_TYPE_128_UUID_PART 0x06 /*!< \brief Partial list of 128 bit UUIDs */
170 #define DM_ADV_TYPE_128_UUID 0x07 /*!< \brief Complete list of 128 bit UUIDs */
171 #define DM_ADV_TYPE_SHORT_NAME 0x08 /*!< \brief Shortened local name */
172 #define DM_ADV_TYPE_LOCAL_NAME 0x09 /*!< \brief Complete local name */
173 #define DM_ADV_TYPE_TX_POWER 0x0A /*!< \brief TX power level */
174 #define DM_ADV_TYPE_SM_TK_VALUE 0x10 /*!< \brief Security manager TK value */
175 #define DM_ADV_TYPE_SM_OOB_FLAGS 0x11 /*!< \brief Security manager OOB flags */
176 #define DM_ADV_TYPE_CONN_INTERVAL 0x12 /*!< \brief Slave preferred connection interval */
177 #define DM_ADV_TYPE_SIGNED_DATA 0x13 /*!< \brief Signed data */
178 #define DM_ADV_TYPE_16_SOLICIT 0x14 /*!< \brief Service soliticiation list of 16 bit UUIDs */
179 #define DM_ADV_TYPE_128_SOLICIT 0x15 /*!< \brief Service soliticiation list of 128 bit UUIDs */
180 #define DM_ADV_TYPE_SERVICE_DATA 0x16 /*!< \brief Service data - 16-bit UUID */
181 #define DM_ADV_TYPE_PUBLIC_TARGET 0x17 /*!< \brief Public target address */
182 #define DM_ADV_TYPE_RANDOM_TARGET 0x18 /*!< \brief Random target address */
183 #define DM_ADV_TYPE_APPEARANCE 0x19 /*!< \brief Device appearance */
184 #define DM_ADV_TYPE_ADV_INTERVAL 0x1A /*!< \brief Advertising interval */
185 #define DM_ADV_TYPE_BD_ADDR 0x1B /*!< \brief LE Bluetooth device address */
186 #define DM_ADV_TYPE_ROLE 0x1C /*!< \brief LE role */
187 #define DM_ADV_TYPE_32_SOLICIT 0x1F /*!< \brief Service soliticiation list of 32 bit UUIDs */
188 #define DM_ADV_TYPE_SVC_DATA_32 0x20 /*!< \brief Service data - 32-bit UUID */
189 #define DM_ADV_TYPE_SVC_DATA_128 0x21 /*!< \brief Service data - 128-bit UUID */
190 #define DM_ADV_TYPE_LESC_CONFIRM 0x22 /*!< \brief LE Secure Connections confirm value */
191 #define DM_ADV_TYPE_LESC_RANDOM 0x23 /*!< \brief LE Secure Connections random value */
192 #define DM_ADV_TYPE_URI 0x24 /*!< \brief URI */
193 #define DM_ADV_TYPE_INDOOR_POS 0x25 /*!< \brief Indoor positioning service */
194 #define DM_ADV_TYPE_TRANS_DISC 0x26 /*!< \brief Transport discovery service */
195 #define DM_ADV_TYPE_LE_SUP_FEAT 0x27 /*!< \brief LE supported features */
196 #define DM_ADV_TYPE_CH_MAP_UPD_IND 0x28 /*!< \brief Channel map update indication */
197 #define DM_ADV_TYPE_PB_ADV 0x29 /*!< \brief PB-ADV */
198 #define DM_ADV_TYPE_MESH_MSG 0x2A /*!< \brief Mesh message */
199 #define DM_ADV_TYPE_MESH_BEACON 0x2B /*!< \brief Mesh beacon*/
200 #define DM_ADV_TYPE_BIG_INFO 0x2C /*!< \brief BIG Info */
201 #define DM_ADV_TYPE_BCAST_CODE 0x2D /*!< \brief Mesh beacon */
202 #define DM_ADV_TYPE_3D_INFO_DATA 0x3D /*!< \brief 3D information data */
203 #define DM_ADV_TYPE_MANUFACTURER 0xFF /*!< \brief Manufacturer specific data */
204 /**@}*/
205 
206 /** \name GAP Advertising Data Flag Advertising Type
207  * Bit mask for Advertising Type flag in advertising data.
208  */
209 /**@{*/
210 #define DM_FLAG_LE_LIMITED_DISC 0x01 /*!< \brief Limited discoverable flag */
211 #define DM_FLAG_LE_GENERAL_DISC 0x02 /*!< \brief General discoverable flag */
212 #define DM_FLAG_LE_BREDR_NOT_SUP 0x04 /*!< \brief BR/EDR not supported flag */
213 /**@}*/
214 
215 /** \name GAP Advertising Data Element Indexes
216  * Advertising data element indexes.
217  */
218 /**@{*/
219 #define DM_AD_LEN_IDX 0 /*!< \brief Advertising data element len */
220 #define DM_AD_TYPE_IDX 1 /*!< \brief Advertising data element type */
221 #define DM_AD_DATA_IDX 2 /*!< \brief Advertising data element data */
222 /**@}*/
223 
224 /** \name GAP Advertising URI
225  * Advertising URI Scheme
226  */
227 /**@{*/
228 #define DM_URI_SCHEME_HTTP 0x16 /*!< \brief URI HTTP Scheme */
229 #define DM_URI_SCHEME_HTTPS 0x17 /*!< \brief URI HTTPS Scheme */
230 /**@}*/
231 
232 /** \name GAP Timeouts
233  * Timeouts defined by the GAP specification; in units of milliseconds.
234  */
235 /**@{*/
236 #define DM_GAP_LIM_ADV_TIMEOUT 180000 /*!< \brief Maximum advertising duration in limited discoverable mode */
237 #define DM_GAP_GEN_DISC_SCAN_MIN 10240 /*!< \brief Minimum scan duration for general discovery */
238 #define DM_GAP_LIM_DISC_SCAN_MIN 10240 /*!< \brief Minimum scan duration for limited discovery */
239 #define DM_GAP_CONN_PARAM_TIMEOUT 30000 /*!< \brief Connection parameter update timeout */
240 #define DM_GAP_SCAN_FAST_PERIOD 30720 /*!< \brief Minimum time to perform scanning when user initiated */
241 #define DM_GAP_ADV_FAST_PERIOD 30000 /*!< \brief Minimum time to perform advertising when user initiated */
242 /**@}*/
243 
244 /** \name GAP 1M PHY Timing
245  * Advertising, scanning, and connection parameters defined in the GAP specification for the LE 1M PHY.
246  * In units of 625 microseconds.
247  */
248 /**@{*/
249 #define DM_GAP_SCAN_FAST_INT_MIN 48 /*!< \brief Minimum scan interval when user initiated */
250 #define DM_GAP_SCAN_FAST_INT_MAX 96 /*!< \brief Maximum scan interval when user initiated */
251 #define DM_GAP_SCAN_FAST_WINDOW 48 /*!< \brief Scan window when user initiated */
252 #define DM_GAP_SCAN_SLOW_INT_1 2048 /*!< \brief Scan interval 1 when background scannning */
253 #define DM_GAP_SCAN_SLOW_WINDOW_1 18 /*!< \brief Scan window 1 when background scanning */
254 #define DM_GAP_SCAN_SLOW_INT_2 4096 /*!< \brief Scan interval 2 when background scannning */
255 #define DM_GAP_SCAN_SLOW_WINDOW_2 36 /*!< \brief Scan window 2 when background scanning */
256 #define DM_GAP_ADV_FAST_INT_MIN_1 48 /*!< \brief Minimum advertising interval 1 when user initiated */
257 #define DM_GAP_ADV_FAST_INT_MAX_1 96 /*!< \brief Maximum advertising interval 1 when user initiated */
258 #define DM_GAP_ADV_FAST_INT_MIN_2 160 /*!< \brief Minimum advertising interval 2 when user initiated */
259 #define DM_GAP_ADV_FAST_INT_MAX_2 240 /*!< \brief Maximum advertising interval 2 when user initiated */
260 #define DM_GAP_ADV_SLOW_INT_MIN 1600 /*!< \brief Minimum advertising interval when background advertising */
261 #define DM_GAP_ADV_SLOW_INT_MAX 1920 /*!< \brief Maximum advertising interval when background advertising */
262 /**@}*/
263 
264 /** \name GAP Coded PHY Timing
265  * Advertising, scanning, and connection parameters defined in the GAP specification for the LE Coded PHY.
266  * In units of 625 microseconds.
267  */
268 /**@{*/
269 #define DM_GAP_SCAN_CODED_FAST_INT_MIN 144 /*!< \brief Minimum scan interval when user initiated on LE Coded PHY */
270 #define DM_GAP_SCAN_CODED_FAST_INT_MAX 288 /*!< \brief Maximum scan interval when user initiated on LE Coded PHY */
271 #define DM_GAP_SCAN_CODED_FAST_WINDOW 144 /*!< \brief Scan window when user initiated on LE Coded PHY */
272 #define DM_GAP_SCAN_CODED_SLOW_INT_1 6144 /*!< \brief Scan interval 1 when background scannning on LE Coded PHY */
273 #define DM_GAP_SCAN_CODED_SLOW_WINDOW_1 54 /*!< \brief Scan window 1 when background scanning on LE Coded PHY */
274 #define DM_GAP_SCAN_CODED_SLOW_INT_2 12288 /*!< \brief Scan interval 2 when background scannning on LE Coded PHY */
275 #define DM_GAP_SCAN_CODED_SLOW_WINDOW_2 108 /*!< \brief Scan window 2 when background scanning on LE Coded PHY */
276 #define DM_GAP_ADV_CODED_FAST_INT_MIN_1 144 /*!< \brief Minimum advertising interval 1 when user initiated on LE Coded PHY */
277 #define DM_GAP_ADV_CODED_FAST_INT_MAX_1 288 /*!< \brief Maximum advertising interval 1 when user initiated on LE Coded PHY */
278 #define DM_GAP_ADV_CODED_FAST_INT_MIN_2 480 /*!< \brief Minimum advertising interval 2 when user initiated on LE Coded PHY */
279 #define DM_GAP_ADV_CODED_FAST_INT_MAX_2 720 /*!< \brief Maximum advertising interval 2 when user initiated on LE Coded PHY */
280 #define DM_GAP_ADV_CODED_SLOW_INT_MIN 4800 /*!< \brief Minimum advertising interval when background advertising on LE Coded PHY */
281 #define DM_GAP_ADV_CODED_SLOW_INT_MAX 5760 /*!< \brief Maximum advertising interval when background advertising on LE Coded PHY */
282 /**@}*/
283 
284 /** \name GAP Connection Slave Latency
285  *
286  */
287 /**@{*/
288 /*! \brief GAP connection establishment slaves latency */
289 #define DM_GAP_CONN_EST_LATENCY 0
290 /**@}*/
291 
292 /** \name GAP Connection Interval
293  * GAP connection interval in 1.25ms units.
294  */
295 /**@{*/
296 #define DM_GAP_INITIAL_CONN_INT_MIN 24 /*!< \brief Minimum initial connection interval */
297 #define DM_GAP_INITIAL_CONN_INT_MAX 40 /*!< \brief Maximum initial connection interval */
298 /**@}*/
299 
300 /** \name GAP Connection Event Lengths
301  * GAP connection establishment minimum and maximum connection event lengths.
302  */
303 /**@{*/
304 #define DM_GAP_CONN_EST_MIN_CE_LEN 0 /*!< \brief Connection establishment minimum event length */
305 #define DM_GAP_CONN_EST_MAX_CE_LEN 0 /*!< \brief Connection establishment maximum event length */
306 /**@}*/
307 
308 /** \name GAP Peripheral Privacy Characteristic Values
309  *
310  */
311 /**@{*/
312 #define DM_GAP_PRIV_DISABLED 0 /*!< \brief Privacy Disabled */
313 #define DM_GAP_PRIV_ENABLED 1 /*!< \brief Privacy Enabled */
314 /**@}*/
315 
316 /** \name GAP Connection Supervision Timeout
317  * Connection supervision timeout, in 10ms units
318  */
319 /**@{*/
320 /*! \brief Connection establishment supervision timeout default, in 10ms units */
321 #define DM_DEFAULT_EST_SUP_TIMEOUT 2000
322 /**@}*/
323 
324 /** \name GAP Security Pairing Authentication Requirements
325  * Pairing authentication/security properties bit mask.
326  */
327 /**@{*/
328 #define DM_AUTH_BOND_FLAG SMP_AUTH_BOND_FLAG /*!< \brief Bonding requested */
329 #define DM_AUTH_MITM_FLAG SMP_AUTH_MITM_FLAG /*!< \brief MITM (authenticated pairing) requested */
330 #define DM_AUTH_SC_FLAG SMP_AUTH_SC_FLAG /*!< \brief LE Secure Connections requested */
331 #define DM_AUTH_KP_FLAG SMP_AUTH_KP_FLAG /*!< \brief Keypress notifications requested */
332 /**@}*/
333 
334 /** \name GAP Key Distribution Flags
335  * Key distribution bit mask
336  */
337 /**@{*/
338 #define DM_KEY_DIST_LTK SMP_KEY_DIST_ENC /*!< \brief Distribute LTK used for encryption */
339 #define DM_KEY_DIST_IRK SMP_KEY_DIST_ID /*!< \brief Distribute IRK used for privacy */
340 #define DM_KEY_DIST_CSRK SMP_KEY_DIST_SIGN /*!< \brief Distribute CSRK used for signed data */
341 /**@}*/
342 
343 /** \name DM Security Key Indication Types
344  * Type of key used in \ref DM_SEC_KEY_IND.
345  */
346 /**@{*/
347 #define DM_KEY_LOCAL_LTK 0x01 /*!< \brief LTK generated locally for this device */
348 #define DM_KEY_PEER_LTK 0x02 /*!< \brief LTK received from peer device */
349 #define DM_KEY_IRK 0x04 /*!< \brief IRK and identity info of peer device */
350 #define DM_KEY_CSRK 0x08 /*!< \brief CSRK of peer device */
351 /**@}*/
352 
353 /*! \brief Base value for HCI error status values for \ref DM_SEC_PAIR_CMPL_IND */
354 #define DM_SEC_HCI_ERR_BASE 0x20
355 
356 /** \name GAP Security Level
357  * GAP Mode 1 Security Levels
358  */
359 /**@{*/
360 #define DM_SEC_LEVEL_NONE 0 /*!< \brief Connection has no security */
361 #define DM_SEC_LEVEL_ENC 1 /*!< \brief Connection is encrypted with unauthenticated key */
362 #define DM_SEC_LEVEL_ENC_AUTH 2 /*!< \brief Connection is encrypted with authenticated key */
363 #define DM_SEC_LEVEL_ENC_LESC 3 /*!< \brief Connection is encrypted with LE Secure Connections */
364 /**@}*/
365 
366 /** \name GAP Broadcast Security Level
367 * GAP Mode 3 Security Levels
368 */
369 /**@{*/
370 #define DM_SEC_LEVEL_BCAST_NONE 0 /*!< \brief No security (no authentication and no encryption) */
371 #define DM_SEC_LEVEL_BCAST_UNAUTH 1 /*!< \brief Use of unauthenticated Broadcast_Code */
372 #define DM_SEC_LEVEL_BCAST_AUTH 2 /*!< \brief Use of authenticated Broadcast_Code */
373 /**@}*/
374 
375 /** \name GAP Random Address Types
376  * Random address type masks.
377  */
378 /**@{*/
379 #define DM_RAND_ADDR_STATIC 0xC0 /*!< \brief Static address */
380 #define DM_RAND_ADDR_RESOLV 0x40 /*!< \brief Resolvable private address */
381 #define DM_RAND_ADDR_NONRESOLV 0x00 /*!< \brief Non-resolvable private address */
382 /**@}*/
383 
384 /** \name GAP Random Address Macros
385  * Macros for identifying address type.
386  */
387 /**@{*/
388 /*! \brief Get the type of random address */
389 #define DM_RAND_ADDR_GET(addr) ((addr)[5] & 0xC0)
390 
391 /*! \brief Set the type of random address */
392 #define DM_RAND_ADDR_SET(addr, type) {(addr)[5] = ((addr)[5] & 0x3F) | (type);}
393 
394 /*! \brief Check for Static Address */
395 #define DM_RAND_ADDR_SA(addr, type) (((type) == DM_ADDR_RANDOM) && \
396  (DM_RAND_ADDR_GET((addr)) == DM_RAND_ADDR_STATIC))
397 
398 /*! \brief Check for Resolvable Private Address */
399 #define DM_RAND_ADDR_RPA(addr, type) (((type) == DM_ADDR_RANDOM) && \
400  (DM_RAND_ADDR_GET((addr)) == DM_RAND_ADDR_RESOLV))
401 /**@}*/
402 
403 /** \name GAP Privacy Mode
404  * Privacy Mode of this device in regards to a peer device.
405  */
406 /**@{*/
407 #define DM_PRIV_MODE_NETWORK 0x00 /*!< \brief Network privacy mode (default). */
408 #define DM_PRIV_MODE_DEVICE 0x01 /*!< \brief Device privacy mode. */
409 /**@}*/
410 
411 /** \name DM Internal State
412  * Connection busy or idle state
413  */
414 /**@{*/
415 #define DM_CONN_IDLE 0 /*!< \brief Connection is idle. */
416 #define DM_CONN_BUSY 1 /*!< \brief Connection is busy. */
417 /**@}*/
418 
419 /** \name DM Internal State Flags
420  * Connection busy/idle state bitmask.
421  */
422 /**@{*/
423 #define DM_IDLE_SMP_PAIR 0x0001 /*!< \brief SMP pairing in progress */
424 #define DM_IDLE_DM_ENC 0x0002 /*!< \brief DM Encryption setup in progress */
425 #define DM_IDLE_ATTS_DISC 0x0004 /*!< \brief ATTS service discovery in progress */
426 #define DM_IDLE_APP_DISC 0x0008 /*!< \brief App framework service discovery in progress */
427 #define DM_IDLE_USER_1 0x0010 /*!< \brief For use by user application */
428 #define DM_IDLE_USER_2 0x0020 /*!< \brief For use by user application */
429 #define DM_IDLE_USER_3 0x0040 /*!< \brief For use by user application */
430 #define DM_IDLE_USER_4 0x0080 /*!< \brief For use by user application */
431 /**@}*/
432 
433 /** \name GAP Filter Policy Modes
434  * Filter policy modes.
435  */
436 /**@{*/
437 #define DM_FILT_POLICY_MODE_ADV 0 /*!< \brief Advertising filter policy mode */
438 #define DM_FILT_POLICY_MODE_SCAN 1 /*!< \brief Scanning filter policy mode */
439 #define DM_FILT_POLICY_MODE_INIT 2 /*!< \brief Initiator filter policy mode */
440 #define DM_FILT_POLICY_MODE_SYNC 3 /*!< \brief Synchronization filter policy mode */
441 /**@}*/
442 
443 /** \name DM Proprietary Error Codes
444  * Internal error codes not sent in any PDU.
445  */
446 /**@{*/
447 #define DM_ERR_SMP_RX_PDU_LEN_EXCEEDED 0x01 /*!< \brief LESC key length exceeded maximum RX PDU length */
448 #define DM_ERR_ATT_RX_PDU_LEN_EXCEEDED 0x02 /*!< \brief Configured ATT MTU exceeded maximum RX PDU length */
449 #define DM_ERR_L2C_RX_PDU_LEN_EXCEEDED 0x03 /*!< \brief Registered COC MPS exceeded maximum RX PDU length */
450 /**@}*/
451 
452 /** \name DM Conn CTE states
453  * Internal states of the DM conn CTE.
454  */
455 /**@{*/
456 enum
457 {
459  DM_CONN_CTE_STATE_INITIATING, /*!< Initiating CTE request */
460  DM_CONN_CTE_STATE_RESPONDING, /*!< Responding to CTE request */
461  DM_CONN_CTE_STATE_SAMPLING, /*!< Sampling received CTE */
462  DM_CONN_CTE_STATE_STARTING, /*!< Starting CTE request, CTE response or sampling received CTE */
463  DM_CONN_CTE_STATE_STOPPING, /*!< Stopping CTE request, CTE response or sampling received CTE */
464 };
465 /**@}*/
466 
467 /** \name DM Legacy Advertising Handle
468  * Default handle for legacy advertising when using legacy HCI interface. In this case only one advertising
469  * set is allowed so all activity uses the same handle.
470  */
471 /**@{*/
472 /*! \brief Default Advertising handle for legacy advertising */
473 #define DM_ADV_HANDLE_DEFAULT 0
474 /**@}*/
475 
476 /** \name DM Callback Events
477  * Events handled by the DM state machine.
478  */
479 /**@{*/
480 #define DM_CBACK_START 0x20 /*!< \brief DM callback event starting value */
481 
482 /*! \brief DM callback events */
483 enum
484 {
485  DM_RESET_CMPL_IND = DM_CBACK_START, /*!< \brief Reset complete */
486  DM_ADV_START_IND, /*!< \brief Advertising started */
487  DM_ADV_STOP_IND, /*!< \brief Advertising stopped */
488  DM_ADV_NEW_ADDR_IND, /*!< \brief New resolvable address has been generated */
489  DM_SCAN_START_IND, /*!< \brief Scanning started */
490  DM_SCAN_STOP_IND, /*!< \brief Scanning stopped */
491  DM_SCAN_REPORT_IND, /*!< \brief Scan data received from peer device */
492  DM_CONN_OPEN_IND, /*!< \brief Connection opened */
493  DM_CONN_CLOSE_IND, /*!< \brief Connection closed */
494  DM_CONN_UPDATE_IND, /*!< \brief Connection update complete */
495  DM_SEC_PAIR_CMPL_IND, /*!< \brief Pairing completed successfully */
496  DM_SEC_PAIR_FAIL_IND, /*!< \brief Pairing failed or other security failure */
497  DM_SEC_ENCRYPT_IND, /*!< \brief Connection encrypted */
498  DM_SEC_ENCRYPT_FAIL_IND, /*!< \brief Encryption failed */
499  DM_SEC_AUTH_REQ_IND, /*!< \brief PIN or OOB data requested for pairing */
500  DM_SEC_KEY_IND, /*!< \brief Security key indication */
501  DM_SEC_LTK_REQ_IND, /*!< \brief LTK requested for encyption */
502  DM_SEC_PAIR_IND, /*!< \brief Incoming pairing request from master */
503  DM_SEC_SLAVE_REQ_IND, /*!< \brief Incoming security request from slave */
504  DM_SEC_CALC_OOB_IND, /*!< \brief Result of OOB Confirm Calculation Generation */
505  DM_SEC_ECC_KEY_IND, /*!< \brief Result of ECC Key Generation */
506  DM_SEC_COMPARE_IND, /*!< \brief Result of Just Works/Numeric Comparison Compare Value Calculation */
507  DM_SEC_KEYPRESS_IND, /*!< \brief Keypress indication from peer in passkey security */
508  DM_PRIV_RESOLVED_ADDR_IND, /*!< \brief Private address resolved */
509  DM_PRIV_GENERATE_ADDR_IND, /*!< \brief Private resolvable address generated */
510  DM_CONN_READ_RSSI_IND, /*!< \brief Connection RSSI read */
511  DM_PRIV_ADD_DEV_TO_RES_LIST_IND, /*!< \brief Device added to resolving list */
512  DM_PRIV_REM_DEV_FROM_RES_LIST_IND, /*!< \brief Device removed from resolving list */
513  DM_PRIV_CLEAR_RES_LIST_IND, /*!< \brief Resolving list cleared */
514  DM_PRIV_READ_PEER_RES_ADDR_IND, /*!< \brief Peer resolving address read */
515  DM_PRIV_READ_LOCAL_RES_ADDR_IND, /*!< \brief Local resolving address read */
516  DM_PRIV_SET_ADDR_RES_ENABLE_IND, /*!< \brief Address resolving enable set */
517  DM_REM_CONN_PARAM_REQ_IND, /*!< \brief Remote connection parameter requested */
518  DM_CONN_DATA_LEN_CHANGE_IND, /*!< \brief Data length changed */
519  DM_CONN_WRITE_AUTH_TO_IND, /*!< \brief Write authenticated payload complete */
520  DM_CONN_AUTH_TO_EXPIRED_IND, /*!< \brief Authenticated payload timeout expired */
521  DM_PHY_READ_IND, /*!< \brief Read PHY */
522  DM_PHY_SET_DEF_IND, /*!< \brief Set default PHY */
523  DM_PHY_UPDATE_IND, /*!< \brief PHY update */
524  DM_ADV_SET_START_IND, /*!< \brief Advertising set(s) started */
525  DM_ADV_SET_STOP_IND, /*!< \brief Advertising set(s) stopped */
526  DM_SCAN_REQ_RCVD_IND, /*!< \brief Scan request received */
527  DM_EXT_SCAN_START_IND, /*!< \brief Extended scanning started */
528  DM_EXT_SCAN_STOP_IND, /*!< \brief Extended scanning stopped */
529  DM_EXT_SCAN_REPORT_IND, /*!< \brief Extended scan data received from peer device */
530  DM_PER_ADV_SET_START_IND, /*!< \brief Periodic advertising set started */
531  DM_PER_ADV_SET_STOP_IND, /*!< \brief Periodic advertising set stopped */
532  DM_PER_ADV_SYNC_EST_IND, /*!< \brief Periodic advertising sync established */
533  DM_PER_ADV_SYNC_EST_FAIL_IND, /*!< \brief Periodic advertising sync establishment failed */
534  DM_PER_ADV_SYNC_LOST_IND, /*!< \brief Periodic advertising sync lost */
535  DM_PER_ADV_SYNC_TRSF_EST_IND, /*!< \brief Periodic advertising sync transfer established */
536  DM_PER_ADV_SYNC_TRSF_EST_FAIL_IND, /*!< \brief Periodic advertising sync transfer establishment failed */
537  DM_PER_ADV_SYNC_TRSF_IND, /*!< \brief Periodic advertising sync info transferred */
538  DM_PER_ADV_SET_INFO_TRSF_IND, /*!< \brief Periodic advertising set sync info transferred */
539  DM_PER_ADV_REPORT_IND, /*!< \brief Periodic advertising data received from peer device */
540  DM_REMOTE_FEATURES_IND, /*!< \brief Remote features from peer device */
541  DM_READ_REMOTE_VER_INFO_IND, /*!< \brief Remote LL version information read */
542  DM_CONN_IQ_REPORT_IND, /*!< \brief IQ samples from CTE of received packet from peer device */
543  DM_CTE_REQ_FAIL_IND, /*!< \brief CTE request failed */
544  DM_CONN_CTE_RX_SAMPLE_START_IND, /*!< \brief Sampling received CTE started */
545  DM_CONN_CTE_RX_SAMPLE_STOP_IND, /*!< \brief Sampling received CTE stopped */
546  DM_CONN_CTE_TX_CFG_IND, /*!< \brief Connection CTE transmit parameters configured */
547  DM_CONN_CTE_REQ_START_IND, /*!< \brief Initiating connection CTE request started */
548  DM_CONN_CTE_REQ_STOP_IND, /*!< \brief Initiating connection CTE request stopped */
549  DM_CONN_CTE_RSP_START_IND, /*!< \brief Responding to connection CTE request started */
550  DM_CONN_CTE_RSP_STOP_IND, /*!< \brief Responding to connection CTE request stopped */
551  DM_READ_ANTENNA_INFO_IND, /*!< \brief Antenna information read */
552  DM_CIS_CIG_CONFIG_IND, /*!< \brief CIS CIG configure complete */
553  DM_CIS_CIG_REMOVE_IND, /*!< \brief CIS CIG remove complete */
554  DM_CIS_REQ_IND, /*!< \brief CIS request */
555  DM_CIS_OPEN_IND, /*!< \brief CIS connection opened */
556  DM_CIS_CLOSE_IND, /*!< \brief CIS connection closed */
557  DM_REQ_PEER_SCA_IND, /*!< \brief Request peer SCA complete */
558  DM_ISO_DATA_PATH_SETUP_IND, /*!< \brief ISO data path setup complete */
559  DM_ISO_DATA_PATH_REMOVE_IND, /*!< \brief ISO data path remove complete */
560  DM_DATA_PATH_CONFIG_IND, /*!< \brief Data path configure complete */
561  DM_READ_LOCAL_SUP_CODECS_IND, /*!< \brief Local supported codecs read */
562  DM_READ_LOCAL_SUP_CODEC_CAP_IND, /*!< \brief Local supported codec capabilities read */
563  DM_READ_LOCAL_SUP_CTR_DLY_IND, /*!< \brief Local supported controller delay read */
564  DM_BIG_START_IND, /*!< \brief BIG started */
565  DM_BIG_STOP_IND, /*!< \brief BIG stopped */
566  DM_BIG_SYNC_EST_IND, /*!< \brief BIG sync established */
567  DM_BIG_SYNC_EST_FAIL_IND, /*!< \brief BIG sync establishment failed */
568  DM_BIG_SYNC_LOST_IND, /*!< \brief BIG sync lost */
569  DM_BIG_SYNC_STOP_IND, /*!< \brief BIG sync stopped */
570  DM_BIG_INFO_ADV_REPORT_IND, /*!< \brief BIG Info advertising data received from peer device */
571  DM_L2C_CMD_REJ_IND, /*!< \brief L2CAP Command Reject */
572  DM_ERROR_IND, /*!< \brief General error */
573  DM_HW_ERROR_IND, /*!< \brief Hardware error */
574  DM_VENDOR_SPEC_IND /*!< \brief Vendor specific event */
575 #if MBED_CONF_CORDIO_ROUTE_UNHANDLED_COMMAND_COMPLETE_EVENTS
576  , DM_UNHANDLED_CMD_CMPL_EVT_IND, /*!< \brief Unhandled command complete events */
577 #endif
578 };
579 
580 #define DM_CBACK_END DM_VENDOR_SPEC_IND /*!< \brief DM callback event ending value */
581 /**@}*/
582 
583 /**************************************************************************************************
584  Data Types
585 **************************************************************************************************/
586 
587 /*! \brief Connection identifier. */
588 typedef uint8_t dmConnId_t;
589 
590 /*! \brief Synchronization identifier. */
591 typedef uint8_t dmSyncId_t;
592 
593 /*! \brief Configuration structure. */
594 typedef struct
595 {
596  uint8_t dummy; /*!< \brief Placeholder variable. */
597 } dmCfg_t;
598 
599 /*! \brief LTK data type. */
600 typedef struct
601 {
602  uint8_t key[SMP_KEY_LEN]; /*!< \brief LTK */
603  uint8_t rand[SMP_RAND8_LEN]; /*!< \brief Rand */
604  uint16_t ediv; /*!< \brief EDIV */
605 } dmSecLtk_t;
606 
607 /*! \brief IRK data type. */
608 typedef struct
609 {
610  uint8_t key[SMP_KEY_LEN]; /*!< \brief IRK */
611  bdAddr_t bdAddr; /*!< \brief BD Address */
612  uint8_t addrType; /*!< \brief Address Type */
613 } dmSecIrk_t;
614 
615 /*! \brief CSRK data type. */
616 typedef struct
617 {
618  uint8_t key[SMP_KEY_LEN]; /*!< \brief CSRK */
619 } dmSecCsrk_t;
620 
621 /*! \brief Union of key types. */
622 typedef union
623 {
624  dmSecLtk_t ltk; /*!< \brief LTK */
625  dmSecIrk_t irk; /*!< \brief IRK */
626  dmSecCsrk_t csrk; /*!< \brief CSRK */
627 } dmSecKey_t;
628 
629 /*! \brief Data type for \ref DM_SEC_PAIR_CMPL_IND. */
630 typedef struct
631 {
632  wsfMsgHdr_t hdr; /*!< \brief Header */
633  uint8_t auth; /*!< \brief Authentication and bonding flags */
635 
636 /*! \brief Data type for \ref DM_SEC_ENCRYPT_IND. */
637 typedef struct
638 {
639  wsfMsgHdr_t hdr; /*!< \brief Header */
640  bool_t usingLtk; /*!< \brief TRUE if connection encrypted with LTK */
642 
643 /*! \brief Data type for \ref DM_SEC_AUTH_REQ_IND. */
644 typedef struct
645 {
646  wsfMsgHdr_t hdr; /*!< \brief Header */
647  bool_t oob; /*!< \brief Out-of-band data requested */
648  bool_t display; /*!< \brief TRUE if pin is to be displayed */
650 
651 /*! \brief Data type for \ref DM_SEC_PAIR_IND. */
652 typedef struct
653 {
654  wsfMsgHdr_t hdr; /*!< \brief Header */
655  uint8_t auth; /*!< \brief Authentication and bonding flags */
656  bool_t oob; /*!< \brief Out-of-band pairing data present or not present */
657  uint8_t iKeyDist; /*!< \brief Initiator key distribution flags */
658  uint8_t rKeyDist; /*!< \brief Responder key distribution flags */
660 
661 /*! \brief Data type for \ref DM_SEC_SLAVE_REQ_IND. */
662 typedef struct
663 {
664  wsfMsgHdr_t hdr; /*!< \brief Header */
665  uint8_t auth; /*!< \brief Authentication and bonding flags */
667 
668 /*! \brief Data type for \ref DM_SEC_KEY_IND. */
669 typedef struct
670 {
671  wsfMsgHdr_t hdr; /*!< \brief Header */
672  dmSecKey_t keyData; /*!< \brief Key data */
673  uint8_t type; /*!< \brief Key type */
674  uint8_t secLevel; /*!< \brief Security level of pairing when key was exchanged */
675  uint8_t encKeyLen; /*!< \brief Length of encryption key used when data was transferred */
677 
678 /*! \brief Data type for \ref DM_SEC_COMPARE_IND. */
679 typedef struct
680 {
681  wsfMsgHdr_t hdr; /*!< \brief Header */
682  uint8_t confirm[SMP_CONFIRM_LEN]; /*!< \brief Confirm value */
684 
685 /*! \brief Data type for \ref DM_SEC_KEYPRESS_IND. */
686 typedef struct
687 {
688  wsfMsgHdr_t hdr; /*!< \brief Header */
689  uint8_t notificationType; /*!< \brief Type of keypress notification */
691 
692 /*! \brief Data type for \ref DM_PRIV_GENERATE_ADDR_IND. */
693 typedef struct
694 {
695  wsfMsgHdr_t hdr; /*!< \brief Header */
696  bdAddr_t addr; /*!< \brief Resolvable private address */
698 
699 /*! \brief Data type for \ref DM_SEC_CALC_OOB_IND. */
700 typedef struct
701 {
702  wsfMsgHdr_t hdr; /*!< \brief Header */
703  uint8_t confirm[SMP_CONFIRM_LEN]; /*!< \brief Local confirm value */
704  uint8_t random[SMP_RAND_LEN]; /*!< \brief Local random value */
706 
707 /*! \brief Data type for \ref DM_ADV_NEW_ADDR_IND. */
708 typedef struct
709 {
710  wsfMsgHdr_t hdr; /*!< \brief Header */
711  bdAddr_t addr; /*!< \brief New resolvable private address */
712  bool_t firstTime; /*!< \brief TRUE when address is generated for the first time */
714 
715 /*! \brief Data structure for \ref DM_ADV_SET_START_IND. */
716 typedef struct
717 {
718  wsfMsgHdr_t hdr; /*!< \brief Header */
719  uint8_t numSets; /*!< \brief Number of advertising sets */
720  uint8_t advHandle[DM_NUM_ADV_SETS];/*!< \brief Advertising handle array */
722 
723 /*! \brief Data structure for \ref DM_PER_ADV_SET_START_IND. */
724 typedef struct
725 {
726  wsfMsgHdr_t hdr; /*!< \brief Header */
727  uint8_t advHandle; /*!< \brief Advertising handle */
729 
730 /*! \brief Data structure for \ref DM_PER_ADV_SET_STOP_IND. */
731 typedef struct
732 {
733  wsfMsgHdr_t hdr; /*!< \brief Header */
734  uint8_t advHandle; /*!< \brief Advertising handle */
736 
737 /*! \brief Data structure for \ref DM_L2C_CMD_REJ_IND. */
738 typedef struct
739 {
740  wsfMsgHdr_t hdr; /*!< \brief Header */
741  uint16_t reason; /*!< \brief Rejection reason */
742  uint16_t handle; /*!< \brief Connection handle */
744 
745 /*! \brief Union of DM callback event data types.
746  *
747  * \note the following events use only the common \ref wsfMsgHdr_t header:
748  * \ref DM_RESET_CMPL_IND,
749  * \ref DM_ADV_START_IND,
750  * \ref DM_ADV_STOP_IND,
751  * \ref DM_SCAN_START_IND,
752  * \ref DM_SCAN_STOP_IND,
753  * \ref DM_SEC_PAIR_FAIL_IND,
754  * \ref DM_SEC_ENCRYPT_FAIL_IND,
755  * \ref DM_PRIV_RESOLVED_ADDR_IND,
756  * \ref DM_EXT_SCAN_START_IND,
757  * \ref DM_EXT_SCAN_STOP_IND,
758  * \ref DM_ERROR_IND
759  */
760 typedef union
761 {
762  wsfMsgHdr_t hdr; /*!< \brief Common header */
763  /* common header used by DM_RESET_CMPL_IND */
764  /* common header used by DM_ADV_START_IND */
765  /* common header used by DM_ADV_STOP_IND */
766  dmAdvNewAddrIndEvt_t advNewAddr; /*!< \brief handles \ref DM_ADV_NEW_ADDR_IND */
767  /* common header used by DM_SCAN_START_IND */
768  /* common header used by DM_SCAN_STOP_IND */
769  hciLeAdvReportEvt_t scanReport; /*!< \brief handles \ref DM_SCAN_REPORT_IND */
770  hciLeConnCmplEvt_t connOpen; /*!< \brief handles \ref DM_CONN_OPEN_IND */
771  hciDisconnectCmplEvt_t connClose; /*!< \brief handles \ref DM_CONN_CLOSE_IND */
772  hciLeConnUpdateCmplEvt_t connUpdate; /*!< \brief handles \ref DM_CONN_UPDATE_IND */
773  dmSecPairCmplIndEvt_t pairCmpl; /*!< \brief handles \ref DM_SEC_PAIR_CMPL_IND */
774  /* common header used by DM_SEC_PAIR_FAIL_IND */
775  dmSecEncryptIndEvt_t encryptInd; /*!< \brief handles \ref DM_SEC_ENCRYPT_IND */
776  /* common header used by DM_SEC_ENCRYPT_FAIL_IND */
777  dmSecAuthReqIndEvt_t authReq; /*!< \brief handles \ref DM_SEC_AUTH_REQ_IND */
778  dmSecKeyIndEvt_t keyInd; /*!< \brief handles \ref DM_SEC_KEY_IND */
779  hciLeLtkReqEvt_t ltkReqInd; /*!< \brief handles \ref DM_SEC_LTK_REQ_IND */
780  dmSecPairIndEvt_t pairInd; /*!< \brief handles \ref DM_SEC_PAIR_IND */
781  dmSecSlaveIndEvt_t slaveInd; /*!< \brief handles \ref DM_SEC_SLAVE_REQ_IND */
782  dmSecOobCalcIndEvt_t oobCalcInd; /*!< \brief handles \ref DM_SEC_CALC_OOB_IND */
783  secEccMsg_t eccMsg; /*!< \brief handles \ref DM_SEC_ECC_KEY_IND */
784  dmSecCnfIndEvt_t cnfInd; /*!< \brief handles \ref DM_SEC_COMPARE_IND */
785  dmSecKeypressIndEvt_t keypressInd; /*!< \brief handles \ref DM_SEC_KEYPRESS_IND */
786  /* common header used by DM_PRIV_RESOLVED_ADDR_IND */
787  dmPrivGenAddrIndEvt_t genAddr; /*!< \brief handles \ref DM_PRIV_GENERATE_ADDR_IND */
788  hciReadRssiCmdCmplEvt_t readRssi; /*!< \brief handles \ref DM_CONN_READ_RSSI_IND */
789  hciLeAddDevToResListCmdCmplEvt_t addDevToResList; /*!< \brief handles \ref DM_PRIV_ADD_DEV_TO_RES_LIST_IND */
790  hciLeRemDevFromResListCmdCmplEvt_t remDevFromResList; /*!< \brief handles \ref DM_PRIV_REM_DEV_FROM_RES_LIST_IND */
791  hciLeClearResListCmdCmplEvt_t clearResList; /*!< \brief handles \ref DM_PRIV_CLEAR_RES_LIST_IND */
792  hciLeReadPeerResAddrCmdCmplEvt_t readPeerResAddr; /*!< \brief handles \ref DM_PRIV_READ_PEER_RES_ADDR_IND */
793  hciLeReadLocalResAddrCmdCmplEvt_t readLocalResAddr; /*!< \brief handles \ref DM_PRIV_READ_LOCAL_RES_ADDR_IND */
794  hciLeSetAddrResEnableCmdCmplEvt_t setAddrResEnable; /*!< \brief handles \ref DM_PRIV_SET_ADDR_RES_ENABLE_IND */
795  hciLeRemConnParamReqEvt_t remConnParamReq; /*!< \brief handles \ref DM_REM_CONN_PARAM_REQ_IND */
796  hciLeDataLenChangeEvt_t dataLenChange; /*!< \brief handles \ref DM_CONN_DATA_LEN_CHANGE_IND */
797  hciWriteAuthPayloadToCmdCmplEvt_t writeAuthTo; /*!< \brief handles \ref DM_CONN_WRITE_AUTH_TO_IND */
798  hciAuthPayloadToExpiredEvt_t authToExpired; /*!< \brief handles \ref DM_CONN_AUTH_TO_EXPIRED_IND */
799  hciLeReadPhyCmdCmplEvt_t readPhy; /*!< \brief handles \ref DM_PHY_READ_IND */
800  hciLeSetDefPhyCmdCmplEvt_t setDefPhy; /*!< \brief handles \ref DM_PHY_SET_DEF_IND */
801  hciLePhyUpdateEvt_t phyUpdate; /*!< \brief handles \ref DM_PHY_UPDATE_IND */
802  dmAdvSetStartEvt_t advSetStart; /*!< \brief handles \ref DM_ADV_SET_START_IND */
803  hciLeAdvSetTermEvt_t advSetStop; /*!< \brief handles \ref DM_ADV_SET_STOP_IND */
804  hciLeScanReqRcvdEvt_t scanReqRcvd; /*!< \brief handles \ref DM_SCAN_REQ_RCVD_IND */
805  /* common header used by DM_EXT_SCAN_START_IND */
806  /* common header used by DM_EXT_SCAN_STOP_IND */
807  hciLeExtAdvReportEvt_t extScanReport; /*!< \brief handles \ref DM_EXT_SCAN_REPORT_IND */
808  dmPerAdvSetStartEvt_t perAdvSetStart; /*!< \brief handles \ref DM_PER_ADV_SET_START_IND */
809  dmPerAdvSetStopEvt_t perAdvSetStop; /*!< \brief handles \ref DM_PER_ADV_SET_STOP_IND */
810  hciLePerAdvSyncEstEvt_t perAdvSyncEst; /*!< \brief handles \ref DM_PER_ADV_SYNC_EST_IND */
811  hciLePerAdvSyncEstEvt_t perAdvSyncEstFail; /*!< \brief handles \ref DM_PER_ADV_SYNC_EST_FAIL_IND */
812  hciLePerAdvSyncLostEvt_t perAdvSyncLost; /*!< \brief handles \ref DM_PER_ADV_SYNC_LOST_IND */
813  HciLePerAdvSyncTrsfRcvdEvt_t perAdvSyncTrsfEst; /*!< \brief handles \ref DM_PER_ADV_SYNC_TRSF_EST_IND */
814  HciLePerAdvSyncTrsfRcvdEvt_t perAdvSyncTrsEstFail; /*!< \brief handles \ref DM_PER_ADV_SYNC_TRSF_EST_FAIL_IND */
815  hciLePerAdvSyncTrsfCmdCmplEvt_t perAdvSyncTrsf; /*!< \brief handles \ref DM_PER_ADV_SYNC_TRSF_IND */
816  hciLePerAdvSetInfoTrsfCmdCmplEvt_t perAdvSetInfoTrsf; /*!< \brief handles \ref DM_PER_ADV_SET_INFO_TRSF_IND */
817  hciLePerAdvReportEvt_t perAdvReport; /*!< \brief handles \ref DM_PER_ADV_REPORT_IND */
818  hciLeReadRemoteFeatCmplEvt_t readRemoteFeat; /*!< \brief handles \ref DM_REMOTE_FEATURES_IND */
819  hciReadRemoteVerInfoCmplEvt_t readRemVerInfo; /*!< \brief handles \ref DM_READ_REMOTE_VER_INFO_IND */
820  hciLeConnIQReportEvt_t connIQReport; /*!< \brief handles \ref DM_CONN_IQ_REPORT_IND */
821  hciLeCteReqFailedEvt_t cteReqFail; /*!< \brief handles \ref DM_CTE_REQ_FAIL_IND */
822  hciLeSetConnCteRxParamsCmdCmplEvt_t connCteRxSampleStart; /*!< \brief handles \ref DM_CONN_CTE_RX_SAMPLE_START_IND */
823  hciLeSetConnCteRxParamsCmdCmplEvt_t connCteRxSampleStop; /*!< \brief handles \ref DM_CONN_CTE_RX_SAMPLE_STOP_IND */
824  hciLeSetConnCteTxParamsCmdCmplEvt_t connCteTxCfg; /*!< \brief handles \ref DM_CONN_CTE_TX_CFG_IND */
825  hciLeConnCteReqEnableCmdCmplEvt_t connCteReqStart; /*!< \brief handles \ref DM_CONN_CTE_REQ_START_IND */
826  hciLeConnCteReqEnableCmdCmplEvt_t connCteReqStop; /*!< \brief handles \ref DM_CONN_CTE_REQ_STOP_IND */
827  hciLeConnCteRspEnableCmdCmplEvt_t connCteRspStart; /*!< \brief handles \ref DM_CONN_CTE_RSP_START_IND */
828  hciLeConnCteRspEnableCmdCmplEvt_t connCteRspStop; /*!< \brief handles \ref DM_CONN_CTE_RSP_STOP_IND */
829  hciLeReadAntennaInfoCmdCmplEvt_t readAntennaInfo; /*!< \brief handles \ref DM_READ_ANTENNA_INFO_IND */
830  hciLeSetCigParamsCmdCmplEvt_t cisCigConfig; /*!< \brief handles \ref DM_CIS_CIG_CONFIG_IND */
831  hciLeRemoveCigCmdCmplEvt_t cisCigRemove; /*!< \brief handles \ref DM_CIS_CIG_REMOVE_IND */
832  HciLeCisReqEvt_t cisReq; /*!< \brief handles \ref DM_CIS_REQ_IND */
833  HciLeCisEstEvt_t cisOpen; /*!< \brief handles \ref DM_CIS_OPEN_IND */
834  hciDisconnectCmplEvt_t cisClose; /*!< \brief handles \ref DM_CIS_CLOSE_IND */
835  HciLeReqPeerScaCmplEvt_t_t reqPeerSca; /*!< \brief handles \ref DM_REQ_PEER_SCA_IND */
836  hciLeSetupIsoDataPathCmdCmplEvt_t isoDataPathSetup; /*!< \brief handles \ref DM_ISO_DATA_PATH_SETUP_IND */
837  hciLeRemoveIsoDataPathCmdCmplEvt_t isoDataPathRemove; /*!< \brief handles \ref DM_ISO_DATA_PATH_REMOVE_IND */
838  hciConfigDataPathCmdCmplEvt_t dataPathConfig; /*!< \brief handles \ref DM_DATA_PATH_CONFIG_IND */
839  hciReadLocalSupCodecsCmdCmplEvt_t readLocalSupCodecs; /*!< \brief handles \ref DM_READ_LOCAL_SUP_CODECS_IND */
840  hciReadLocalSupCodecCapCmdCmplEvt_t readLocalSupCodecCap; /*!< \brief handles \ref DM_READ_LOCAL_SUP_CODEC_CAP_IND */
841  hciReadLocalSupCtrDlyCmdCmplEvt_t readLocalSupCtrDly; /*!< \brief handles \ref DM_READ_LOCAL_SUP_CTR_DLY_IND */
842  HciLeCreateBigCmplEvt_t bigStart; /*!< \brief handles \ref DM_BIG_START_IND */
843  HciLeTerminateBigCmplEvt_t bigStop; /*!< \brief handles \ref DM_BIG_STOP_IND */
844  HciLeBigSyncEstEvt_t bigSyncEst; /*!< \brief handles \ref DM_BIG_SYNC_EST_IND */
845  HciLeBigSyncEstEvt_t bigSyncEstFail; /*!< \brief handles \ref DM_BIG_SYNC_EST_FAIL_IND */
846  HciLeBigSyncLostEvt_t bigSyncLost; /*!< \brief handles \ref DM_BIG_SYNC_LOST_IND */
847  HciLeBigTermSyncCmplEvt_t bigSyncStop; /*!< \brief handles \ref DM_BIG_SYNC_STOP_IND */
848  HciLeBigInfoAdvRptEvt_t bigInfoAdvRpt; /*!< \brief handles \ref DM_BIG_INFO_ADV_REPORT_IND */
849  #if MBED_CONF_CORDIO_ROUTE_UNHANDLED_COMMAND_COMPLETE_EVENTS
850  hciUnhandledCmdCmplEvt_t unhandledCmdCmplEvt;
851  #endif
852  dmL2cCmdRejEvt_t l2cCmdRej; /*!< \brief handles \ref DM_L2C_CMD_REJ_IND */
853  /* common header used by DM_ERROR_IND */
854  hciHwErrorEvt_t hwError; /*!< \brief handles \ref DM_HW_ERROR_IND */
855  hciVendorSpecEvt_t vendorSpec; /*!< \brief handles \ref DM_VENDOR_SPEC_IND */
856 } dmEvt_t;
857 
858 /*! \brief Data type for DmSecSetOob(). */
859 typedef struct
860 {
861  uint8_t localRandom[SMP_RAND_LEN]; /*!< \brief Random value of the local device */
862  uint8_t localConfirm[SMP_CONFIRM_LEN]; /*!< \brief Confirm value of the local device */
863  uint8_t peerRandom[SMP_RAND_LEN]; /*!< \brief Random value of the peer device */
864  uint8_t peerConfirm[SMP_CONFIRM_LEN]; /*!< \brief Confirm value of the peer device */
866 
867 /*! \brief Callback type. */
868 typedef void (*dmCback_t)(dmEvt_t *pDmEvt);
869 
870 /**************************************************************************************************
871  Function Declarations
872 **************************************************************************************************/
873 
874 /** \name DM App Callback Registration
875  *
876  */
877 /**@{*/
878 /*************************************************************************************************/
879 /*!
880  * \brief Register a callback with DM for scan and advertising events.
881  *
882  * \param cback Client callback function.
883  *
884  * \return None.
885  */
886 /*************************************************************************************************/
887 void DmRegister(dmCback_t cback);
888 
889 /**@}*/
890 
891 /** \name DM Advertising Functions
892  * Functions used to control Legacy and Extended Advertising.
893  */
894 /**@{*/
895 
896 /*************************************************************************************************/
897 /*!
898  * \brief Find an advertising data element in the given advertising or scan response data.
899  *
900  * \param adType Advertising data element type to find.
901  * \param dataLen Data length.
902  * \param pData Pointer to advertising or scan response data.
903  *
904  * \return Pointer to the advertising data element byte array or NULL if not found.
905  */
906 /*************************************************************************************************/
907 uint8_t *DmFindAdType(uint8_t adType, uint16_t dataLen, uint8_t *pData);
908 
909 /*************************************************************************************************/
910 /*!
911  * \brief Initialize DM legacy advertising.
912  *
913  * \return None.
914  */
915 /*************************************************************************************************/
916 void DmAdvInit(void);
917 
918 /*************************************************************************************************/
919 /*!
920  * \brief Initialize DM extended advertising.
921  *
922  * \return None.
923  */
924 /*************************************************************************************************/
925 void DmExtAdvInit(void);
926 
927 /*************************************************************************************************/
928 /*!
929  * \brief Whether DM advertising is in legacy mode.
930  *
931  * \return TRUE if DM advertising is in legacy mode. FALSE, otherwise.
932  */
933 /*************************************************************************************************/
934 bool_t DmAdvModeLeg(void);
935 
936 /*************************************************************************************************/
937 /*!
938  * \brief Whether DM advertising is in extended mode.
939  *
940  * \return TRUE if DM advertising is in extended mode. FALSE, otherwise.
941  */
942 /*************************************************************************************************/
943 bool_t DmAdvModeExt(void);
944 
945 /*************************************************************************************************/
946 /*!
947  * \brief Set the advertising parameters using the given advertising type, and peer address.
948  *
949  * \param advHandle Advertising handle.
950  * \param advType Advertising type.
951  * \param peerAddrType Peer address type.
952  * \param pPeerAddr Peer address.
953  *
954  * \return None.
955  */
956 /*************************************************************************************************/
957 void DmAdvConfig(uint8_t advHandle, uint8_t advType, uint8_t peerAddrType, uint8_t *pPeerAddr);
958 
959 /*************************************************************************************************/
960 /*!
961  * \brief Set the advertising or scan response data to the given data.
962  *
963  * \param advHandle Advertising handle.
964  * \param op Data operation.
965  * \param location Data location.
966  * \param len Length of the data. Maximum length is 236 bytes.
967  * \param pData Pointer to the data.
968  *
969  * \return None.
970  */
971 /*************************************************************************************************/
972 void DmAdvSetData(uint8_t advHandle, uint8_t op, uint8_t location, uint8_t len, uint8_t *pData);
973 
974 /*************************************************************************************************/
975 /*!
976  * \brief Start advertising using the given advertising set and duration.
977  *
978  * \param numSets Number of advertising sets to enable.
979  * \param pAdvHandles Advertising handles array.
980  * \param pDuration Advertising duration (in milliseconds) array.
981  * \param pMaxEaEvents Maximum number of extended advertising events array.
982  *
983  * \return None.
984  */
985 /*************************************************************************************************/
986 void DmAdvStart(uint8_t numSets, uint8_t *pAdvHandles, uint16_t *pDuration, uint8_t *pMaxEaEvents);
987 
988 /*************************************************************************************************/
989 /*!
990  * \brief Stop advertising for the given advertising set. If the number of sets is set to 0
991  * then all advertising sets are disabled.
992  *
993  * \param numSets Number of advertising sets to disable.
994  * \param pAdvHandles Advertising handles array.
995  *
996  * \return None.
997  */
998 /*************************************************************************************************/
999 void DmAdvStop(uint8_t numSets, uint8_t *pAdvHandles);
1000 
1001 /*************************************************************************************************/
1002 /*!
1003  * \brief Remove an advertising set.
1004  *
1005  * \param advHandle Advertising handle.
1006  *
1007  * \return None.
1008  */
1009 /*************************************************************************************************/
1010 void DmAdvRemoveAdvSet(uint8_t advHandle);
1011 
1012 /*************************************************************************************************/
1013 /*!
1014  * \brief Clear advertising sets.
1015  *
1016  * \return None.
1017  */
1018 /*************************************************************************************************/
1019 void DmAdvClearAdvSets(void);
1020 
1021 /*************************************************************************************************/
1022 /*!
1023  * \brief Set the random device address for a given advertising set.
1024  *
1025  * \param advHandle Advertising handle.
1026  * \param pAddr Random device address.
1027  *
1028  * \return None.
1029  */
1030 /*************************************************************************************************/
1031 void DmAdvSetRandAddr(uint8_t advHandle, const uint8_t *pAddr);
1032 
1033 /*************************************************************************************************/
1034 /*!
1035  * \brief Set the minimum and maximum advertising intervals.
1036  *
1037  * \param advHandle Advertising handle.
1038  * \param intervalMin Minimum advertising interval.
1039  * \param intervalMax Maximum advertising interval.
1040  *
1041  * \return None.
1042  */
1043 /*************************************************************************************************/
1044 void DmAdvSetInterval(uint8_t advHandle, uint16_t intervalMin, uint16_t intervalMax);
1045 
1046 /*************************************************************************************************/
1047 /*!
1048  * \brief Include or exclude certain channels from the advertising channel map.
1049  *
1050  * \param advHandle Advertising handle.
1051  * \param channelMap Advertising channel map.
1052  *
1053  * \return None.
1054  */
1055 /*************************************************************************************************/
1056 void DmAdvSetChannelMap(uint8_t advHandle, uint8_t channelMap);
1057 
1058 /*************************************************************************************************/
1059 /*!
1060  * \brief Set the local address type used while advertising. This function can be used to
1061  * configure advertising to use a random address.
1062  *
1063  * \param addrType Address type.
1064  *
1065  * \return None.
1066  */
1067 /*************************************************************************************************/
1068 void DmAdvSetAddrType(uint8_t addrType);
1069 
1070 /*************************************************************************************************/
1071 /*!
1072  * \brief Set the value of an advertising data element in the given advertising or
1073  * scan response data. If the element already exists in the data then it is replaced
1074  * with the new value. If the element does not exist in the data it is appended
1075  * to it, space permitting.
1076  *
1077  * \param adType Advertising data element type.
1078  * \param len Length of the value. Maximum length is 29 bytes.
1079  * \param pValue Pointer to the value.
1080  * \param pAdvDataLen Advertising or scan response data length. The new length is returned
1081  * in this parameter.
1082  * \param pAdvData Pointer to advertising or scan response data.
1083  * \param advDataBufLen Length of the advertising or scan response data buffer maintained by
1084  * Application.
1085  *
1086  * \return TRUE if the element was successfully added to the data, FALSE otherwise.
1087  */
1088 /*************************************************************************************************/
1089 bool_t DmAdvSetAdValue(uint8_t adType, uint8_t len, uint8_t *pValue, uint16_t *pAdvDataLen,
1090  uint8_t *pAdvData, uint16_t advDataBufLen);
1091 
1092 /*************************************************************************************************/
1093 /*!
1094  * \brief Set the device name in the given advertising or scan response data. If the
1095  * name can only fit in the data if it is shortened, the name is shortened
1096  * and the AD type is changed to DM_ADV_TYPE_SHORT_NAME.
1097  *
1098  * \param len Length of the name. Maximum length is 29 bytes.
1099  * \param pValue Pointer to the name in UTF-8 format.
1100  * \param pAdvDataLen Advertising or scan response data length. The new length is returned
1101  * in this parameter.
1102  * \param pAdvData Pointer to advertising or scan response data.
1103  * \param advDataBufLen Length of the advertising or scan response data buffer maintained by
1104  * Application.
1105  *
1106  * \return TRUE if the element was successfully added to the data, FALSE otherwise.
1107  */
1108 /*************************************************************************************************/
1109 bool_t DmAdvSetName(uint8_t len, uint8_t *pValue, uint16_t *pAdvDataLen, uint8_t *pAdvData,
1110  uint16_t advDataBufLen);
1111 
1112 /*************************************************************************************************/
1113 /*!
1114  * \brief Initialize device privacy module.
1115  *
1116  * \return None.
1117  */
1118 /*************************************************************************************************/
1119 void DmDevPrivInit(void);
1120 
1121 /*************************************************************************************************/
1122 /*!
1123  * \brief Start using a private resolvable address.
1124  *
1125  * \param changeInterval Interval between automatic address changes, in seconds.
1126  *
1127  * \return None.
1128  */
1129 /*************************************************************************************************/
1130 void DmDevPrivStart(uint16_t changeInterval);
1131 
1132 /*************************************************************************************************/
1133 /*!
1134  * \brief Stop using a private resolvable address.
1135  *
1136  * \return None.
1137  */
1138 /*************************************************************************************************/
1139 void DmDevPrivStop(void);
1140 
1141 /*************************************************************************************************/
1142 /*!
1143  * \brief Set whether or not to use legacy advertising PDUs with extended advertising.
1144  *
1145  * \param advHandle Advertising handle.
1146  * \param useLegacyPdu Whether to use legacy advertising PDUs (default value is TRUE).
1147  *
1148  * \return None.
1149  */
1150 /*************************************************************************************************/
1151 void DmAdvUseLegacyPdu(uint8_t advHandle, bool_t useLegacyPdu);
1152 
1153 /*************************************************************************************************/
1154 /*!
1155  * \brief Set whether or not to omit advertiser's address from all PDUs (anonymous advertising).
1156  *
1157  * \param advHandle Advertising handle.
1158  * \param omitAdvAddr Whether to omit advertiser's address from all PDUs (default value is FALSE).
1159  *
1160  * \return None.
1161  */
1162 /*************************************************************************************************/
1163 void DmAdvOmitAdvAddr(uint8_t advHandle, bool_t omitAdvAddr);
1164 
1165 /*************************************************************************************************/
1166 /*!
1167  * \brief Set whether or not to include TxPower in extended header of advertising PDU.
1168  *
1169  * \param advHandle Advertising handle.
1170  * \param incTxPwr Whether to include TxPower in extended header of advertising PDU (default
1171  * value is FALSE).
1172  * \param advTxPwr Advertising tx power (127 = no preference).
1173  *
1174  * \return None.
1175  */
1176 /*************************************************************************************************/
1177 void DmAdvIncTxPwr(uint8_t advHandle, bool_t incTxPwr, int8_t advTxPwr);
1178 
1179 /*************************************************************************************************/
1180 /*!
1181  * \brief Set extended advertising PHY parameters.
1182  *
1183  * \param advHandle Advertising handle.
1184  * \param priAdvPhy Primary advertising Phy.
1185  * \param secAdvMaxSkip Maximum advertising events Controller can skip before sending AUX_ADV_IND
1186  * on secondary advertising channel (0 = AUX_ADV_IND will be sent prior to
1187  * next advertising event).
1188  * \param secAdvPhy Secondary advertising Phy.
1189  *
1190  * \return None.
1191  */
1192 /*************************************************************************************************/
1193 void DmAdvSetPhyParam(uint8_t advHandle, uint8_t priAdvPhy, uint8_t secAdvMaxSkip, uint8_t secAdvPhy);
1194 
1195 /*************************************************************************************************/
1196 /*!
1197  * \brief Set scan request notification enable.
1198  *
1199  * \param advHandle Advertising handle.
1200  * \param scanReqNotifEna Scan request notification enable.
1201  *
1202  * \return None.
1203  */
1204 /*************************************************************************************************/
1205 void DmAdvScanReqNotifEnable(uint8_t advHandle, bool_t scanReqNotifEna);
1206 
1207 /*************************************************************************************************/
1208 /*!
1209  * \brief Set fragment preference for advertising data.
1210  *
1211  * \param advHandle Advertising handle.
1212  * \param fragPref Fragment preference.
1213  *
1214  * \return None.
1215  */
1216 /*************************************************************************************************/
1217 void DmAdvSetFragPref(uint8_t advHandle, uint8_t fragPref);
1218 
1219 /*************************************************************************************************/
1220 /*!
1221  * \brief Set advertising SID for the given advertising handle.
1222  *
1223  * \param advHandle Advertising handle.
1224  * \param advSid Advertsing SID.
1225  *
1226  * \return None.
1227  */
1228 /*************************************************************************************************/
1229 void DmAdvSetSid(uint8_t advHandle, uint8_t advSid);
1230 
1231 /*************************************************************************************************/
1232 /*!
1233  * \brief Set the advertising parameters for periodic advertising.
1234  *
1235  * \param advHandle Advertising handle.
1236  *
1237  * \return None.
1238  */
1239 /*************************************************************************************************/
1240 void DmPerAdvConfig(uint8_t advHandle);
1241 
1242 /*************************************************************************************************/
1243 /*!
1244  * \brief Set the advertising data to the given data for periodic advertising.
1245  *
1246  * \param advHandle Advertising handle.
1247  * \param op Data operation.
1248  * \param len Length of the data. Maximum length is 236 bytes.
1249  * \param pData Pointer to the data.
1250  *
1251  * \return None.
1252  */
1253 /*************************************************************************************************/
1254 void DmPerAdvSetData(uint8_t advHandle, uint8_t op, uint8_t len, uint8_t *pData);
1255 
1256 /*************************************************************************************************/
1257 /*!
1258  * \brief Start periodic advertising for the advertising set specified by the advertising handle.
1259  *
1260  * \param advHandle Advertising handle.
1261  *
1262  * \return None.
1263  */
1264 /*************************************************************************************************/
1265 void DmPerAdvStart(uint8_t advHandle);
1266 
1267 /*************************************************************************************************/
1268 /*!
1269  * \brief Stop periodic advertising for the advertising set specified by the advertising handle.
1270  *
1271  * \param advHandle Advertising handle.
1272  *
1273  * \return None.
1274  */
1275 /*************************************************************************************************/
1276 void DmPerAdvStop(uint8_t advHandle);
1277 
1278 
1279 /*************************************************************************************************/
1280 /*!
1281  * \brief Set the minimum and maximum advertising intervals for periodic advertising.
1282  *
1283  * \param advHandle Advertising handle.
1284  * \param intervalMin Minimum advertising interval.
1285  * \param intervalMax Maximum advertising interval.
1286  *
1287  * \return None.
1288  */
1289 /*************************************************************************************************/
1290 void DmPerAdvSetInterval(uint8_t advHandle, uint16_t intervalMin, uint16_t intervalMax);
1291 
1292 /*************************************************************************************************/
1293 /*!
1294  * \brief Set whether or not to include TxPower in extended header of advertising PDU for
1295  * periodic advertising.
1296  *
1297  * \param advHandle Advertising handle.
1298  * \param incTxPwr Whether to include TxPower in extended header of advertising PDU (default
1299  * value is FALSE).
1300  *
1301  * \return None.
1302  */
1303 /*************************************************************************************************/
1304 void DmPerAdvIncTxPwr(uint8_t advHandle, bool_t incTxPwr);
1305 
1306 /*************************************************************************************************/
1307 /*!
1308  * \brief Get status of periodic advertising handle.
1309  *
1310  * \param advHandle Advertising handle.
1311  *
1312  * \return TRUE if periodic advertising is running on that handle. FALSE, otherwise.
1313 */
1314 /*************************************************************************************************/
1315 bool_t DmPerAdvEnabled(uint8_t advHandle);
1316 
1317 /*************************************************************************************************/
1318 /*!
1319  * \brief Get the maximum advertising data length supported by Controller for a given advertising
1320  * type.
1321  *
1322  * \param advType Advertising type.
1323  * \param useLegacyPdu Whether to use legacy advertising PDUs with extended advertising.
1324  *
1325  * \return Maximum advertising data length.
1326  */
1327 /*************************************************************************************************/
1328 uint16_t DmExtMaxAdvDataLen(uint8_t advType, bool_t useLegacyPdu);
1329 
1330 /**@}*/
1331 
1332 /** \name DM Privacy Functions
1333  * Functions for controlling Privacy.
1334  */
1335 /**@{*/
1336 
1337 /*************************************************************************************************/
1338 /*!
1339  * \brief Initialize DM privacy module.
1340  *
1341  * \return None.
1342  */
1343 /*************************************************************************************************/
1344 void DmPrivInit(void);
1345 
1346 /*************************************************************************************************/
1347 /*!
1348  * \brief Resolve a private resolvable address. When complete the client's callback function
1349  * is called with a DM_PRIV_RESOLVED_ADDR_IND event. The client must wait to receive
1350  * this event before executing this function again.
1351  *
1352  * \param pAddr Peer device address.
1353  * \param pIrk The peer's identity resolving key.
1354  * \param param Client-defined parameter returned with callback event.
1355  *
1356  * \return None.
1357  */
1358 /*************************************************************************************************/
1359 void DmPrivResolveAddr(uint8_t *pAddr, uint8_t *pIrk, uint16_t param);
1360 
1361 /*************************************************************************************************/
1362 /*!
1363  * \brief Add device to resolving list. When complete the client's callback function
1364  * is called with a DM_PRIV_ADD_DEV_TO_RES_LIST_IND event. The client must wait
1365  * to receive this event before executing this function again.
1366  *
1367  * \param addrType Peer identity address type.
1368  * \param pIdentityAddr Peer identity address.
1369  * \param pPeerIrk The peer's identity resolving key.
1370  * \param pLocalIrk The local identity resolving key.
1371  * \param enableLlPriv Set to TRUE to enable address resolution in LL.
1372  * \param param client-defined parameter returned with callback event.
1373  *
1374  * \return None.
1375  *
1376  * \Note This command cannot be used when address resolution is enabled in the Controller and:
1377  * - Advertising (other than periodic advertising) is enabled,
1378  * - Scanning is enabled, or
1379  * - (Extended) Create connection or Create Sync command is outstanding.
1380  *
1381  * \Note If the local or peer IRK associated with the peer Identity Address is all zeros then
1382  * the Controller will use or accept the local or peer Identity Address respectively.
1383  *
1384  * \Note Parameter 'enableLlPriv' should be set to TRUE when the last device is being added
1385  * to resolving list to enable address resolution in the Controller.
1386  */
1387 /*************************************************************************************************/
1388 void DmPrivAddDevToResList(uint8_t addrType, const uint8_t *pIdentityAddr, uint8_t *pPeerIrk,
1389  uint8_t *pLocalIrk, bool_t enableLlPriv, uint16_t param);
1390 
1391 /*************************************************************************************************/
1392 /*!
1393  * \brief Remove device from resolving list. When complete the client's callback function
1394  * is called with a DM_PRIV_REM_DEV_FROM_RES_LIST_IND event. The client must wait to
1395  * receive this event before executing this function again.
1396  *
1397  * \param addrType Peer identity address type.
1398  * \param pIdentityAddr Peer identity address.
1399  * \param param client-defined parameter returned with callback event.
1400  *
1401  * \return None.
1402  *
1403  * \Note This command cannot be used when address resolution is enabled in the Controller and:
1404  * - Advertising (other than periodic advertising) is enabled,
1405  * - Scanning is enabled, or
1406  * - (Extended) Create connection or Create Sync command is outstanding.
1407  */
1408 /*************************************************************************************************/
1409 void DmPrivRemDevFromResList(uint8_t addrType, const uint8_t *pIdentityAddr, uint16_t param);
1410 
1411 /*************************************************************************************************/
1412 /*!
1413  * \brief Clear resolving list. When complete the client's callback function is called with a
1414  * DM_PRIV_CLEAR_RES_LIST_IND event. The client must wait to receive this event before
1415  * executing this function again.
1416  *
1417  * \return None.
1418  *
1419  * \Note This command cannot be used when address resolution is enabled in the Controller and:
1420  * - Advertising (other than periodic advertising) is enabled,
1421  * - Scanning is enabled, or
1422  * - (Extended) Create connection or Create Sync command is outstanding.
1423  *
1424  * \Note Address resolution in Controller will be disabled when resolving list's cleared
1425  * successfully.
1426  */
1427 /*************************************************************************************************/
1428 void DmPrivClearResList(void);
1429 
1430 /*************************************************************************************************/
1431 /*!
1432  * \brief HCI read peer resolvable address command. When complete the client's callback
1433  * function is called with a DM_PRIV_READ_PEER_RES_ADDR_IND event. The client must
1434  * wait to receive this event before executing this function again.
1435  *
1436  * \param addrType Peer identity address type.
1437  * \param pIdentityAddr Peer identity address.
1438  *
1439  * \return None.
1440  */
1441 /*************************************************************************************************/
1442 void DmPrivReadPeerResolvableAddr(uint8_t addrType, const uint8_t *pIdentityAddr);
1443 
1444 /*************************************************************************************************/
1445 /*!
1446  * \brief Read local resolvable address command. When complete the client's callback
1447  * function is called with a DM_PRIV_READ_LOCAL_RES_ADDR_IND event. The client must
1448  * wait to receive this event before executing this function again.
1449  *
1450  * \param addrType Peer identity address type.
1451  * \param pIdentityAddr Peer identity address.
1452  *
1453  * \return None.
1454  */
1455 /*************************************************************************************************/
1456 void DmPrivReadLocalResolvableAddr(uint8_t addrType, const uint8_t *pIdentityAddr);
1457 
1458 /*************************************************************************************************/
1459 /*!
1460  * \brief Enable or disable address resolution in LL. When complete the client's callback
1461  * function is called with a DM_PRIV_SET_ADDR_RES_ENABLE_IND event. The client must
1462  * wait to receive this event before executing this function again.
1463  *
1464  * \param enable Set to TRUE to enable address resolution or FALSE to disable it.
1465  *
1466  * \return None.
1467  *
1468  * \Note This command can be used at any time except when:
1469  * - Advertising (other than periodic advertising) is enabled,
1470  * - Scanning is enabled, or
1471  * - (Extended) Create connection or Create Sync command is outstanding.
1472  */
1473 /*************************************************************************************************/
1474 void DmPrivSetAddrResEnable(bool_t enable);
1475 
1476 /*************************************************************************************************/
1477 /*!
1478  * \brief Set resolvable private address timeout command.
1479  *
1480  * \param rpaTimeout Timeout measured in seconds.
1481  *
1482  * \return None.
1483  */
1484 /*************************************************************************************************/
1485 void DmPrivSetResolvablePrivateAddrTimeout(uint16_t rpaTimeout);
1486 
1487 /*************************************************************************************************/
1488 /*!
1489  * \brief Set privacy mode for a given entry in the resolving list.
1490  *
1491  * \param addrType Peer identity address type.
1492  * \param pIdentityAddr Peer identity address.
1493  * \param mode Privacy mode (by default, network privacy mode is used).
1494  *
1495  * \return None.
1496  *
1497  * \Note This command can be used at any time except when:
1498  * - Advertising (other than periodic advertising) is enabled,
1499  * - Scanning is enabled, or
1500  * - (Extended) Create connection or Create Sync command is outstanding.
1501  */
1502 /*************************************************************************************************/
1503 void DmPrivSetPrivacyMode(uint8_t addrType, const uint8_t *pIdentityAddr, uint8_t mode);
1504 
1505 /*************************************************************************************************/
1506 /*!
1507  * \brief Generate a Resolvable Private Address (RPA).
1508  *
1509  * \param pIrk The identity resolving key.
1510  * \param param Client-defined parameter returned with callback event.
1511  *
1512  * \return None.
1513  */
1514 /*************************************************************************************************/
1515 void DmPrivGenerateAddr(uint8_t *pIrk, uint16_t param);
1516 
1517 /*************************************************************************************************/
1518 /*!
1519  * \brief Whether LL Privacy is enabled.
1520  *
1521  * \return TRUE if LL Privacy is enabled. FALSE, otherwise.
1522  */
1523 /*************************************************************************************************/
1524 bool_t DmLlPrivEnabled(void);
1525 
1526 /**@}*/
1527 
1528 /** \name DM Scanner Functions
1529  * Functions for controlling Legacy and Extended Scanner behavior.
1530  */
1531 /**@{*/
1532 
1533 /*************************************************************************************************/
1534 /*!
1535  * \brief Initialize DM legacy scanning.
1536  *
1537  * \return None.
1538  */
1539 /*************************************************************************************************/
1540 void DmScanInit(void);
1541 
1542 /*************************************************************************************************/
1543 /*!
1544  * \brief Initialize DM extended scanning.
1545  *
1546  * \return None.
1547  */
1548 /*************************************************************************************************/
1549 void DmExtScanInit(void);
1550 
1551 /*************************************************************************************************/
1552 /*!
1553  * \brief Initialize DM Periodic Advertising Sync Transfer (PAST) module.
1554  *
1555  * \return None.
1556  */
1557 /*************************************************************************************************/
1558 void DmPastInit(void);
1559 
1560 /*************************************************************************************************/
1561 /*!
1562  * \brief Initialize DM Connection Constant Tone Extension (CTE) module.
1563  *
1564  * \return None.
1565  */
1566 /*************************************************************************************************/
1567 void DmConnCteInit(void);
1568 
1569 /*************************************************************************************************/
1570 /*!
1571  * \brief Whether DM scanning is in legacy mode.
1572  *
1573  * \return TRUE if DM scanning is in legacy mode. FALSE, otherwise.
1574  */
1575 /*************************************************************************************************/
1576 bool_t DmScanModeLeg(void);
1577 
1578 /*************************************************************************************************/
1579 /*!
1580  * \brief Whether DM scanning is in extended mode.
1581  *
1582  * \return TRUE if DM scanning is in extended mode. FALSE, otherwise.
1583  */
1584 /*************************************************************************************************/
1585 bool_t DmScanModeExt(void);
1586 
1587 /*************************************************************************************************/
1588 /*!
1589  * \brief Start scanning on the given PHYs.
1590  *
1591  * \param scanPhys Scanner PHYs.
1592  * \param mode Discoverability mode.
1593  * \param pScanType Scan type array.
1594  * \param filterDup Filter duplicates. Set to TRUE to filter duplicate responses received
1595  * from the same device. Set to FALSE to receive all responses.
1596  * \param duration The scan duration, in milliseconds. If set to zero or both duration and
1597  * period set to non-zero, scanning will continue until DmScanStop() is called.
1598  * \param period The scan period, in 1.28 sec units (only applicable to AE). If set to zero,
1599  * periodic scanning is disabled.
1600  *
1601  * \return None.
1602  */
1603  /*************************************************************************************************/
1604 void DmScanStart(uint8_t scanPhys, uint8_t mode, const uint8_t *pScanType, bool_t filterDup,
1605  uint16_t duration, uint16_t period);
1606 
1607 /*************************************************************************************************/
1608 /*!
1609  * \brief Stop scanning.
1610  *
1611  * \return None.
1612  */
1613 /*************************************************************************************************/
1614 void DmScanStop(void);
1615 
1616 /*************************************************************************************************/
1617 /*!
1618  * \brief Set the scan interval and window for the specified PHYs.
1619  *
1620  * \param scanPhys Scanning PHYs.
1621  * \param pScanInterval Scan interval array.
1622  * \param pScanWindow Scan window array.
1623  *
1624  * \return None.
1625  */
1626 /*************************************************************************************************/
1627 void DmScanSetInterval(uint8_t scanPhys, uint16_t *pScanInterval, uint16_t *pScanWindow);
1628 
1629 /*************************************************************************************************/
1630 /*!
1631  * \brief Set the local address type used while scanning. This function can be used to
1632  * configure scanning to use a random address.
1633  *
1634  * \param addrType Address type.
1635  *
1636  * \return None.
1637  */
1638 /*************************************************************************************************/
1639 void DmScanSetAddrType(uint8_t addrType);
1640 
1641 /*************************************************************************************************/
1642 /*!
1643  * \brief Synchronize with periodic advertising from the given advertiser, and start receiving
1644  * periodic advertising packets.
1645  *
1646  * Note: The synchronization filter policy is used to determine whether the periodic
1647  * advertiser list is used. If the periodic advertiser list is not used, the
1648  * advertising SID, advertiser address type, and advertiser address parameters
1649  * specify the periodic advertising device to listen to; otherwise these parameters
1650  * are ignored.
1651  *
1652  * \param advSid Advertising SID.
1653  * \param advAddrType Advertiser address type.
1654  * \param pAdvAddr Advertiser address.
1655  * \param skip Number of periodic advertising packets that can be skipped after
1656  * successful receive.
1657  * \param syncTimeout Synchronization timeout.
1658  *
1659  * \return Sync indentifier.
1660  */
1661 /*************************************************************************************************/
1662 dmSyncId_t DmSyncStart(uint8_t advSid, uint8_t advAddrType, const uint8_t *pAdvAddr, uint16_t skip,
1663  uint16_t syncTimeout);
1664 
1665 /*************************************************************************************************/
1666 /*!
1667  * \brief Stop reception of the periodic advertising identified by the given sync identifier.
1668  *
1669  * \param syncId Sync identifier.
1670  *
1671  * \return None.
1672  */
1673 /*************************************************************************************************/
1674 void DmSyncStop(dmSyncId_t syncId);
1675 
1676 /*************************************************************************************************/
1677 /*!
1678  * \brief Set the encryption mode of the Broadcast Isochronous Group (BIG) corresponding to the
1679  * periodic advertising train identified by the sync handle.
1680  *
1681  * \param syncHandle Synch handle.
1682  * \param encrypt FALSE (Unencrypted) or FALSE (Encrypted).
1683  *
1684  * \return None.
1685  */
1686 /*************************************************************************************************/
1687 void DmSyncSetEncrypt(uint16_t syncHandle, bool_t encrypt);
1688 
1689 /*************************************************************************************************/
1690 /*!
1691  * \brief Get the encryption mode of the Broadcast Isochronous Group (BIG) corresponding to the
1692  * periodic advertising train identified by the sync handle.
1693  *
1694  * \param syncHandle Synch handle.
1695  *
1696  * \return TRUE if sync encrypted. FALSE, otherwise.
1697  */
1698 /*************************************************************************************************/
1699 bool_t DmSyncEncrypted(uint16_t syncHandle);
1700 
1701 /*************************************************************************************************/
1702 /*!
1703  * \brief Get status of sync identified by the handle.
1704  *
1705  * \param syncHandle Synch handle.
1706  *
1707  * \return TRUE if sync is enabled for that handle. FALSE, otherwise.
1708  */
1709 /*************************************************************************************************/
1710 bool_t DmSyncEnabled(uint16_t syncHandle);
1711 
1712 /*************************************************************************************************/
1713 /*!
1714  * \brief DM enable or disable initial periodic advertisement reporting.
1715  *
1716  * \param enable TRUE to enable initial reporting, FALSE to disable initial reporting.
1717  *
1718  * \return None.
1719  */
1720 /*************************************************************************************************/
1721 void DmSyncInitialRptEnable(bool_t enable);
1722 
1723 /*************************************************************************************************/
1724 /*!
1725  * \brief Synchronize to a Broadcast Isochronous Group (BIG) described in the periodic
1726  * advertising train specified by the sync handle.
1727  *
1728  * \param bigHandle BIG handle.
1729  * \param syncHandle Periodic advertising train handle.
1730  * \param mse Maximum number of subevents.
1731  * \param bigSyncTimeout Synchronization timeout for the BIS, in the units of 10ms.
1732  * \param numBis Total number of BISes in the BIG.
1733  * \param pBis List of indices of BISes (in ascending order).
1734  *
1735  * \return None.
1736  */
1737 /*************************************************************************************************/
1738 void DmBigSyncStart(uint8_t bigHandle, uint16_t syncHandle, uint8_t mse, uint16_t bigSyncTimeout,
1739  uint8_t numBis, uint8_t *pBis);
1740 
1741 /*************************************************************************************************/
1742 /*!
1743  * \brief Stop synchronizing or cancel the process of synchronizing to the Broadcast Isochronous
1744  * Group (BIG) identified by the handle.
1745  *
1746  * \note The command also terminates the reception of BISes in the BIG specified in \ref
1747  * DmBigSyncStart, destroys the associated connection handles of the BISes in the BIG
1748  * and removes the data paths for all BISes in the BIG.
1749  *
1750  * \param bigHandle BIG handle.
1751  *
1752  * \return None.
1753  */
1754 /*************************************************************************************************/
1755 void DmBigSyncStop(uint8_t bigHandle);
1756 
1757 /*************************************************************************************************/
1758 /*!
1759  * \brief For internal use only. Return TRUE if the BIS sync is in use.
1760  *
1761  * \param handle BIS connection handle.
1762  *
1763  * \return TRUE if the BIS sync is in use, FALSE otherwise.
1764  */
1765 /*************************************************************************************************/
1766 bool_t DmBisSyncInUse(uint16_t handle);
1767 
1768 /*************************************************************************************************/
1769 /*!
1770  * \brief Set the Broadcast Code for the given Broadcast Isochronous Group (BIG).
1771  *
1772  * \param bigHandle BIG handle.
1773  * \param encrypt FALSE (Unencrypted) or TRUE (Encrypted).
1774  * \param authen FALSE (Unauthenticated) or TRUE (Authenticated).
1775  * \param pBcastCode Broadcast code.
1776  *
1777  * \return None.
1778  */
1779 /*************************************************************************************************/
1780 void DmBigSyncSetBcastCode(uint8_t bigHandle, bool_t encrypt, bool_t authen, uint8_t *pBcastCode);
1781 
1782 /*************************************************************************************************/
1783 /*!
1784  * \brief Set the security level of the LE Security Mode 3 for the given Broadcast Isochronous
1785  * Group (BIG).
1786  *
1787  * \param bigHandle BIG handle.
1788  * \param secLevel Security level.
1789  *
1790  * \return None.
1791  */
1792 /*************************************************************************************************/
1793 void DmBigSyncSetSecLevel(uint8_t bigHandle, uint8_t secLevel);
1794 
1795 /*************************************************************************************************/
1796 /*!
1797  * \brief Get the security level of the LE Security Mode 3 for the given Broadcast Isochronous
1798  * Group (BIG) connection handle.
1799  *
1800  * \param handle BIS connection handle.
1801  *
1802  * \return Security level.
1803  */
1804 /*************************************************************************************************/
1805 uint8_t DmBigSyncGetSecLevel(uint16_t handle);
1806 
1807 /*************************************************************************************************/
1808 /*!
1809  * \brief Initialize DM BIS manager for operation as master.
1810  *
1811  * \return None.
1812  */
1813 /*************************************************************************************************/
1814 void DmBisMasterInit(void);
1815 
1816 /*************************************************************************************************/
1817 /*!
1818  * \brief Add device to periodic advertiser list.
1819  *
1820  * \param advAddrType Advertiser address type.
1821  * \param pAdvAddr Advertiser address.
1822  * \param advSid Advertising SID.
1823  *
1824  * \return None.
1825  */
1826 /*************************************************************************************************/
1827 void DmAddDeviceToPerAdvList(uint8_t advAddrType, uint8_t *pAdvAddr, uint8_t advSid);
1828 
1829 /*************************************************************************************************/
1830 /*!
1831  * \brief DM remove device from periodic advertiser list.
1832  *
1833  * \param advAddrType Advertiser address type.
1834  * \param pAdvAddr Advertiser address.
1835  * \param advSid Advertising SID.
1836  *
1837  * \return None.
1838  */
1839 /*************************************************************************************************/
1840 void DmRemoveDeviceFromPerAdvList(uint8_t advAddrType, uint8_t *pAdvAddr, uint8_t advSid);
1841 
1842 /*************************************************************************************************/
1843 /*!
1844  * \brief DM clear periodic advertiser list.
1845  *
1846  * \return None.
1847  */
1848 /*************************************************************************************************/
1849 void DmClearPerAdvList(void);
1850 
1851 /*************************************************************************************************/
1852 /*!
1853  * \brief Enable or disable reports for the periodic advertising identified by the sync id.
1854  *
1855  * \param syncId Sync identifier.
1856  * \param enable TRUE to enable reporting, FALSE to disable reporting.
1857  *
1858  * \return None.
1859  */
1860 /*************************************************************************************************/
1861 void DmPastRptRcvEnable(dmSyncId_t syncId, bool_t enable);
1862 
1863 /*************************************************************************************************/
1864 /*!
1865  * \brief Send synchronization information about the periodic advertising identified by the
1866  * sync id to a connected device.
1867  *
1868  * \param connId Connection identifier.
1869  * \param serviceData Value provided by the Host.
1870  * \param syncId Sync identifier.
1871  *
1872  * \return None.
1873  */
1874 /*************************************************************************************************/
1875 void DmPastSyncTrsf(dmConnId_t connId, uint16_t serviceData, dmSyncId_t syncId);
1876 
1877 /*************************************************************************************************/
1878 /*!
1879  * \brief Send synchronization information about the periodic advertising in an advertising
1880  * set to a connected device.
1881  *
1882  * \param connId Connection identifier.
1883  * \param serviceData Value provided by the Host.
1884  * \param advHandle Advertising handle.
1885  *
1886  * \return None.
1887  */
1888 /*************************************************************************************************/
1889 void DmPastSetInfoTrsf(dmConnId_t connId, uint16_t serviceData, uint8_t advHandle);
1890 
1891 /*************************************************************************************************/
1892 /*!
1893  * \brief Specify how the Controller should process periodic advertising synchronization
1894  * information received from the device identified by the connnection handle.
1895  *
1896  * \param connId Connection identifier.
1897  * \param mode Action to be taken when periodic advertising info is received.
1898  * \param skip Number of consecutive periodic advertising packets that the receiver
1899  * may skip after successfully receiving a periodic advertising packet.
1900  * \param syncTimeout Maximum permitted time between successful receives. If this time is
1901  * exceeded, synchronization is lost.
1902  * \param cteType Whether to only synchronize to periodic advertising with certain
1903  * types of Constant Tone Extension.
1904  *
1905  * \return None.
1906  */
1907 /*************************************************************************************************/
1908 void DmPastConfig(dmConnId_t connId, uint8_t mode, uint16_t skip, uint16_t syncTimeout,
1909  uint8_t cteType);
1910 
1911 /*************************************************************************************************/
1912 /*!
1913  * \brief Specify the initial value for the mode, skip, timeout, and Constant Tone Extension type
1914  * to be used for all subsequent connections over the LE transport.
1915  *
1916  * \param mode Action to be taken when periodic advertising info is received.
1917  * \param skip Number of consecutive periodic advertising packets that the receiver
1918  * may skip after successfully receiving a periodic advertising packet.
1919  * \param syncTimeout Maximum permitted time between successful receives. If this time is
1920  * exceeded, synchronization is lost.
1921  * \param cteType Whether to only synchronize to periodic advertising with certain
1922  * types of Constant Tone Extension.
1923  *
1924  * \return None.
1925  */
1926 /*************************************************************************************************/
1927 void DmPastDefaultConfig(uint8_t mode, uint16_t skip, uint16_t syncTimeout, uint8_t cteType);
1928 
1929 /*************************************************************************************************/
1930 /*!
1931  * \brief Enable sampling received CTE fields on the specified connection, and configure the
1932  * antenna switching pattern, and switching and sampling slot durations to be used.
1933  *
1934  * \param connId Connection identifier.
1935  * \param slotDurations Switching and sampling slot durations to be used while receiving CTE.
1936  * \param switchPatternLen Number of Antenna IDs in switching pattern.
1937  * \param pAntennaIDs List of Antenna IDs in switching pattern.
1938  *
1939  * \return None.
1940  */
1941 /*************************************************************************************************/
1942 void DmConnCteRxSampleStart(dmConnId_t connId, uint8_t slotDurations, uint8_t switchPatternLen,
1943  uint8_t *pAntennaIDs);
1944 
1945 /*************************************************************************************************/
1946 /*!
1947  * \brief Disable sampling received CTE fields on the specified connection.
1948  *
1949  * \param connId Connection identifier.
1950  *
1951  * \return None.
1952  */
1953 /*************************************************************************************************/
1954 void DmConnCteRxSampleStop(dmConnId_t connId);
1955 
1956 /*************************************************************************************************/
1957 /*!
1958  * \brief Configure the antenna switching pattern, and permitted CTE types used for transmitting
1959  * CTEs requested by the peer device on the specified connection.
1960  *
1961  * \param connId Connection identifier.
1962  * \param cteTypeBits Permitted CTE type bits used for transmitting CTEs requested by peer.
1963  * \param switchPatternLen Number of Antenna IDs in switching pattern.
1964  * \param pAntennaIDs List of Antenna IDs in switching pattern.
1965  *
1966  * \return None.
1967  */
1968 /*************************************************************************************************/
1969 void DmConnCteTxConfig(dmConnId_t connId, uint8_t cteTypeBits, uint8_t switchPatternLen,
1970  uint8_t *pAntennaIDs);
1971 
1972 /*************************************************************************************************/
1973 /*!
1974  * \brief Initiate the CTE Request procedure on the specified connection.
1975  *
1976  * \param connId Connection identifier.
1977  * \param cteReqInt CTE request interval.
1978  * \param reqCteLen Minimum length of CTE being requested in 8 us units.
1979  * \param reqCteType Requested CTE type.
1980  *
1981  * \return None.
1982  */
1983 /*************************************************************************************************/
1984 void DmConnCteReqStart(dmConnId_t connId, uint16_t cteReqInt, uint8_t reqCteLen,
1985  uint8_t reqCteType);
1986 
1987 /*************************************************************************************************/
1988 /*!
1989  * \brief Stop initiating the CTE Request procedure on the specified connection.
1990  *
1991  * \param connId Connection identifier.
1992  *
1993  * \return None.
1994  */
1995 /*************************************************************************************************/
1996 void DmConnCteReqStop(dmConnId_t connId);
1997 
1998 /*************************************************************************************************/
1999 /*!
2000  * \brief Start responding to LL_CTE_REQ PDUs with LL_CTE_RSP PDUs on the specified connection.
2001  *
2002  * \param connId Connection identifier.
2003  *
2004  * \return None.
2005  */
2006 /*************************************************************************************************/
2007 void DmConnCteRspStart(dmConnId_t connId);
2008 
2009 /*************************************************************************************************/
2010 /*!
2011  * \brief Stop responding to LL_CTE_REQ PDUs with LL_CTE_RSP PDUs on the specified connection.
2012  *
2013  * \param connId Connection identifier.
2014  *
2015  * \return None.
2016  */
2017 /*************************************************************************************************/
2018 void DmConnCteRspStop(dmConnId_t connId);
2019 
2020 /*************************************************************************************************/
2021 /*!
2022  * \brief Returns the device manager's CTE request state for a given connection.
2023  *
2024  * \param connId Connection identifier.
2025  *
2026  * \return The CTE request state.
2027  */
2028 /*************************************************************************************************/
2029 uint8_t DmConnCteGetReqState(dmConnId_t connId);
2030 
2031 /*************************************************************************************************/
2032 /*!
2033  * \brief Returns the device manager's CTE response state for a given connection.
2034  *
2035  * \param connId Connection identifier.
2036  *
2037  * \return The CTE response state.
2038  */
2039 /*************************************************************************************************/
2040 uint8_t DmConnCteGetRspState(dmConnId_t connId);
2041 
2042 /*************************************************************************************************/
2043 /*!
2044  * \brief Read the switching rates, the sampling rates, the number of antennae, and the maximum
2045  * length of a transmitted Constant Tone Extension supported by the Controller.
2046  *
2047  * \return None.
2048  *
2049  * \note The antenna info will be returned with DM indication \ref DM_READ_ANTENNA_INFO_IND.
2050  */
2051 /*************************************************************************************************/
2052 void DmReadAntennaInfo(void);
2053 
2054 /**@}*/
2055 
2056 /** \name DM Connection Functions
2057  * Functions for forming connections and managing connection behavior and parameter updates.
2058  */
2059 /**@{*/
2060 
2061 /*************************************************************************************************/
2062 /*!
2063  * \brief Initialize DM connection manager.
2064  *
2065  * \return None.
2066  */
2067 /*************************************************************************************************/
2068 void DmConnInit(void);
2069 
2070 /*************************************************************************************************/
2071 /*!
2072  * \brief Initialize DM connection manager for operation as legacy master.
2073  *
2074  * \return None.
2075  */
2076 /*************************************************************************************************/
2077 void DmConnMasterInit(void);
2078 
2079 /*************************************************************************************************/
2080 /*!
2081  * \brief Initialize DM connection manager for operation as extended master.
2082  *
2083  * \return None.
2084  */
2085 /*************************************************************************************************/
2086 void DmExtConnMasterInit(void);
2087 
2088 /*************************************************************************************************/
2089 /*!
2090  * \brief Initialize DM connection manager for operation as legacy slave.
2091  *
2092  * \return None.
2093  */
2094 /*************************************************************************************************/
2095 void DmConnSlaveInit(void);
2096 
2097 /*************************************************************************************************/
2098 /*!
2099  * \brief Initialize DM connection manager for operation as extended slave.
2100  *
2101  * \return None.
2102  */
2103 /*************************************************************************************************/
2104 void DmExtConnSlaveInit(void);
2105 
2106 /*************************************************************************************************/
2107 /*!
2108  * \brief Register with the DM connection manager.
2109  *
2110  * \param clientId The client identifier.
2111  * \param cback Client callback function.
2112  *
2113  * \return None.
2114  */
2115 /*************************************************************************************************/
2116 void DmConnRegister(uint8_t clientId, dmCback_t cback);
2117 
2118 /*************************************************************************************************/
2119 /*!
2120  * \brief Open a connection to a peer device with the given address.
2121  *
2122  * \param clientId The client identifier.
2123  * \param initPhys Initiator PHYs.
2124  * \param addrType Address type.
2125  * \param pAddr Peer device address.
2126  *
2127  * \return Connection identifier.
2128  */
2129 /*************************************************************************************************/
2130 dmConnId_t DmConnOpen(uint8_t clientId, uint8_t initPhys, uint8_t addrType, uint8_t *pAddr);
2131 
2132 /*************************************************************************************************/
2133 /*!
2134  * \brief Close the connection with the give connection identifier.
2135  *
2136  * \param clientId The client identifier.
2137  * \param connId Connection identifier.
2138  * \param reason Reason connection is being closed.
2139  *
2140  * \return None.
2141  */
2142 /*************************************************************************************************/
2143 void DmConnClose(uint8_t clientId, dmConnId_t connId, uint8_t reason);
2144 
2145 /*************************************************************************************************/
2146 /*!
2147  * \brief Accept a connection from the given peer device by initiating directed advertising.
2148  *
2149  * \param clientId The client identifier.
2150  * \param advHandle Advertising handle.
2151  * \param advType Advertising type.
2152  * \param duration Advertising duration (in ms).
2153  * \param maxEaEvents Maximum number of extended advertising events.
2154  * \param addrType Address type.
2155  * \param pAddr Peer device address.
2156  *
2157  * \return Connection identifier.
2158  */
2159 /*************************************************************************************************/
2160 dmConnId_t DmConnAccept(uint8_t clientId, uint8_t advHandle, uint8_t advType, uint16_t duration,
2161  uint8_t maxEaEvents, uint8_t addrType, uint8_t *pAddr);
2162 
2163 /*************************************************************************************************/
2164 /*!
2165  * \brief Update the connection parameters of an open connection
2166  *
2167  * \param connId Connection identifier.
2168  * \param pConnSpec Connection specification.
2169  *
2170  * \return None.
2171  */
2172 /*************************************************************************************************/
2173 void DmConnUpdate(dmConnId_t connId, hciConnSpec_t *pConnSpec);
2174 
2175 /*************************************************************************************************/
2176 /*!
2177  * \brief Set the scan interval and window for connections to be created with DmConnOpen().
2178  *
2179  * \param scanInterval The scan interval.
2180  * \param scanWindow The scan window.
2181  *
2182  * \return None.
2183  */
2184 /*************************************************************************************************/
2185 void DmConnSetScanInterval(uint16_t scanInterval, uint16_t scanWindow);
2186 
2187 /*************************************************************************************************/
2188 /*!
2189  * \brief Set the scan interval and window for extended connections to be created with
2190  * DmConnOpen().
2191  *
2192  * \param initPhys Initiator PHYs.
2193  * \param pScanInterval Scan interval array.
2194  * \param pScanWindow Scan window array.
2195  *
2196  * \return None.
2197  */
2198 /*************************************************************************************************/
2199 void DmExtConnSetScanInterval(uint8_t initPhys, uint16_t *pScanInterval, uint16_t *pScanWindow);
2200 
2201 /*************************************************************************************************/
2202 /*!
2203  * \brief Set the connection spec parameters for connections to be created with DmConnOpen().
2204  *
2205  * \param pConnSpec Connection spec parameters.
2206  *
2207  * \return None.
2208  */
2209 /*************************************************************************************************/
2210 void DmConnSetConnSpec(hciConnSpec_t *pConnSpec);
2211 
2212 /*************************************************************************************************/
2213 /*!
2214  * \brief Set the extended connection spec parameters for extended connections to be created
2215  * with DmConnOpen().
2216  *
2217  * \param initPhys The initiator PHYs.
2218  * \param pConnSpec Connection spec parameters array.
2219  *
2220  * \return None.
2221  */
2222 /*************************************************************************************************/
2223 void DmExtConnSetConnSpec(uint8_t initPhys, hciConnSpec_t *pConnSpec);
2224 
2225 /*************************************************************************************************/
2226 /*!
2227  * \brief Set the local address type used for connections created with DmConnOpen().
2228  *
2229  * \param addrType Address type.
2230  *
2231  * \return None.
2232  */
2233 /*************************************************************************************************/
2234 void DmConnSetAddrType(uint8_t addrType);
2235 
2236 /*************************************************************************************************/
2237 /*!
2238  * \brief Configure a bit in the connection idle state mask as busy or idle.
2239  *
2240  * \param connId Connection identifier.
2241  * \param idleMask Bit in the idle state mask to configure.
2242  * \param idle DM_CONN_BUSY or DM_CONN_IDLE.
2243  *
2244  * \return None.
2245  */
2246 /*************************************************************************************************/
2247 void DmConnSetIdle(dmConnId_t connId, uint16_t idleMask, uint8_t idle);
2248 
2249 /*************************************************************************************************/
2250 /*!
2251  * \brief Check if a connection is idle.
2252  *
2253  * \param connId Connection identifier.
2254  *
2255  * \return Zero if connection is idle, nonzero if busy.
2256  */
2257 /*************************************************************************************************/
2258 uint16_t DmConnCheckIdle(dmConnId_t connId);
2259 
2260 /*************************************************************************************************/
2261 /*!
2262  * \brief Read RSSI of a given connection.
2263  *
2264  * \param connId Connection identifier.
2265  *
2266  * \return None.
2267  */
2268 /*************************************************************************************************/
2269 void DmConnReadRssi(dmConnId_t connId);
2270 
2271 /*************************************************************************************************/
2272 /*!
2273  * \brief Reply to the HCI remote connection parameter request event. This command is used to
2274  * indicate that the Host has accepted the remote device's request to change connection
2275  * parameters.
2276  *
2277  * \param connId Connection identifier.
2278  * \param pConnSpec Connection specification.
2279  *
2280  * \return None.
2281  */
2282 /*************************************************************************************************/
2283 void DmRemoteConnParamReqReply(dmConnId_t connId, hciConnSpec_t *pConnSpec);
2284 
2285 /*************************************************************************************************/
2286 /*!
2287  * \brief Negative reply to the HCI remote connection parameter request event. This command
2288  * is used to indicate that the Host has rejected the remote device's request to change
2289  * connection parameters.
2290  *
2291  * \param connId Connection identifier.
2292  * \param reason Reason for rejection.
2293  *
2294  * \return None.
2295  */
2296 /*************************************************************************************************/
2297 void DmRemoteConnParamReqNegReply(dmConnId_t connId, uint8_t reason);
2298 
2299 /*************************************************************************************************/
2300 /*!
2301  * \brief Set data length for a given connection.
2302  *
2303  * \param connId Connection identifier.
2304  * \param txOctets Maximum number of payload octets for a Data PDU.
2305  * \param txTime Maximum number of microseconds for a Data PDU.
2306  *
2307  * \return None.
2308  */
2309 /*************************************************************************************************/
2310 void DmConnSetDataLen(dmConnId_t connId, uint16_t txOctets, uint16_t txTime);
2311 
2312 /*************************************************************************************************/
2313 /*!
2314  * \brief Return the connection role indicating master or slave.
2315  *
2316  * \param connId Connection identifier.
2317  *
2318  * \return Device role.
2319  */
2320 /*************************************************************************************************/
2321 uint8_t DmConnRole(dmConnId_t connId);
2322 
2323 /*************************************************************************************************/
2324 /*!
2325  * \brief Set authenticated payload timeout for a given connection.
2326  *
2327  * \param connId Connection identifier.
2328  * \param timeout Timeout period in units of 10ms.
2329  *
2330  * \return None.
2331  */
2332 /*************************************************************************************************/
2333 void DmWriteAuthPayloadTimeout(dmConnId_t connId, uint16_t timeout);
2334 
2335 /*************************************************************************************************/
2336 /*!
2337  * \brief Request the Sleep Clock Accuracy (SCA) of a peer device.
2338  *
2339  * \param connId Connection identifier.
2340  *
2341  * \return None.
2342  */
2343 /*************************************************************************************************/
2344 void DmConnRequestPeerSca(dmConnId_t connId);
2345 
2346 /**@}*/
2347 
2348 /** \name DM CIS Functions
2349 * Functions for forming and managing Connected Isochronous Stream (CIS) streams.
2350 */
2351 /**@{*/
2352 
2353 /*************************************************************************************************/
2354 /*!
2355  * \brief Initialize DM Connected Isochronous Stream (CIS) manager.
2356  *
2357  * \return None.
2358  */
2359 /*************************************************************************************************/
2360 void DmCisInit(void);
2361 
2362 /*************************************************************************************************/
2363 /*!
2364  * \brief Initialize DM Connected Isochronous Stream (CIS) manager for operation as master.
2365  *
2366  * \return None.
2367  */
2368 /*************************************************************************************************/
2369 void DmCisMasterInit(void);
2370 
2371 /*************************************************************************************************/
2372 /*!
2373  * \brief Initialize DM Connected Isochronous Stream (CIS) manager for operation as slave.
2374  *
2375  * \return None.
2376  */
2377 /*************************************************************************************************/
2378 void DmCisSlaveInit(void);
2379 
2380 /*************************************************************************************************/
2381 /*!
2382  * \brief Set the interval, in microseconds, of periodic SDUs for the given Connected Isochronous
2383  * Group (CIG).
2384  *
2385  * \param cigId CIG ID.
2386  * \param sduIntervalMToS Time interval between start of consecutive SDUs from master Host.
2387  * \param sduIntervalSToM Time interval between start of consecutive SDUs from slave Host.
2388  *
2389  * \return None.
2390  */
2391 /*************************************************************************************************/
2392 void DmCisCigSetSduInterval(uint8_t cigId, uint32_t sduIntervalMToS, uint32_t sduIntervalSToM);
2393 
2394 /*************************************************************************************************/
2395 /*!
2396  * \brief Set the slaves clock accuracy for the given Connected Isochronous Group (CIG).
2397  *
2398  * \param cigId CIG identifier.
2399  * \param sca Slaves clck accuracy (0 if unknown).
2400  *
2401  * \return None.
2402  *
2403  * \note The slaves clock accuracy must which must be the worst-case sleep clock accuracy of the
2404  * slaves that will participate in the CIG.
2405  */
2406 /*************************************************************************************************/
2407 void DmCisCigSetSca(uint8_t cigId, uint8_t sca);
2408 
2409 /*************************************************************************************************/
2410 /*!
2411  * \brief Set the packing scheme and framing format for the given Connected Isochronous Group
2412  * (CIG).
2413  *
2414  * \param cigId CIG identifier.
2415  * \param packing Packing scheme.
2416  * \param framing Indicates format of CIS Data PDUs.
2417  *
2418  * \return None.
2419  */
2420 /*************************************************************************************************/
2421 void DmCisCigSetPackingFraming(uint8_t cigId, uint8_t packing, uint32_t framing);
2422 
2423 /*************************************************************************************************/
2424 /*!
2425  * \brief Set the maximum transport latency, in microseconds, for the given Connected Isochronous
2426  * Group (CIG).
2427  *
2428  * \param cigId CIG identifier.
2429  * \param transLatMToS Maximum time for SDU to be transported from master Controller to slave Controller.
2430  * \param transLatSToM Maximum time for SDU to be transported from slave Controller to master Controller.
2431  *
2432  * \return None.
2433  */
2434 /*************************************************************************************************/
2435 void DmCisCigSetTransLatInterval(uint8_t cigId, uint16_t transLatMToS, uint16_t transLatSToM);
2436 
2437 /*************************************************************************************************/
2438 /*!
2439  * \brief Set the parameters of one or more Connected Isochronous Streams (CISes) that are
2440  * associated with the given Connected Isochronous Group (CIG).
2441  *
2442  * \param cigId CIG identifier.
2443  * \param numCis Number of CIS to be configured.
2444  * \param pCisParam CIS parameters.
2445  *
2446  * \return None.
2447  */
2448 /*************************************************************************************************/
2449 void DmCisCigConfig(uint8_t cigId, dmConnId_t numCis, HciCisCisParams_t *pCisParam);
2450 
2451 /*************************************************************************************************/
2452 /*!
2453  * \brief Remove all the Connected Isochronous Streams (CISes) associated with the given
2454  * Connected Isochronous Group (CIG).
2455  *
2456  * \param cigId CIG identifier.
2457  *
2458  * \return None.
2459  */
2460 /*************************************************************************************************/
2461 void DmCisCigRemove(uint8_t cigId);
2462 
2463 /*************************************************************************************************/
2464 /*!
2465  * \brief Create one or more Connected Isochronous Streams (CISes) using the connections
2466  * identified by the ACL connection handles.
2467  *
2468  * \param numCis Total number of CISes to be created.
2469  * \param pCisHandle List of connection handles of CISes.
2470  * \param pAclHandle List of connection handles of ACLs.
2471  *
2472  * \return None.
2473  */
2474 /*************************************************************************************************/
2475 void DmCisOpen(uint8_t numCis, uint16_t *pCisHandle, uint16_t *pAclHandle);
2476 
2477 /*************************************************************************************************/
2478 /*!
2479  * \brief Inform the Controller to accept the request for the Connected Isochronous Stream (CIS)
2480  * that is identified by the connection handle.
2481  *
2482  * \param handle Connection handle of the CIS.
2483  *
2484  * \return None.
2485  */
2486 /*************************************************************************************************/
2487 void DmCisAccept(uint16_t handle);
2488 
2489 /*************************************************************************************************/
2490 /*!
2491  * \brief Inform the Controller to reject the request for the Connected Isochronous Stream (CIS)
2492  * that is identified by the connection handle.
2493  *
2494  * \param handle Connection handle of the CIS to be rejected.
2495  * \param reason Reason the CIS request was rejected.
2496  *
2497  * \return None.
2498  */
2499 /*************************************************************************************************/
2500 void DmCisReject(uint16_t handle, uint8_t reason);
2501 
2502 /*************************************************************************************************/
2503 /*!
2504  * \brief Close the Connected Isochronous Stream (CIS) connection with the given handle.
2505  *
2506  * \param handle CIS connection handle.
2507  * \param reason Reason connection is being closed.
2508  *
2509  * \return None.
2510  */
2511 /*************************************************************************************************/
2512 void DmCisClose(uint16_t handle, uint8_t reason);
2513 
2514 /*************************************************************************************************/
2515 /*!
2516  * \brief For internal use only. Return TRUE if the Connected Isochronous Stream (CIS)
2517  * connection is in use.
2518  *
2519  * \param handle CIS connection handle.
2520  *
2521  * \return TRUE if the CIS connection is in use, FALSE otherwise.
2522  */
2523 /*************************************************************************************************/
2524 bool_t DmCisConnInUse(uint16_t handle);
2525 
2526 /**@}*/
2527 
2528 /** \name DM BIS Functions
2529 * Functions for forming and managing Broadcast Isochronous Stream (BIS) streams and synchronization.
2530 */
2531 /**@{*/
2532 
2533 /*************************************************************************************************/
2534 /*!
2535  * \brief Initialize DM BIS manager for operation as slave.
2536  *
2537  * \return None.
2538  */
2539 /*************************************************************************************************/
2540 void DmBisSlaveInit(void);
2541 
2542 /*************************************************************************************************/
2543 /*!
2544  * \brief Start a Broadcast Isochronous Group (BIG) with one or more Broadcast Isochronous
2545  * Streams (BISes).
2546  *
2547  * \param bigHandle CIG identifier.
2548  * \param advHandle Used to identify the periodic advertising train.
2549  * \param numBis; Total number of BISes in the BIG.
2550  * \param sduInterUsec Interval, in microseconds, of BIG SDUs.
2551  * \param maxSdu Maximum size of SDU
2552  * \param mtlMs Maximum time, in milliseconds, for transmitting SDU.
2553  * \param rtn Retransmitted number.
2554  *
2555  * \return None.
2556  */
2557 /*************************************************************************************************/
2558 void DmBigStart(uint8_t bigHandle, uint8_t advHandle, uint8_t numBis, uint32_t sduInterUsec,
2559  uint16_t maxSdu, uint16_t mtlMs, uint8_t rtn);
2560 
2561 /*************************************************************************************************/
2562 /*!
2563  * \brief Stop a Broadcast Isochronous Group (BIG) identified for the given handle.
2564  *
2565  * \param bigHandle BIG identifier.
2566  * \param reason Reason BIG is terminated.
2567  *
2568  * \return None.
2569  */
2570 /*************************************************************************************************/
2571 void DmBigStop(uint8_t bigHandle, uint8_t reason);
2572 
2573 /*************************************************************************************************/
2574 /*!
2575  * \brief For internal use only. Return TRUE if the BIS is in use.
2576  *
2577  * \param handle BIS connection handle.
2578  *
2579  * \return TRUE if the BIS connection is in use, FALSE otherwise.
2580  */
2581 /*************************************************************************************************/
2582 bool_t DmBisInUse(uint16_t handle);
2583 
2584 /*************************************************************************************************/
2585 /*!
2586  * \brief Set the PHYs used for transmission of PDUs of Broadcast Isochronous Streams (BISes) in
2587  * Broadcast Isochronous Group (BIG).
2588  *
2589  * \param bigHandle BIG handle.
2590  * \param phyBits PHY bit field.
2591  *
2592  * \return None.
2593  */
2594 /*************************************************************************************************/
2595 void DmBigSetPhy(uint8_t bigHandle, uint8_t phyBits);
2596 
2597 /*************************************************************************************************/
2598 /*!
2599  * \brief Set the packing scheme and framing format for the given Broadcast Isochronous Group
2600  * (BIG).
2601  *
2602  * \param bigHandle BIG handle.
2603  * \param packing Packing scheme.
2604  * \param framing Indicates format of BIS Data PDUs.
2605  *
2606  * \return None.
2607  */
2608 /*************************************************************************************************/
2609 void DmBigSetPackingFraming(uint8_t bigHandle, uint8_t packing, uint32_t framing);
2610 
2611 /*************************************************************************************************/
2612 /*!
2613  * \brief Set the Broadcast Code for the given Broadcast Isochronous Group (BIG).
2614  *
2615  * \param bigHandle BIG handle.
2616  * \param encrypt FALSE (Unencrypted) or TRUE (Encrypted).
2617  * \param authen FALSE (Unauthenticated) or TRUE (Authenticated).
2618  * \param pBcastCode Broadcast code.
2619  *
2620  * \return None.
2621  */
2622 /*************************************************************************************************/
2623 void DmBigSetBcastCode(uint8_t bigHandle, bool_t encrypt, bool_t authen, uint8_t *pBcastCode);
2624 
2625 /*************************************************************************************************/
2626 /*!
2627  * \brief Set the security level of the LE Security Mode 3 for the given Broadcast Isochronous
2628  * Group (BIG).
2629  *
2630  * \param bigHandle BIG handle.
2631  * \param secLevel Security level.
2632  *
2633  * \return None.
2634  */
2635 /*************************************************************************************************/
2636 void DmBigSetSecLevel(uint8_t bigHandle, uint8_t secLevel);
2637 
2638 /*************************************************************************************************/
2639 /*!
2640  * \brief Get the security level of the LE Security Mode 3 for the given Broadcast Isochronous
2641  * Group (BIG) connection handle.
2642  *
2643  * \param handle BIS connection handle.
2644  *
2645  * \return Security level.
2646  */
2647 /*************************************************************************************************/
2648 uint8_t DmBigGetSecLevel(uint16_t handle);
2649 
2650 /** \name DM Isochronous (ISO) Functions
2651 * Functions for setting up and managing isochronous data path between the Host and the Controller.
2652 */
2653 /**@{*/
2654 /*************************************************************************************************/
2655 /*!
2656  * \brief Initialize DM ISO manager.
2657  *
2658  * \return None.
2659  */
2660 /*************************************************************************************************/
2661 void DmIsoInit(void);
2662 
2663 /*************************************************************************************************/
2664 /*!
2665  * \brief Setup the isochronous data path between the Host and the Controller for an established
2666  * Connected Isochronous Stream (CIS) or Broadcast Isochronous Stream (BIS) identified by
2667  * the connection handle parameter.
2668  *
2669  * \param pDataPathParam Parameters to setup ISO data path.
2670  *
2671  * \return None.
2672  */
2673 /*************************************************************************************************/
2674 void DmIsoDataPathSetup(HciIsoSetupDataPath_t *pDataPathParam);
2675 
2676 /*************************************************************************************************/
2677 /*!
2678  * \brief Remove the input and/or output data path(s) associated with a Connected Isochronous
2679  * Stream (CIS) or Broadcast Isochronous Stream (BIS) identified by the connection handle
2680  * parameter.
2681  *
2682  * \param handle Connection handle of CIS or BIS.
2683  * \param directionBits Data path direction bits.
2684  *
2685  * \return None.
2686  */
2687 /*************************************************************************************************/
2688 void DmIsoDataPathRemove(uint16_t handle, uint8_t directionBits);
2689 
2690 /*************************************************************************************************/
2691 /*!
2692  * \brief Request the Controller to configure the data transport path in a given direction
2693  * between the Controller and the Host.
2694  *
2695  * \param pDataPathParam Parameters for configuring data path.
2696  *
2697  * \return None.
2698  */
2699 /*************************************************************************************************/
2700 void DmDataPathConfig(HciConfigDataPath_t *pDataPathParam);
2701 
2702 /*************************************************************************************************/
2703 /*!
2704  * \brief Read a list of the codecs supported by the Controller, as well as vendor specific
2705  * codecs, which are defined by an individual manufacturer.
2706  *
2707  * \return None.
2708  */
2709 /*************************************************************************************************/
2710 void DmReadLocalSupCodecs(void);
2711 
2712 /*************************************************************************************************/
2713 /*!
2714  * \brief Read a list of codec capabilities supported by the Controller for a given codec.
2715  *
2716  * \param pCodecParam Parameters for reading local supported codec capabilities.
2717  *
2718  * \return None.
2719  */
2720 /*************************************************************************************************/
2722 
2723 /*************************************************************************************************/
2724 /*!
2725  * \brief Read the range of supported Controller delays for the codec specified by Codec ID on
2726  * a given transport type specified by Logical Transport Type, in the direction specified
2727  * by Direction, and with the codec configuration specified by Codec Configuration.
2728  *
2729  * \param pDelayParam Parameters for reading local supported controller delay.
2730  *
2731  * \return None.
2732  */
2733 /*************************************************************************************************/
2735 
2736 /**@}*/
2737 
2738 /** \name DM PHY Control Functions
2739  * Functions for setting PHY preferences.
2740  */
2741 /**@{*/
2742 
2743 /*************************************************************************************************/
2744 /*!
2745  * \brief Set the preferred values for the transmitter PHY and receiver PHY for all subsequent
2746  * connections.
2747  *
2748  * \param allPhys All PHYs preferences.
2749  * \param txPhys Preferred transmitter PHYs.
2750  * \param rxPhys Preferred receiver PHYs.
2751  *
2752  * \return None.
2753  */
2754 /*************************************************************************************************/
2755 void DmSetDefaultPhy(uint8_t allPhys, uint8_t txPhys, uint8_t rxPhys);
2756 
2757 /*************************************************************************************************/
2758 /*!
2759  * \brief Read the current transmitter PHY and receiver PHY for a given connection.
2760  *
2761  * \param connId Connection identifier.
2762  *
2763  * \return None.
2764  */
2765 /*************************************************************************************************/
2766 void DmReadPhy(dmConnId_t connId);
2767 
2768 /*************************************************************************************************/
2769 /*!
2770  * \brief Set the PHY preferences for a given connection.
2771  *
2772  * \param connId Connection identifier.
2773  * \param allPhys All PHYs preferences.
2774  * \param txPhys Preferred transmitter PHYs.
2775  * \param rxPhys Preferred receiver PHYs.
2776  * \param phyOptions PHY options.
2777  *
2778  * \return None.
2779  */
2780 /*************************************************************************************************/
2781 void DmSetPhy(dmConnId_t connId, uint8_t allPhys, uint8_t txPhys, uint8_t rxPhys, uint16_t phyOptions);
2782 
2783 /*************************************************************************************************/
2784 /*!
2785  * \brief Initialize DM PHY.
2786  *
2787  * \return None.
2788  */
2789 /*************************************************************************************************/
2790 void DmPhyInit(void);
2791 
2792 /**@}*/
2793 
2794 
2795 /** \name DM Device Functions
2796  * Device control functions
2797  */
2798 /**@{*/
2799 
2800 /*************************************************************************************************/
2801 /*!
2802  * \brief Reset the device.
2803  *
2804  * \return None.
2805  */
2806 /*************************************************************************************************/
2807 void DmDevReset(void);
2808 
2809 /*************************************************************************************************/
2810 /*!
2811  * \brief Set the random address to be used by the local device.
2812  *
2813  * \param pAddr Random address.
2814  *
2815  * \return None.
2816  */
2817 /*************************************************************************************************/
2818 void DmDevSetRandAddr(uint8_t *pAddr);
2819 
2820 /*************************************************************************************************/
2821 /*!
2822  * \brief Add a peer device to the white list. Note that this function cannot be called
2823  * while advertising, scanning, or connecting with white list filtering active.
2824  *
2825  * \param addrType Address type.
2826  * \param pAddr Peer device address.
2827  *
2828  * \return None.
2829  */
2830 /*************************************************************************************************/
2831 void DmDevWhiteListAdd(uint8_t addrType, uint8_t *pAddr);
2832 
2833 /*************************************************************************************************/
2834 /*!
2835  * \brief Remove a peer device from the white list. Note that this function cannot be called
2836  * while advertising, scanning, or connecting with white list filtering active.
2837  *
2838  * \param addrType Address type.
2839  * \param pAddr Peer device address.
2840  *
2841  * \return None.
2842  */
2843 /*************************************************************************************************/
2844 void DmDevWhiteListRemove(uint8_t addrType, uint8_t *pAddr);
2845 
2846 /*************************************************************************************************/
2847 /*!
2848  * \brief Clear the white list. Note that this function cannot be called while
2849  * advertising, scanning, or connecting with white list filtering active.
2850  *
2851  * \return None.
2852  */
2853 /*************************************************************************************************/
2854 void DmDevWhiteListClear(void);
2855 
2856 /*************************************************************************************************/
2857 /*!
2858  * \brief Set the Advertising, Scanning or Initiator filter policy.
2859  *
2860  * \param mode Policy mode.
2861  * \param policy Filter policy.
2862  *
2863  * \return TRUE if the filter policy was successfully set, FALSE otherwise.
2864  */
2865 /*************************************************************************************************/
2866 bool_t DmDevSetFilterPolicy(uint8_t mode, uint8_t policy);
2867 
2868 /*************************************************************************************************/
2869 /*!
2870  * \brief Set the Advertising filter policy for the given advertising, Scanning or Initiator
2871  * filter policy.
2872  *
2873  * \param advHandle Advertising handle (only applicable to advertising).
2874  * \param mode Policy mode.
2875  * \param policy Filter policy.
2876  *
2877  * \return TRUE if the filter policy was successfully set, FALSE otherwise.
2878  */
2879 /*************************************************************************************************/
2880 bool_t DmDevSetExtFilterPolicy(uint8_t advHandle, uint8_t mode, uint8_t policy);
2881 
2882 /*************************************************************************************************/
2883 /*!
2884  * \brief Vendor-specific controller initialization function.
2885  *
2886  * \param param Vendor-specific parameter.
2887  *
2888  * \return None.
2889  */
2890 /*************************************************************************************************/
2891 void DmDevVsInit(uint8_t param);
2892 
2893 /**@}*/
2894 
2895 /** \name DM Security Functions
2896  * Functions for accessing and controlling security configuration of device.
2897  */
2898 /**@{*/
2899 
2900 /*************************************************************************************************/
2901 /*!
2902  * \brief Initialize DM security.
2903  *
2904  * \return None.
2905  */
2906 /*************************************************************************************************/
2907 void DmSecInit(void);
2908 
2909 /*************************************************************************************************/
2910 /*!
2911  * \brief Initialize DM LE Secure Connections security.
2912  *
2913  * \return None.
2914  */
2915 /*************************************************************************************************/
2916 void DmSecLescInit(void);
2917 
2918 /*************************************************************************************************/
2919 /*!
2920  * \brief This function is called by a master device to initiate pairing.
2921  *
2922  * \param connId DM connection ID.
2923  * \param oob Out-of-band pairing data present or not present.
2924  * \param auth Authentication and bonding flags.
2925  * \param iKeyDist Initiator key distribution flags.
2926  * \param rKeyDist Responder key distribution flags.
2927  *
2928  * \return None.
2929  */
2930 /*************************************************************************************************/
2931 void DmSecPairReq(dmConnId_t connId, uint8_t oob, uint8_t auth, uint8_t iKeyDist, uint8_t rKeyDist);
2932 
2933 /*************************************************************************************************/
2934 /*!
2935  * \brief This function is called by a slave device to proceed with pairing after a
2936  * DM_SEC_PAIR_IND event is received.
2937  *
2938  * \param connId DM connection ID.
2939  * \param oob Out-of-band pairing data present or not present.
2940  * \param auth Authentication and bonding flags.
2941  * \param iKeyDist Initiator key distribution flags.
2942  * \param rKeyDist Responder key distribution flags.
2943  *
2944  * \return None.
2945  */
2946 /*************************************************************************************************/
2947 void DmSecPairRsp(dmConnId_t connId, uint8_t oob, uint8_t auth, uint8_t iKeyDist, uint8_t rKeyDist);
2948 
2949 /*************************************************************************************************/
2950 /*!
2951  * \brief This function is called to cancel the pairing process.
2952  *
2953  * \param connId DM connection ID.
2954  * \param reason Failure reason.
2955  *
2956  * \return None.
2957  */
2958 /*************************************************************************************************/
2959 void DmSecCancelReq(dmConnId_t connId, uint8_t reason);
2960 
2961 /*************************************************************************************************/
2962 /*!
2963  * \brief This function is called in response to a DM_SEC_AUTH_REQ_IND event to provide
2964  * PIN or OOB data during pairing.
2965  *
2966  * \param connId DM connection ID.
2967  * \param authDataLen Length of PIN or OOB data.
2968  * \param pAuthData pointer to PIN or OOB data.
2969  *
2970  * \return None.
2971  */
2972 /*************************************************************************************************/
2973 void DmSecAuthRsp(dmConnId_t connId, uint8_t authDataLen, uint8_t *pAuthData);
2974 
2975 /*************************************************************************************************/
2976 /*!
2977  * \brief This function is called by a slave device to request that the master initiates
2978  * pairing or link encryption.
2979  *
2980  * \param connId DM connection ID.
2981  * \param auth Authentication flags.
2982  *
2983  * \return None.
2984  */
2985 /*************************************************************************************************/
2986 void DmSecSlaveReq(dmConnId_t connId, uint8_t auth);
2987 
2988 /*************************************************************************************************/
2989 /*!
2990  * \brief This function is called by a master device to initiate link encryption.
2991  *
2992  * \param connId DM connection ID.
2993  * \param secLevel Security level of pairing when LTK was exchanged.
2994  * \param pLtk Pointer to LTK parameter structure.
2995  *
2996  * \return None.
2997  */
2998 /*************************************************************************************************/
2999 void DmSecEncryptReq(dmConnId_t connId, uint8_t secLevel, dmSecLtk_t *pLtk);
3000 
3001 /*************************************************************************************************/
3002 /*!
3003  * \brief This function is called by a slave in response to a DM_SEC_LTK_REQ_IND event
3004  * to provide the long term key used for encryption.
3005  *
3006  * \param connId DM connection ID.
3007  * \param keyFound TRUE if key found.
3008  * \param secLevel Security level of pairing when key was exchanged.
3009  * \param pKey Pointer to the key, if found.
3010  *
3011  * \return None.
3012  */
3013 /*************************************************************************************************/
3014 void DmSecLtkRsp(dmConnId_t connId, bool_t keyFound, uint8_t secLevel, uint8_t *pKey);
3015 
3016 /*************************************************************************************************/
3017 /*!
3018  * \brief This function sets the local CSRK used by the device.
3019  *
3020  * \param pCsrk Pointer to CSRK.
3021  *
3022  * \return None.
3023  */
3024 /*************************************************************************************************/
3025 void DmSecSetLocalCsrk(uint8_t *pCsrk);
3026 
3027 /*************************************************************************************************/
3028 /*!
3029  * \brief This function sets the local IRK used by the device.
3030  *
3031  * \param pIrk Pointer to IRK.
3032  *
3033  * \return None.
3034  */
3035 /*************************************************************************************************/
3036 void DmSecSetLocalIrk(uint8_t *pIrk);
3037 
3038 /*************************************************************************************************/
3039 /*!
3040  * \brief This function sets the local identity address used by the device.
3041  *
3042  * \param pAddr Pointer to the address.
3043  * \param type Type of the address.
3044  *
3045  * \return None.
3046  */
3047 /*************************************************************************************************/
3048 void DmSecSetLocalIdentityAddr(const uint8_t *pAddr, uint8_t type);
3049 
3050 /*************************************************************************************************/
3051 /*!
3052  * \brief This function generates an ECC key for use with LESC security.
3053  *
3054  * \return None.
3055  */
3056 /*************************************************************************************************/
3057 void DmSecGenerateEccKeyReq(void);
3058 
3059 /*************************************************************************************************/
3060 /*!
3061  * \brief This function sets the ECC key for use with LESC security.
3062  *
3063  * \param pKey Pointer to key.
3064  *
3065  * \return None.
3066  */
3067 /*************************************************************************************************/
3068 void DmSecSetEccKey(secEccKey_t *pKey);
3069 
3070 /*************************************************************************************************/
3071 /*!
3072  * \brief This function gets the local ECC key for use with LESC security.
3073  *
3074  * \return Pointer to local ECC key.
3075  */
3076 /*************************************************************************************************/
3078 
3079 /*************************************************************************************************/
3080 /*!
3081  * \brief This function sets the ECC key for use with LESC security to standard debug keys values.
3082  *
3083  * \return None.
3084  */
3085 /*************************************************************************************************/
3086 void DmSecSetDebugEccKey(void);
3087 
3088 /*************************************************************************************************/
3089 /*!
3090  * \brief This function configures the DM to use OOB pairing for the given connection.
3091  * The pRand and pConfirm contain the Random and Confirm values exchanged via
3092  * out of band methods.
3093  *
3094  * \param connId ID of the connection.
3095  * \param pConfig Pointer to OOB configuration.
3096  *
3097  * \return Pointer to IRK.
3098  */
3099 /*************************************************************************************************/
3100 void DmSecSetOob(dmConnId_t connId, dmSecLescOobCfg_t *pConfig);
3101 
3102 /*************************************************************************************************/
3103 /*!
3104  * \brief This function calculates the local random and confirm values used in LESC OOB pairing.
3105  * The operation's result is posted as a DM_SEC_CALC_OOB_IND event to the application's DM
3106  * callback handler. The local rand and confirm values are exchanged with the peer via
3107  * out-of-band (OOB) methods and passed into the DmSecSetOob after DM_CONN_OPEN_IND.
3108  *
3109  * \param pRand Random value used in calculation.
3110  * \param pPubKeyX X component of the local public key.
3111  *
3112  * \return None.
3113  */
3114 /*************************************************************************************************/
3115 void DmSecCalcOobReq(uint8_t *pRand, uint8_t *pPubKeyX);
3116 
3117 /*************************************************************************************************/
3118 /*!
3119  * \brief This function is called by the application in response to a DM_SEC_COMPARE_IND event.
3120  * The valid parameter indicates if the compare value of the DM_SEC_COMPARE_IND was valid.
3121  *
3122  * \param connId ID of the connection.
3123  * \param valid TRUE if compare value was valid
3124  *
3125  * \return None.
3126  */
3127 /*************************************************************************************************/
3128 void DmSecCompareRsp(dmConnId_t connId, bool_t valid);
3129 
3130 /*************************************************************************************************/
3131 /*!
3132  * \brief This function returns the 6-digit compare value for the specified 128-bit confirm value.
3133  *
3134  * \param pConfirm Pointer to 128-bit comfirm value.
3135  *
3136  * \return Six-digit compare value.
3137  */
3138 /*************************************************************************************************/
3139 uint32_t DmSecGetCompareValue(uint8_t *pConfirm);
3140 
3141 /**@}*/
3142 
3143 /** \name DM Internal Functions
3144  * Functions called internally by the stack.
3145  */
3146 /**@{*/
3147 
3148 /*************************************************************************************************/
3149 /*!
3150  * \brief Map an address type to a type used by LL.
3151  *
3152  * \param addrType Address type used by Host.
3153  *
3154  * \return Address type used by LL.
3155  */
3156 /*************************************************************************************************/
3157 uint8_t DmLlAddrType(uint8_t addrType);
3158 
3159 /*************************************************************************************************/
3160 /*!
3161  * \brief Map an address type to a type used by Host.
3162  *
3163  * \param addrType Address type used by LL.
3164  *
3165  * \return Address type used by Host.
3166  */
3167 /*************************************************************************************************/
3168 uint8_t DmHostAddrType(uint8_t addrType);
3169 
3170 /*************************************************************************************************/
3171 /*!
3172  * \brief Return size of a DM callback event.
3173  *
3174  * \param pDmEvt DM callback event.
3175  *
3176  * \return Size of DM callback event.
3177  */
3178 /*************************************************************************************************/
3179 uint16_t DmSizeOfEvt(dmEvt_t *pDmEvt);
3180 
3181 /*************************************************************************************************/
3182 /*!
3183  * \brief For internal use only. L2C calls this function to send the result of an L2CAP
3184  * connection update response to DM.
3185  *
3186  * \param handle Connection handle.
3187  * \param reason Connection update response reason code.
3188  * \return None.
3189  */
3190 /*************************************************************************************************/
3191 void DmL2cConnUpdateCnf(uint16_t handle, uint16_t reason);
3192 
3193 /*************************************************************************************************/
3194 /*!
3195  * \brief For internal use only. L2C calls this function to send the result of an L2CAP
3196  * Command Reject up to the application.
3197  *
3198  * \param handle Connection handle.
3199  * \param result Connection update result code.
3200  * \return None.
3201  */
3202 /*************************************************************************************************/
3203 void DmL2cCmdRejInd(uint16_t handle, uint16_t result);
3204 
3205 /*************************************************************************************************/
3206 /*!
3207  * \brief For internal use only. L2C calls this function when it receives a connection update
3208  * request from a peer device.
3209  *
3210  * \param identifier Identifier value.
3211  * \param handle Connection handle.
3212  * \param pConnSpec Connection spec parameters.
3213  *
3214  * \return None.
3215  */
3216 /*************************************************************************************************/
3217 void DmL2cConnUpdateInd(uint8_t identifier, uint16_t handle, hciConnSpec_t *pConnSpec);
3218 
3219 /*************************************************************************************************/
3220 /*!
3221  * \brief For internal use only. Find the connection ID with matching handle.
3222  *
3223  * \param handle Handle to find.
3224  *
3225  * \return Connection ID or DM_CONN_ID_NONE if error.
3226  */
3227 /*************************************************************************************************/
3228 dmConnId_t DmConnIdByHandle(uint16_t handle);
3229 
3230 /*************************************************************************************************/
3231 /*!
3232  * \brief For internal use only. Return TRUE if the connection is in use.
3233  *
3234  * \param connId Connection ID.
3235  *
3236  * \return TRUE if the connection is in use, FALSE otherwise.
3237  */
3238 /*************************************************************************************************/
3239 bool_t DmConnInUse(dmConnId_t connId);
3240 
3241 /*************************************************************************************************/
3242 /*!
3243  * \brief For internal use only. Return the peer address type.
3244  *
3245  * \param connId Connection ID.
3246  *
3247  * \return Peer address type.
3248  */
3249 /*************************************************************************************************/
3250 uint8_t DmConnPeerAddrType(dmConnId_t connId);
3251 
3252 /*************************************************************************************************/
3253 /*!
3254  * \brief For internal use only. Return the peer device address.
3255  *
3256  * \param connId Connection ID.
3257  *
3258  * \return Pointer to peer device address.
3259  */
3260 /*************************************************************************************************/
3261 uint8_t *DmConnPeerAddr(dmConnId_t connId);
3262 
3263 /*************************************************************************************************/
3264 /*!
3265  * \brief For internal use only. Return the local address type.
3266  *
3267  * \param connId Connection ID.
3268  *
3269  * \return Local address type.
3270  */
3271 /*************************************************************************************************/
3272 uint8_t DmConnLocalAddrType(dmConnId_t connId);
3273 
3274 /*************************************************************************************************/
3275 /*!
3276  * \brief For internal use only. Return the local address.
3277  *
3278  * \param connId Connection ID.
3279  *
3280  * \return Pointer to local address.
3281  */
3282 /*************************************************************************************************/
3283 uint8_t *DmConnLocalAddr(dmConnId_t connId);
3284 
3285 /*************************************************************************************************/
3286 /*!
3287  * \brief For internal use only. Return the peer resolvable private address (RPA).
3288  *
3289  * \param connId Connection ID.
3290  *
3291  * \return Pointer to peer RPA.
3292  */
3293 /*************************************************************************************************/
3294 uint8_t *DmConnPeerRpa(dmConnId_t connId);
3295 
3296 /*************************************************************************************************/
3297 /*!
3298  * \brief For internal use only. Return the local resolvable private address (RPA).
3299  *
3300  * \param connId Connection ID.
3301  *
3302  * \return Pointer to local RPA.
3303  */
3304 /*************************************************************************************************/
3305 uint8_t *DmConnLocalRpa(dmConnId_t connId);
3306 
3307 /*************************************************************************************************/
3308 /*!
3309  * \brief For internal use only. Return the security level of the connection.
3310  *
3311  * \param connId Connection ID.
3312  *
3313  * \return Security level of the connection.
3314  */
3315 /*************************************************************************************************/
3316 uint8_t DmConnSecLevel(dmConnId_t connId);
3317 
3318 /*************************************************************************************************/
3319 /*!
3320  * \brief For internal use only. This function is called by SMP to request encryption.
3321  *
3322  * \param connId DM connection ID.
3323  * \param secLevel Security level of pairing when key was exchanged.
3324  * \param pKey Pointer to key.
3325  *
3326  * \return None.
3327  */
3328 /*************************************************************************************************/
3329 void DmSmpEncryptReq(dmConnId_t connId, uint8_t secLevel, uint8_t *pKey);
3330 
3331 /*************************************************************************************************/
3332 /*!
3333  * \brief For internal use only. Execute DM callback from SMP procedures.
3334  *
3335  * \param pDmEvt Pointer to callback event data.
3336  *
3337  * \return None.
3338  */
3339 /*************************************************************************************************/
3340 void DmSmpCbackExec(dmEvt_t *pDmEvt);
3341 
3342 /*************************************************************************************************/
3343 /*!
3344  * \brief For internal use only. This function gets the local CSRK used by the device.
3345  *
3346  * \return Pointer to CSRK.
3347  */
3348 /*************************************************************************************************/
3349 uint8_t *DmSecGetLocalCsrk(void);
3350 
3351 /*************************************************************************************************/
3352 /*!
3353  * \brief For internal use only. This function gets the local IRK used by the device.
3354  *
3355  * \return Pointer to IRK.
3356  */
3357 /*************************************************************************************************/
3358 uint8_t *DmSecGetLocalIrk(void);
3359 
3360 /*************************************************************************************************/
3361 /*!
3362  * \brief For internal use only. This function gets the local identity address used by the device.
3363  *
3364  * \return Pointer to the identity address.
3365  */
3366 /*************************************************************************************************/
3367 uint8_t *DmSecGetLocalIdentityAddr(void);
3368 
3369 /*************************************************************************************************/
3370 /*!
3371  * \brief For internal use only. This function gets the local identity address type used by the
3372  * device.
3373  *
3374  * \return The identity address type.
3375  */
3376 /*************************************************************************************************/
3377 uint8_t DmSecGetLocalIdentityAddrType(void);
3378 
3379 /*************************************************************************************************/
3380 /*!
3381  * \brief For internal use only. Read the features of the remote device.
3382  *
3383  * \param connId Connection identifier.
3384  *
3385  * \return None.
3386  */
3387 /*************************************************************************************************/
3388 void DmReadRemoteFeatures(dmConnId_t connId);
3389 
3390 /*************************************************************************************************/
3391 /*!
3392  * \brief Read the version info of the remote device.
3393  *
3394  * \param connId Connection identifier.
3395  *
3396  * \return None.
3397  */
3398 /*************************************************************************************************/
3399 void DmReadRemoteVerInfo(dmConnId_t connId);
3400 
3401 /**@}*/
3402 
3403 /*! \} */ /* STACK_DM_API */
3404 
3405 #ifdef __cplusplus
3406 };
3407 #endif
3408 
3409 #endif /* DM_API_H */
wsfMsgHdr_t hdr
Header.
Definition: dm_api.h:639
wsfMsgHdr_t hdr
Header.
Definition: dm_api.h:646
uint8_t * DmSecGetLocalCsrk(void)
For internal use only. This function gets the local CSRK used by the device.
void DmScanStop(void)
Stop scanning.
LE CIS established event.
Definition: hci_api.h:701
void DmRemoveDeviceFromPerAdvList(uint8_t advAddrType, uint8_t *pAdvAddr, uint8_t advSid)
DM remove device from periodic advertiser list.
LE BIG Sync Established event.
Definition: hci_api.h:795
void DmPerAdvConfig(uint8_t advHandle)
Set the advertising parameters for periodic advertising.
void DmCisCigSetSduInterval(uint8_t cigId, uint32_t sduIntervalMToS, uint32_t sduIntervalSToM)
Set the interval, in microseconds, of periodic SDUs for the given Connected Isochronous Group (CIG)...
Data structure for DM_L2C_CMD_REJ_IND.
Definition: dm_api.h:738
bool_t DmDevSetFilterPolicy(uint8_t mode, uint8_t policy)
Set the Advertising, Scanning or Initiator filter policy.
bool_t firstTime
TRUE when address is generated for the first time.
Definition: dm_api.h:712
LE read local resolving address command complete event.
Definition: hci_api.h:538
Data type for DM_SEC_PAIR_IND.
Definition: dm_api.h:652
uint8_t * DmConnPeerRpa(dmConnId_t connId)
For internal use only. Return the peer resolvable private address (RPA).
dmSecIrk_t irk
IRK.
Definition: dm_api.h:625
bool_t DmAdvModeExt(void)
Whether DM advertising is in extended mode.
Incoming security request from slave.
Definition: dm_api.h:503
Remote LL version information read.
Definition: dm_api.h:541
uint16_t ediv
EDIV.
Definition: dm_api.h:604
hciLePerAdvSyncTrsfCmdCmplEvt_t perAdvSyncTrsf
handles DM_PER_ADV_SYNC_TRSF_IND
Definition: dm_api.h:815
bool_t DmAdvSetName(uint8_t len, uint8_t *pValue, uint16_t *pAdvDataLen, uint8_t *pAdvData, uint16_t advDataBufLen)
Set the device name in the given advertising or scan response data. If the name can only fit in the d...
LE setup ISO data path command complete event.
Definition: hci_api.h:839
hciLeRemoveIsoDataPathCmdCmplEvt_t isoDataPathRemove
handles DM_ISO_DATA_PATH_REMOVE_IND
Definition: dm_api.h:837
void DmConnUpdate(dmConnId_t connId, hciConnSpec_t *pConnSpec)
Update the connection parameters of an open connection.
Configuration structure.
Definition: dm_api.h:594
hciLeSetCigParamsCmdCmplEvt_t cisCigConfig
handles DM_CIS_CIG_CONFIG_IND
Definition: dm_api.h:830
DM callback event starting value.
Definition: dm_api.h:485
uint8_t dmConnId_t
Connection identifier.
Definition: dm_api.h:588
dmConnId_t DmConnOpen(uint8_t clientId, uint8_t initPhys, uint8_t addrType, uint8_t *pAddr)
Open a connection to a peer device with the given address.
dmSecSlaveIndEvt_t slaveInd
handles DM_SEC_SLAVE_REQ_IND
Definition: dm_api.h:781
void DmExtConnMasterInit(void)
Initialize DM connection manager for operation as extended master.
void DmBigStop(uint8_t bigHandle, uint8_t reason)
Stop a Broadcast Isochronous Group (BIG) identified for the given handle.
hciLeDataLenChangeEvt_t dataLenChange
handles DM_CONN_DATA_LEN_CHANGE_IND
Definition: dm_api.h:796
CIS parameters.
Definition: hci_api.h:1086
uint8_t addrType
Address Type.
Definition: dm_api.h:612
void DmAdvIncTxPwr(uint8_t advHandle, bool_t incTxPwr, int8_t advTxPwr)
Set whether or not to include TxPower in extended header of advertising PDU.
HciLeBigInfoAdvRptEvt_t bigInfoAdvRpt
handles DM_BIG_INFO_ADV_REPORT_IND
Definition: dm_api.h:848
uint8_t DmConnCteGetRspState(dmConnId_t connId)
Returns the device manager&#39;s CTE response state for a given connection.
uint8_t * DmConnLocalAddr(dmConnId_t connId)
For internal use only. Return the local address.
void DmDevReset(void)
Reset the device.
hciConfigDataPathCmdCmplEvt_t dataPathConfig
handles DM_DATA_PATH_CONFIG_IND
Definition: dm_api.h:838
dmPerAdvSetStartEvt_t perAdvSetStart
handles DM_PER_ADV_SET_START_IND
Definition: dm_api.h:808
ECC Security callback parameters structure.
Definition: sec_api.h:128
void DmSecCalcOobReq(uint8_t *pRand, uint8_t *pPubKeyX)
This function calculates the local random and confirm values used in LESC OOB pairing. The operation&#39;s result is posted as a DM_SEC_CALC_OOB_IND event to the application&#39;s DM callback handler. The local rand and confirm values are exchanged with the peer via out-of-band (OOB) methods and passed into the DmSecSetOob after DM_CONN_OPEN_IND.
wsfMsgHdr_t hdr
Common header.
Definition: dm_api.h:762
dmSecCnfIndEvt_t cnfInd
handles DM_SEC_COMPARE_IND
Definition: dm_api.h:784
dmAdvNewAddrIndEvt_t advNewAddr
handles DM_ADV_NEW_ADDR_IND
Definition: dm_api.h:766
Local supported controller delay read.
Definition: dm_api.h:563
bool_t DmConnInUse(dmConnId_t connId)
For internal use only. Return TRUE if the connection is in use.
HCI subsystem API.
Connection closed.
Definition: dm_api.h:493
void DmBisSlaveInit(void)
Initialize DM BIS manager for operation as slave.
void DmPrivClearResList(void)
Clear resolving list. When complete the client&#39;s callback function is called with a DM_PRIV_CLEAR_RES...
void DmConnSetDataLen(dmConnId_t connId, uint16_t txOctets, uint16_t txTime)
Set data length for a given connection.
void DmAdvSetFragPref(uint8_t advHandle, uint8_t fragPref)
Set fragment preference for advertising data.
void DmConnCteRxSampleStart(dmConnId_t connId, uint8_t slotDurations, uint8_t switchPatternLen, uint8_t *pAntennaIDs)
Enable sampling received CTE fields on the specified connection, and configure the antenna switching ...
hciLeReadRemoteFeatCmplEvt_t readRemoteFeat
handles DM_REMOTE_FEATURES_IND
Definition: dm_api.h:818
void DmIsoInit(void)
Initialize DM ISO manager.
uint8_t DmBigSyncGetSecLevel(uint16_t handle)
Get the security level of the LE Security Mode 3 for the given Broadcast Isochronous Group (BIG) conn...
hciLePerAdvSyncEstEvt_t perAdvSyncEstFail
handles DM_PER_ADV_SYNC_EST_FAIL_IND
Definition: dm_api.h:811
secEccMsg_t eccMsg
handles DM_SEC_ECC_KEY_IND
Definition: dm_api.h:783
LE connection complete event.
Definition: hci_api.h:143
void DmSecSetEccKey(secEccKey_t *pKey)
This function sets the ECC key for use with LESC security.
void DmCisCigSetTransLatInterval(uint8_t cigId, uint16_t transLatMToS, uint16_t transLatSToM)
Set the maximum transport latency, in microseconds, for the given Connected Isochronous Group (CIG)...
Scanning stopped.
Definition: dm_api.h:490
uint8_t iKeyDist
Initiator key distribution flags.
Definition: dm_api.h:657
LE Terminate BIG complete event.
Definition: hci_api.h:779
wsfMsgHdr_t hdr
Header.
Definition: dm_api.h:710
Write authenticated payload to command complete event.
Definition: hci_api.h:574
void DmSecSetLocalIdentityAddr(const uint8_t *pAddr, uint8_t type)
This function sets the local identity address used by the device.
ISO data path remove complete.
Definition: dm_api.h:559
void DmDevVsInit(uint8_t param)
Vendor-specific controller initialization function.
void DmScanStart(uint8_t scanPhys, uint8_t mode, const uint8_t *pScanType, bool_t filterDup, uint16_t duration, uint16_t period)
Start scanning on the given PHYs.
LE PHY update complete event.
Definition: hci_api.h:606
Result of ECC Key Generation.
Definition: dm_api.h:505
hciLeScanReqRcvdEvt_t scanReqRcvd
handles DM_SCAN_REQ_RCVD_IND
Definition: dm_api.h:804
dmSyncId_t DmSyncStart(uint8_t advSid, uint8_t advAddrType, const uint8_t *pAdvAddr, uint16_t skip, uint16_t syncTimeout)
Synchronize with periodic advertising from the given advertiser, and start receiving periodic adverti...
void DmDevPrivInit(void)
Initialize device privacy module.
uint8_t encKeyLen
Length of encryption key used when data was transferred.
Definition: dm_api.h:675
HciLeCisEstEvt_t cisOpen
handles DM_CIS_OPEN_IND
Definition: dm_api.h:833
Initiating connection CTE request started.
Definition: dm_api.h:547
Data type for DM_SEC_COMPARE_IND.
Definition: dm_api.h:679
#define SMP_RAND8_LEN
Random 8-byte number length.
Definition: smp_defs.h:184
LE Create BIG complete event.
Definition: hci_api.h:760
void DmSecSlaveReq(dmConnId_t connId, uint8_t auth)
This function is called by a slave device to request that the master initiates pairing or link encryp...
dmAdvSetStartEvt_t advSetStart
handles DM_ADV_SET_START_IND
Definition: dm_api.h:802
bool_t DmScanModeExt(void)
Whether DM scanning is in extended mode.
hciLeReadPeerResAddrCmdCmplEvt_t readPeerResAddr
handles DM_PRIV_READ_PEER_RES_ADDR_IND
Definition: dm_api.h:792
Data type for DM_PRIV_GENERATE_ADDR_IND.
Definition: dm_api.h:693
uint8_t * DmFindAdType(uint8_t adType, uint16_t dataLen, uint8_t *pData)
Find an advertising data element in the given advertising or scan response data.
dmPrivGenAddrIndEvt_t genAddr
handles DM_PRIV_GENERATE_ADDR_IND
Definition: dm_api.h:787
uint16_t DmExtMaxAdvDataLen(uint8_t advType, bool_t useLegacyPdu)
Get the maximum advertising data length supported by Controller for a given advertising type...
HciLeCreateBigCmplEvt_t bigStart
handles DM_BIG_START_IND
Definition: dm_api.h:842
void DmAdvRemoveAdvSet(uint8_t advHandle)
Remove an advertising set.
dmSecCsrk_t csrk
CSRK.
Definition: dm_api.h:626
HciLeCisReqEvt_t cisReq
handles DM_CIS_REQ_IND
Definition: dm_api.h:832
void DmConnCteRspStart(dmConnId_t connId)
Start responding to LL_CTE_REQ PDUs with LL_CTE_RSP PDUs on the specified connection.
void DmSecCompareRsp(dmConnId_t connId, bool_t valid)
This function is called by the application in response to a DM_SEC_COMPARE_IND event. The valid parameter indicates if the compare value of the DM_SEC_COMPARE_IND was valid.
Responding to connection CTE request started.
Definition: dm_api.h:549
ISO data path setup complete.
Definition: dm_api.h:558
wsfMsgHdr_t hdr
Header.
Definition: dm_api.h:740
void DmSyncStop(dmSyncId_t syncId)
Stop reception of the periodic advertising identified by the given sync identifier.
hciReadLocalSupCodecCapCmdCmplEvt_t readLocalSupCodecCap
handles DM_READ_LOCAL_SUP_CODEC_CAP_IND
Definition: dm_api.h:840
CTE request failed.
Definition: dm_api.h:543
PHY update.
Definition: dm_api.h:523
void DmRegister(dmCback_t cback)
Register a callback with DM for scan and advertising events.
void DmSecAuthRsp(dmConnId_t connId, uint8_t authDataLen, uint8_t *pAuthData)
This function is called in response to a DM_SEC_AUTH_REQ_IND event to provide PIN or OOB data during ...
LE periodic advertising sync transfer received.
Definition: hci_api.h:283
void DmPrivAddDevToResList(uint8_t addrType, const uint8_t *pIdentityAddr, uint8_t *pPeerIrk, uint8_t *pLocalIrk, bool_t enableLlPriv, uint16_t param)
Add device to resolving list. When complete the client&#39;s callback function is called with a DM_PRIV_A...
void DmAdvUseLegacyPdu(uint8_t advHandle, bool_t useLegacyPdu)
Set whether or not to use legacy advertising PDUs with extended advertising.
void DmCisSlaveInit(void)
Initialize DM Connected Isochronous Stream (CIS) manager for operation as slave.
Data type for DM_SEC_SLAVE_REQ_IND.
Definition: dm_api.h:662
LE CIS request event.
Definition: hci_api.h:723
Data type for DmSecSetOob().
Definition: dm_api.h:859
hciReadLocalSupCodecsCmdCmplEvt_t readLocalSupCodecs
handles DM_READ_LOCAL_SUP_CODECS_IND
Definition: dm_api.h:839
Hardware error event.
Definition: hci_api.h:418
void DmSecPairRsp(dmConnId_t connId, uint8_t oob, uint8_t auth, uint8_t iKeyDist, uint8_t rKeyDist)
This function is called by a slave device to proceed with pairing after a DM_SEC_PAIR_IND event is re...
void DmPastRptRcvEnable(dmSyncId_t syncId, bool_t enable)
Enable or disable reports for the periodic advertising identified by the sync id. ...
hciLeConnIQReportEvt_t connIQReport
handles DM_CONN_IQ_REPORT_IND
Definition: dm_api.h:820
bool_t DmCisConnInUse(uint16_t handle)
For internal use only. Return TRUE if the Connected Isochronous Stream (CIS) connection is in use...
LE add device to resolving list command complete event.
Definition: hci_api.h:553
void DmConnCteRxSampleStop(dmConnId_t connId)
Disable sampling received CTE fields on the specified connection.
hciLeConnCteRspEnableCmdCmplEvt_t connCteRspStart
handles DM_CONN_CTE_RSP_START_IND
Definition: dm_api.h:827
BIG started.
Definition: dm_api.h:564
uint16_t DmSizeOfEvt(dmEvt_t *pDmEvt)
Return size of a DM callback event.
wsfMsgHdr_t hdr
Header.
Definition: dm_api.h:688
hciLeSetConnCteTxParamsCmdCmplEvt_t connCteTxCfg
handles DM_CONN_CTE_TX_CFG_IND
Definition: dm_api.h:824
hciLeCteReqFailedEvt_t cteReqFail
handles DM_CTE_REQ_FAIL_IND
Definition: dm_api.h:821
LE CTE request failed event.
Definition: hci_api.h:650
IQ samples from CTE of received packet from peer device.
Definition: dm_api.h:542
void DmAdvSetInterval(uint8_t advHandle, uint16_t intervalMin, uint16_t intervalMax)
Set the minimum and maximum advertising intervals.
void DmReadAntennaInfo(void)
Read the switching rates, the sampling rates, the number of antennae, and the maximum length of a tra...
void DmConnMasterInit(void)
Initialize DM connection manager for operation as legacy master.
Result of OOB Confirm Calculation Generation.
Definition: dm_api.h:504
hciLeAdvSetTermEvt_t advSetStop
handles DM_ADV_SET_STOP_IND
Definition: dm_api.h:803
uint8_t * DmSecGetLocalIrk(void)
For internal use only. This function gets the local IRK used by the device.
wsfMsgHdr_t hdr
Header.
Definition: dm_api.h:671
void DmCisCigRemove(uint8_t cigId)
Remove all the Connected Isochronous Streams (CISes) associated with the given Connected Isochronous ...
void DmAdvSetSid(uint8_t advHandle, uint8_t advSid)
Set advertising SID for the given advertising handle.
dmConnId_t DmConnIdByHandle(uint16_t handle)
For internal use only. Find the connection ID with matching handle.
Periodic advertising set started.
Definition: dm_api.h:530
uint8_t * DmConnLocalRpa(dmConnId_t connId)
For internal use only. Return the local resolvable private address (RPA).
void DmPrivSetAddrResEnable(bool_t enable)
Enable or disable address resolution in LL. When complete the client&#39;s callback function is called wi...
HciLeTerminateBigCmplEvt_t bigStop
handles DM_BIG_STOP_IND
Definition: dm_api.h:843
Encryption failed.
Definition: dm_api.h:498
void DmBisMasterInit(void)
Initialize DM BIS manager for operation as master.
hciLeAdvReportEvt_t scanReport
handles DM_SCAN_REPORT_IND
Definition: dm_api.h:769
hciLePerAdvSyncEstEvt_t perAdvSyncEst
handles DM_PER_ADV_SYNC_EST_IND
Definition: dm_api.h:810
void DmPrivSetResolvablePrivateAddrTimeout(uint16_t rpaTimeout)
Set resolvable private address timeout command.
hciLeRemConnParamReqEvt_t remConnParamReq
handles DM_REM_CONN_PARAM_REQ_IND
Definition: dm_api.h:795
Data structure for DM_ADV_SET_START_IND.
Definition: dm_api.h:716
void DmConnSetConnSpec(hciConnSpec_t *pConnSpec)
Set the connection spec parameters for connections to be created with DmConnOpen().
bool_t DmSyncEncrypted(uint16_t syncHandle)
Get the encryption mode of the Broadcast Isochronous Group (BIG) corresponding to the periodic advert...
dmSecLtk_t ltk
LTK.
Definition: dm_api.h:624
Data path configure complete.
Definition: dm_api.h:560
void DmL2cConnUpdateInd(uint8_t identifier, uint16_t handle, hciConnSpec_t *pConnSpec)
For internal use only. L2C calls this function when it receives a connection update request from a pe...
LTK requested for encyption.
Definition: dm_api.h:501
void DmAdvConfig(uint8_t advHandle, uint8_t advType, uint8_t peerAddrType, uint8_t *pPeerAddr)
Set the advertising parameters using the given advertising type, and peer address.
LE remote connetion parameter request event.
Definition: hci_api.h:492
wsfMsgHdr_t hdr
Header.
Definition: dm_api.h:726
#define SMP_KEY_LEN
Key length.
Definition: smp_defs.h:183
void DmCisCigConfig(uint8_t cigId, dmConnId_t numCis, HciCisCisParams_t *pCisParam)
Set the parameters of one or more Connected Isochronous Streams (CISes) that are associated with the ...
void DmSecLtkRsp(dmConnId_t connId, bool_t keyFound, uint8_t secLevel, uint8_t *pKey)
This function is called by a slave in response to a DM_SEC_LTK_REQ_IND event to provide the long term...
void DmBigSetPackingFraming(uint8_t bigHandle, uint8_t packing, uint32_t framing)
Set the packing scheme and framing format for the given Broadcast Isochronous Group (BIG)...
dmSecPairCmplIndEvt_t pairCmpl
handles DM_SEC_PAIR_CMPL_IND
Definition: dm_api.h:773
uint8_t auth
Authentication and bonding flags.
Definition: dm_api.h:655
void DmPrivResolveAddr(uint8_t *pAddr, uint8_t *pIrk, uint16_t param)
Resolve a private resolvable address. When complete the client&#39;s callback function is called with a D...
Incoming pairing request from master.
Definition: dm_api.h:502
Local supported codecs read.
Definition: dm_api.h:561
hciLeSetDefPhyCmdCmplEvt_t setDefPhy
handles DM_PHY_SET_DEF_IND
Definition: dm_api.h:800
Setup ISO data path parameters.
Definition: hci_api.h:1150
uint32_t DmSecGetCompareValue(uint8_t *pConfirm)
This function returns the 6-digit compare value for the specified 128-bit confirm value...
void DmRemoteConnParamReqReply(dmConnId_t connId, hciConnSpec_t *pConnSpec)
Reply to the HCI remote connection parameter request event. This command is used to indicate that the...
Pairing failed or other security failure.
Definition: dm_api.h:496
Data type for DM_SEC_KEY_IND.
Definition: dm_api.h:669
void DmScanInit(void)
Initialize DM legacy scanning.
void DmL2cConnUpdateCnf(uint16_t handle, uint16_t reason)
For internal use only. L2C calls this function to send the result of an L2CAP connection update respo...
void DmSecGenerateEccKeyReq(void)
This function generates an ECC key for use with LESC security.
HciLeBigTermSyncCmplEvt_t bigSyncStop
handles DM_BIG_SYNC_STOP_IND
Definition: dm_api.h:847
void DmCisInit(void)
Initialize DM Connected Isochronous Stream (CIS) manager.
dmSecKeypressIndEvt_t keypressInd
handles DM_SEC_KEYPRESS_IND
Definition: dm_api.h:785
void DmBigSyncSetSecLevel(uint8_t bigHandle, uint8_t secLevel)
Set the security level of the LE Security Mode 3 for the given Broadcast Isochronous Group (BIG)...
void DmPastInit(void)
Initialize DM Periodic Advertising Sync Transfer (PAST) module.
Device added to resolving list.
Definition: dm_api.h:511
Read local supported codec capabilities command complete event.
Definition: hci_api.h:895
uint8_t DmSecGetLocalIdentityAddrType(void)
For internal use only. This function gets the local identity address type used by the device...
Set default PHY.
Definition: dm_api.h:522
void DmSecEncryptReq(dmConnId_t connId, uint8_t secLevel, dmSecLtk_t *pLtk)
This function is called by a master device to initiate link encryption.
Result of Just Works/Numeric Comparison Compare Value Calculation.
Definition: dm_api.h:506
void DmSmpEncryptReq(dmConnId_t connId, uint8_t secLevel, uint8_t *pKey)
For internal use only. This function is called by SMP to request encryption.
void DmBigSetSecLevel(uint8_t bigHandle, uint8_t secLevel)
Set the security level of the LE Security Mode 3 for the given Broadcast Isochronous Group (BIG)...
BIG sync stopped.
Definition: dm_api.h:569
Peer resolving address read.
Definition: dm_api.h:514
bool_t DmAdvModeLeg(void)
Whether DM advertising is in legacy mode.
LE extended advertising report.
Definition: hci_api.h:205
Extended scan data received from peer device.
Definition: dm_api.h:529
wsfMsgHdr_t hdr
Header.
Definition: dm_api.h:702
dmConnId_t DmConnAccept(uint8_t clientId, uint8_t advHandle, uint8_t advType, uint16_t duration, uint8_t maxEaEvents, uint8_t addrType, uint8_t *pAddr)
Accept a connection from the given peer device by initiating directed advertising.
hciLeRemDevFromResListCmdCmplEvt_t remDevFromResList
handles DM_PRIV_REM_DEV_FROM_RES_LIST_IND
Definition: dm_api.h:790
dmSecOobCalcIndEvt_t oobCalcInd
handles DM_SEC_CALC_OOB_IND
Definition: dm_api.h:782
void DmExtConnSetScanInterval(uint8_t initPhys, uint16_t *pScanInterval, uint16_t *pScanWindow)
Set the scan interval and window for extended connections to be created with DmConnOpen().
HciLeReqPeerScaCmplEvt_t_t reqPeerSca
handles DM_REQ_PEER_SCA_IND
Definition: dm_api.h:835
bool_t DmLlPrivEnabled(void)
Whether LL Privacy is enabled.
LE periodic advertising sync transfer command complete event.
Definition: hci_api.h:616
#define SMP_CONFIRM_LEN
Confirm number length.
Definition: smp_defs.h:182
void DmAdvSetAddrType(uint8_t addrType)
Set the local address type used while advertising. This function can be used to configure advertising...
bool_t display
TRUE if pin is to be displayed.
Definition: dm_api.h:648
void DmAdvStart(uint8_t numSets, uint8_t *pAdvHandles, uint16_t *pDuration, uint8_t *pMaxEaEvents)
Start advertising using the given advertising set and duration.
BIG stopped.
Definition: dm_api.h:565
LE set default PHY command complete event.
Definition: hci_api.h:599
hciLeAddDevToResListCmdCmplEvt_t addDevToResList
handles DM_PRIV_ADD_DEV_TO_RES_LIST_IND
Definition: dm_api.h:789
void DmPerAdvSetInterval(uint8_t advHandle, uint16_t intervalMin, uint16_t intervalMax)
Set the minimum and maximum advertising intervals for periodic advertising.
void DmWriteAuthPayloadTimeout(dmConnId_t connId, uint16_t timeout)
Set authenticated payload timeout for a given connection.
void DmPerAdvSetData(uint8_t advHandle, uint8_t op, uint8_t len, uint8_t *pData)
Set the advertising data to the given data for periodic advertising.
void DmSecSetOob(dmConnId_t connId, dmSecLescOobCfg_t *pConfig)
This function configures the DM to use OOB pairing for the given connection. The pRand and pConfirm c...
void DmCisReject(uint16_t handle, uint8_t reason)
Inform the Controller to reject the request for the Connected Isochronous Stream (CIS) that is identi...
void DmSecPairReq(dmConnId_t connId, uint8_t oob, uint8_t auth, uint8_t iKeyDist, uint8_t rKeyDist)
This function is called by a master device to initiate pairing.
General error.
Definition: dm_api.h:572
Request peer SCA complete.
Definition: dm_api.h:557
Advertising set(s) stopped.
Definition: dm_api.h:525
hciLeSetConnCteRxParamsCmdCmplEvt_t connCteRxSampleStop
handles DM_CONN_CTE_RX_SAMPLE_STOP_IND
Definition: dm_api.h:823
BIG sync lost.
Definition: dm_api.h:568
void DmConnCteRspStop(dmConnId_t connId)
Stop responding to LL_CTE_REQ PDUs with LL_CTE_RSP PDUs on the specified connection.
void DmDevPrivStop(void)
Stop using a private resolvable address.
void DmSecSetLocalCsrk(uint8_t *pCsrk)
This function sets the local CSRK used by the device.
uint8_t DmConnCteGetReqState(dmConnId_t connId)
Returns the device manager&#39;s CTE request state for a given connection.
hciLeReadAntennaInfoCmdCmplEvt_t readAntennaInfo
handles DM_READ_ANTENNA_INFO_IND
Definition: dm_api.h:829
Security key indication.
Definition: dm_api.h:500
bool_t DmPerAdvEnabled(uint8_t advHandle)
Get status of periodic advertising handle.
void DmConnSlaveInit(void)
Initialize DM connection manager for operation as legacy slave.
HciLePerAdvSyncTrsfRcvdEvt_t perAdvSyncTrsfEst
handles DM_PER_ADV_SYNC_TRSF_EST_IND
Definition: dm_api.h:813
Periodic advertising sync transfer established.
Definition: dm_api.h:535
uint16_t handle
Connection handle.
Definition: dm_api.h:742
void DmAdvInit(void)
Initialize DM legacy advertising.
void DmConnRegister(uint8_t clientId, dmCback_t cback)
Register with the DM connection manager.
Data type for DM_SEC_KEYPRESS_IND.
Definition: dm_api.h:686
void DmScanSetInterval(uint8_t scanPhys, uint16_t *pScanInterval, uint16_t *pScanWindow)
Set the scan interval and window for the specified PHYs.
uint8_t dmSyncId_t
Synchronization identifier.
Definition: dm_api.h:591
void DmReadRemoteVerInfo(dmConnId_t connId)
Read the version info of the remote device.
Hardware error.
Definition: dm_api.h:573
void DmCisOpen(uint8_t numCis, uint16_t *pCisHandle, uint16_t *pAclHandle)
Create one or more Connected Isochronous Streams (CISes) using the connections identified by the ACL ...
LE set CIG parameters command complete event.
Definition: hci_api.h:742
LE periodic advertising report.
Definition: hci_api.h:263
void DmSetDefaultPhy(uint8_t allPhys, uint8_t txPhys, uint8_t rxPhys)
Set the preferred values for the transmitter PHY and receiver PHY for all subsequent connections...
void DmDataPathConfig(HciConfigDataPath_t *pDataPathParam)
Request the Controller to configure the data transport path in a given direction between the Controll...
CIS CIG configure complete.
Definition: dm_api.h:552
Read RSSI command complete event.
Definition: hci_api.h:307
void DmExtAdvInit(void)
Initialize DM extended advertising.
Union of DM callback event data types.
Definition: dm_api.h:760
bool_t DmBisSyncInUse(uint16_t handle)
For internal use only. Return TRUE if the BIS sync is in use.
void DmCisCigSetPackingFraming(uint8_t cigId, uint8_t packing, uint32_t framing)
Set the packing scheme and framing format for the given Connected Isochronous Group (CIG)...
void DmConnCteInit(void)
Initialize DM Connection Constant Tone Extension (CTE) module.
Data type for DM_SEC_PAIR_CMPL_IND.
Definition: dm_api.h:630
Data type for DM_SEC_CALC_OOB_IND.
Definition: dm_api.h:700
void DmAdvSetChannelMap(uint8_t advHandle, uint8_t channelMap)
Include or exclude certain channels from the advertising channel map.
Connection update complete.
Definition: dm_api.h:494
Read PHY.
Definition: dm_api.h:521
uint8_t bdAddr_t[6]
BD address data type.
Definition: bda.h:67
void DmAdvSetData(uint8_t advHandle, uint8_t op, uint8_t location, uint8_t len, uint8_t *pData)
Set the advertising or scan response data to the given data.
Authenticated payload to expire event.
Definition: hci_api.h:582
Extended scanning started.
Definition: dm_api.h:527
hciReadRemoteVerInfoCmplEvt_t readRemVerInfo
handles DM_READ_REMOTE_VER_INFO_IND
Definition: dm_api.h:819
ECC Security public/private key pair.
Definition: sec_api.h:113
uint8_t DmConnSecLevel(dmConnId_t connId)
For internal use only. Return the security level of the connection.
hciLeSetupIsoDataPathCmdCmplEvt_t isoDataPathSetup
handles DM_ISO_DATA_PATH_SETUP_IND
Definition: dm_api.h:836
void DmBigSetPhy(uint8_t bigHandle, uint8_t phyBits)
Set the PHYs used for transmission of PDUs of Broadcast Isochronous Streams (BISes) in Broadcast Isoc...
Private address resolved.
Definition: dm_api.h:508
void DmReadRemoteFeatures(dmConnId_t connId)
For internal use only. Read the features of the remote device.
void DmReadLocalSupCodecCap(HciReadLocalSupCodecCaps_t *pCodecParam)
Read a list of codec capabilities supported by the Controller for a given codec.
LE BIG sync lost event.
Definition: hci_api.h:812
Advertising started.
Definition: dm_api.h:486
uint8_t notificationType
Type of keypress notification.
Definition: dm_api.h:689
Data length changed.
Definition: dm_api.h:518
void DmDevWhiteListRemove(uint8_t addrType, uint8_t *pAddr)
Remove a peer device from the white list. Note that this function cannot be called while advertising...
Periodic advertising sync transfer establishment failed.
Definition: dm_api.h:536
void DmIsoDataPathRemove(uint16_t handle, uint8_t directionBits)
Remove the input and/or output data path(s) associated with a Connected Isochronous Stream (CIS) or B...
void DmSecSetDebugEccKey(void)
This function sets the ECC key for use with LESC security to standard debug keys values.
LE BIG Terminate Sync complete event.
Definition: hci_api.h:787
uint8_t dummy
Placeholder variable.
Definition: dm_api.h:596
hciHwErrorEvt_t hwError
handles DM_HW_ERROR_IND
Definition: dm_api.h:854
Read remote version information complete event.
Definition: hci_api.h:334
void DmPastSetInfoTrsf(dmConnId_t connId, uint16_t serviceData, uint8_t advHandle)
Send synchronization information about the periodic advertising in an advertising set to a connected ...
void DmPrivSetPrivacyMode(uint8_t addrType, const uint8_t *pIdentityAddr, uint8_t mode)
Set privacy mode for a given entry in the resolving list.
void DmConnRequestPeerSca(dmConnId_t connId)
Request the Sleep Clock Accuracy (SCA) of a peer device.
bool_t usingLtk
TRUE if connection encrypted with LTK.
Definition: dm_api.h:640
void DmPerAdvStop(uint8_t advHandle)
Stop periodic advertising for the advertising set specified by the advertising handle.
IRK data type.
Definition: dm_api.h:608
Connection specification type.
Definition: hci_api.h:1023
hciDisconnectCmplEvt_t connClose
handles DM_CONN_CLOSE_IND
Definition: dm_api.h:771
void DmSecInit(void)
Initialize DM security.
LE connection update complete event.
Definition: hci_api.h:171
void DmConnClose(uint8_t clientId, dmConnId_t connId, uint8_t reason)
Close the connection with the give connection identifier.
hciLeExtAdvReportEvt_t extScanReport
handles DM_EXT_SCAN_REPORT_IND
Definition: dm_api.h:807
uint16_t DmConnCheckIdle(dmConnId_t connId)
Check if a connection is idle.
bool_t DmDevSetExtFilterPolicy(uint8_t advHandle, uint8_t mode, uint8_t policy)
Set the Advertising filter policy for the given advertising, Scanning or Initiator filter policy...
Vendor specific event.
Definition: dm_api.h:574
void DmPastSyncTrsf(dmConnId_t connId, uint16_t serviceData, dmSyncId_t syncId)
Send synchronization information about the periodic advertising identified by the sync id to a connec...
LE remove ISO data path command complete event.
Definition: hci_api.h:847
#define DM_NUM_ADV_SETS
Number of supported advertising sets: must be set to 1 for legacy advertising.
Definition: cfg_stack.h:91
hciLeConnCteReqEnableCmdCmplEvt_t connCteReqStart
handles DM_CONN_CTE_REQ_START_IND
Definition: dm_api.h:825
wsfMsgHdr_t hdr
Header.
Definition: dm_api.h:718
dmSecPairIndEvt_t pairInd
handles DM_SEC_PAIR_IND
Definition: dm_api.h:780
uint8_t * DmConnPeerAddr(dmConnId_t connId)
For internal use only. Return the peer device address.
#define SMP_RAND_LEN
Random number length.
Definition: smp_defs.h:181
Authenticated payload timeout expired.
Definition: dm_api.h:520
Remote connection parameter requested.
Definition: dm_api.h:517
void DmConnSetScanInterval(uint16_t scanInterval, uint16_t scanWindow)
Set the scan interval and window for connections to be created with DmConnOpen(). ...
Periodic advertising sync info transferred.
Definition: dm_api.h:537
LE connection IQ report.
Definition: hci_api.h:632
void DmReadPhy(dmConnId_t connId)
Read the current transmitter PHY and receiver PHY for a given connection.
void DmPrivReadLocalResolvableAddr(uint8_t addrType, const uint8_t *pIdentityAddr)
Read local resolvable address command. When complete the client&#39;s callback function is called with a ...
void DmPrivGenerateAddr(uint8_t *pIrk, uint16_t param)
Generate a Resolvable Private Address (RPA).
void DmDevPrivStart(uint16_t changeInterval)
Start using a private resolvable address.
LE set connection CTE transmit parameters command complete event.
Definition: hci_api.h:666
HciLeBigSyncEstEvt_t bigSyncEst
handles DM_BIG_SYNC_EST_IND
Definition: dm_api.h:844
Periodic advertising data received from peer device.
Definition: dm_api.h:539
void DmBigSyncStop(uint8_t bigHandle)
Stop synchronizing or cancel the process of synchronizing to the Broadcast Isochronous Group (BIG) id...
LE clear resolving list command complete event.
Definition: hci_api.h:567
wsfMsgHdr_t hdr
Header.
Definition: dm_api.h:681
uint8_t type
Key type.
Definition: dm_api.h:673
LE data length change event.
Definition: hci_api.h:503
hciLeRemoveCigCmdCmplEvt_t cisCigRemove
handles DM_CIS_CIG_REMOVE_IND
Definition: dm_api.h:831
Local supported codec capabilities read.
Definition: dm_api.h:562
hciWriteAuthPayloadToCmdCmplEvt_t writeAuthTo
handles DM_CONN_WRITE_AUTH_TO_IND
Definition: dm_api.h:797
Connection encrypted.
Definition: dm_api.h:497
uint8_t DmLlAddrType(uint8_t addrType)
Map an address type to a type used by LL.
void(* dmCback_t)(dmEvt_t *pDmEvt)
Callback type.
Definition: dm_api.h:868
wsfMsgHdr_t hdr
Header.
Definition: dm_api.h:654
LE LTK request event.
Definition: hci_api.h:387
Security manager constants and definitions from the Bluetooth specification.
LE read antenna information command complete event.
Definition: hci_api.h:690
void DmAdvOmitAdvAddr(uint8_t advHandle, bool_t omitAdvAddr)
Set whether or not to omit advertiser&#39;s address from all PDUs (anonymous advertising).
dmSecEncryptIndEvt_t encryptInd
handles DM_SEC_ENCRYPT_IND
Definition: dm_api.h:775
Scan request received.
Definition: dm_api.h:526
hciLeConnCteRspEnableCmdCmplEvt_t connCteRspStop
handles DM_CONN_CTE_RSP_STOP_IND
Definition: dm_api.h:828
Periodic advertising set sync info transferred.
Definition: dm_api.h:538
bool_t DmScanModeLeg(void)
Whether DM scanning is in legacy mode.
void DmBigSyncStart(uint8_t bigHandle, uint16_t syncHandle, uint8_t mse, uint16_t bigSyncTimeout, uint8_t numBis, uint8_t *pBis)
Synchronize to a Broadcast Isochronous Group (BIG) described in the periodic advertising train specif...
bool_t DmAdvSetAdValue(uint8_t adType, uint8_t len, uint8_t *pValue, uint16_t *pAdvDataLen, uint8_t *pAdvData, uint16_t advDataBufLen)
Set the value of an advertising data element in the given advertising or scan response data...
dmL2cCmdRejEvt_t l2cCmdRej
handles DM_L2C_CMD_REJ_IND
Definition: dm_api.h:852
bool_t oob
Out-of-band pairing data present or not present.
Definition: dm_api.h:656
CIS request.
Definition: dm_api.h:554
void DmCisAccept(uint16_t handle)
Inform the Controller to accept the request for the Connected Isochronous Stream (CIS) that is identi...
void DmDevSetRandAddr(uint8_t *pAddr)
Set the random address to be used by the local device.
LE read PHY command complete event.
Definition: hci_api.h:589
Read local supported controller delay parameters.
Definition: hci_api.h:1183
void DmAdvSetRandAddr(uint8_t advHandle, const uint8_t *pAddr)
Set the random device address for a given advertising set.
Data structure for DM_PER_ADV_SET_START_IND.
Definition: dm_api.h:724
wsfMsgHdr_t hdr
Header.
Definition: dm_api.h:695
Private resolvable address generated.
Definition: dm_api.h:509
void DmConnSetAddrType(uint8_t addrType)
Set the local address type used for connections created with DmConnOpen().
uint8_t * DmSecGetLocalIdentityAddr(void)
For internal use only. This function gets the local identity address used by the device.
void DmPerAdvIncTxPwr(uint8_t advHandle, bool_t incTxPwr)
Set whether or not to include TxPower in extended header of advertising PDU for periodic advertising...
dmSecKey_t keyData
Key data.
Definition: dm_api.h:672
Data structure for DM_PER_ADV_SET_STOP_IND.
Definition: dm_api.h:731
void DmReadLocalSupCodecs(void)
Read a list of the codecs supported by the Controller, as well as vendor specific codecs...
hciDisconnectCmplEvt_t cisClose
handles DM_CIS_CLOSE_IND
Definition: dm_api.h:834
dmSecAuthReqIndEvt_t authReq
handles DM_SEC_AUTH_REQ_IND
Definition: dm_api.h:777
New resolvable address has been generated.
Definition: dm_api.h:488
hciLeReadPhyCmdCmplEvt_t readPhy
handles DM_PHY_READ_IND
Definition: dm_api.h:799
LE set address resolving enable command complete event.
Definition: hci_api.h:546
wsfMsgHdr_t hdr
Header.
Definition: dm_api.h:664
hciLeReadLocalResAddrCmdCmplEvt_t readLocalResAddr
handles DM_PRIV_READ_LOCAL_RES_ADDR_IND
Definition: dm_api.h:793
Periodic advertising sync establishment failed.
Definition: dm_api.h:533
LE read peer resolving address command complete event.
Definition: hci_api.h:530
LE set connection CTE receive parameters command complete event.
Definition: hci_api.h:658
void DmAdvClearAdvSets(void)
Clear advertising sets.
void DmScanSetAddrType(uint8_t addrType)
Set the local address type used while scanning. This function can be used to configure scanning to us...
LE set periodic advertising set info transfer command complete event.
Definition: hci_api.h:624
CIS CIG remove complete.
Definition: dm_api.h:553
void DmSetPhy(dmConnId_t connId, uint8_t allPhys, uint8_t txPhys, uint8_t rxPhys, uint16_t phyOptions)
Set the PHY preferences for a given connection.
PIN or OOB data requested for pairing.
Definition: dm_api.h:499
Advertising set(s) started.
Definition: dm_api.h:524
Scan data received from peer device.
Definition: dm_api.h:491
void DmReadLocalSupCtrDly(HciReadLocalSupControllerDly_t *pDelayParam)
Read the range of supported Controller delays for the codec specified by Codec ID on a given transpor...
void DmBigStart(uint8_t bigHandle, uint8_t advHandle, uint8_t numBis, uint32_t sduInterUsec, uint16_t maxSdu, uint16_t mtlMs, uint8_t rtn)
Start a Broadcast Isochronous Group (BIG) with one or more Broadcast Isochronous Streams (BISes)...
void DmClearPerAdvList(void)
DM clear periodic advertiser list.
void DmPrivInit(void)
Initialize DM privacy module.
void DmConnCteReqStart(dmConnId_t connId, uint16_t cteReqInt, uint8_t reqCteLen, uint8_t reqCteType)
Initiate the CTE Request procedure on the specified connection.
uint8_t DmConnRole(dmConnId_t connId)
Return the connection role indicating master or slave.
Pairing completed successfully.
Definition: dm_api.h:495
void DmAdvScanReqNotifEnable(uint8_t advHandle, bool_t scanReqNotifEna)
Set scan request notification enable.
void DmIsoDataPathSetup(HciIsoSetupDataPath_t *pDataPathParam)
Setup the isochronous data path between the Host and the Controller for an established Connected Isoc...
LTK data type.
Definition: dm_api.h:600
Data type for DM_ADV_NEW_ADDR_IND.
Definition: dm_api.h:708
LE scan request received.
Definition: hci_api.h:240
Configure data path parameters.
Definition: hci_api.h:1164
LE remove device from resolving list command complete event.
Definition: hci_api.h:560
uint8_t auth
Authentication and bonding flags.
Definition: dm_api.h:665
Data type for DM_SEC_ENCRYPT_IND.
Definition: dm_api.h:637
Periodic advertising set stopped.
Definition: dm_api.h:531
CIS connection opened.
Definition: dm_api.h:555
uint8_t DmConnPeerAddrType(dmConnId_t connId)
For internal use only. Return the peer address type.
LE advertising report event.
Definition: hci_api.h:189
void DmDevWhiteListAdd(uint8_t addrType, uint8_t *pAddr)
Add a peer device to the white list. Note that this function cannot be called while advertising...
void DmConnInit(void)
Initialize DM connection manager.
void DmExtConnSetConnSpec(uint8_t initPhys, hciConnSpec_t *pConnSpec)
Set the extended connection spec parameters for extended connections to be created with DmConnOpen()...
hciLeConnUpdateCmplEvt_t connUpdate
handles DM_CONN_UPDATE_IND
Definition: dm_api.h:772
void DmConnCteReqStop(dmConnId_t connId)
Stop initiating the CTE Request procedure on the specified connection.
Config data path command complete event.
Definition: hci_api.h:855
#define DM_CBACK_START
DM callback event starting value.
Definition: dm_api.h:480
void DmConnSetIdle(dmConnId_t connId, uint16_t idleMask, uint8_t idle)
Configure a bit in the connection idle state mask as busy or idle.
bdAddr_t addr
Resolvable private address.
Definition: dm_api.h:696
void DmSecSetLocalIrk(uint8_t *pIrk)
This function sets the local IRK used by the device.
void DmPrivReadPeerResolvableAddr(uint8_t addrType, const uint8_t *pIdentityAddr)
HCI read peer resolvable address command. When complete the client&#39;s callback function is called with...
dmPerAdvSetStopEvt_t perAdvSetStop
handles DM_PER_ADV_SET_STOP_IND
Definition: dm_api.h:809
HciLeBigSyncEstEvt_t bigSyncEstFail
handles DM_BIG_SYNC_EST_FAIL_IND
Definition: dm_api.h:845
hciLeSetAddrResEnableCmdCmplEvt_t setAddrResEnable
handles DM_PRIV_SET_ADDR_RES_ENABLE_IND
Definition: dm_api.h:794
Vendor specific event.
Definition: hci_api.h:411
Data type for DM_SEC_AUTH_REQ_IND.
Definition: dm_api.h:644
void DmBigSetBcastCode(uint8_t bigHandle, bool_t encrypt, bool_t authen, uint8_t *pBcastCode)
Set the Broadcast Code for the given Broadcast Isochronous Group (BIG).
uint8_t rKeyDist
Responder key distribution flags.
Definition: dm_api.h:658
bdAddr_t addr
New resolvable private address.
Definition: dm_api.h:711
BIG Info advertising data received from peer device.
Definition: dm_api.h:570
hciLeConnCteReqEnableCmdCmplEvt_t connCteReqStop
handles DM_CONN_CTE_REQ_STOP_IND
Definition: dm_api.h:826
void DmCisClose(uint16_t handle, uint8_t reason)
Close the Connected Isochronous Stream (CIS) connection with the given handle.
LE connection CTE response enable command complete event.
Definition: hci_api.h:682
void DmSyncSetEncrypt(uint16_t syncHandle, bool_t encrypt)
Set the encryption mode of the Broadcast Isochronous Group (BIG) corresponding to the periodic advert...
Scanning started.
Definition: dm_api.h:489
Disconnect complete event.
Definition: hci_api.h:162
hciLeConnCmplEvt_t connOpen
handles DM_CONN_OPEN_IND
Definition: dm_api.h:770
Write authenticated payload complete.
Definition: dm_api.h:519
Extended scanning stopped.
Definition: dm_api.h:528
bdAddr_t bdAddr
BD Address.
Definition: dm_api.h:611
CSRK data type.
Definition: dm_api.h:616
LE connection CTE request enable command complete event.
Definition: hci_api.h:674
uint8_t DmBigGetSecLevel(uint16_t handle)
Get the security level of the LE Security Mode 3 for the given Broadcast Isochronous Group (BIG) conn...
void DmDevWhiteListClear(void)
Clear the white list. Note that this function cannot be called while advertising, scanning...
LE BIG Info Advertising Report event.
Definition: hci_api.h:820
Resolving list cleared.
Definition: dm_api.h:513
void DmPerAdvStart(uint8_t advHandle)
Start periodic advertising for the advertising set specified by the advertising handle.
secEccKey_t * DmSecGetEccKey(void)
This function gets the local ECC key for use with LESC security.
void DmAdvSetPhyParam(uint8_t advHandle, uint8_t priAdvPhy, uint8_t secAdvMaxSkip, uint8_t secAdvPhy)
Set extended advertising PHY parameters.
bool_t oob
Out-of-band data requested.
Definition: dm_api.h:647
Device removed from resolving list.
Definition: dm_api.h:512
LE read remote features complete event.
Definition: hci_api.h:345
LE remove CIG command complete event.
Definition: hci_api.h:752
uint8_t advHandle
Advertising handle.
Definition: dm_api.h:727
Remote features from peer device.
Definition: dm_api.h:540
wsfMsgHdr_t hdr
Header.
Definition: dm_api.h:632
Local resolving address read.
Definition: dm_api.h:515
Responding to connection CTE request stopped.
Definition: dm_api.h:550
LE request peer SCA complete.
Definition: hci_api.h:733
Initiating connection CTE request stopped.
Definition: dm_api.h:548
hciLePerAdvSetInfoTrsfCmdCmplEvt_t perAdvSetInfoTrsf
handles DM_PER_ADV_SET_INFO_TRSF_IND
Definition: dm_api.h:816
uint8_t DmHostAddrType(uint8_t addrType)
Map an address type to a type used by Host.
void DmAdvStop(uint8_t numSets, uint8_t *pAdvHandles)
Stop advertising for the given advertising set. If the number of sets is set to 0 then all advertisin...
HciLePerAdvSyncTrsfRcvdEvt_t perAdvSyncTrsEstFail
handles DM_PER_ADV_SYNC_TRSF_EST_FAIL_IND
Definition: dm_api.h:814
void DmExtConnSlaveInit(void)
Initialize DM connection manager for operation as extended slave.
LE periodic advertising sync established.
Definition: hci_api.h:249
void DmAddDeviceToPerAdvList(uint8_t advAddrType, uint8_t *pAdvAddr, uint8_t advSid)
Add device to periodic advertiser list.
void DmBigSyncSetBcastCode(uint8_t bigHandle, bool_t encrypt, bool_t authen, uint8_t *pBcastCode)
Set the Broadcast Code for the given Broadcast Isochronous Group (BIG).
void DmCisCigSetSca(uint8_t cigId, uint8_t sca)
Set the slaves clock accuracy for the given Connected Isochronous Group (CIG).
Connection opened.
Definition: dm_api.h:492
void DmPastDefaultConfig(uint8_t mode, uint16_t skip, uint16_t syncTimeout, uint8_t cteType)
Specify the initial value for the mode, skip, timeout, and Constant Tone Extension type to be used fo...
Union of key types.
Definition: dm_api.h:622
void DmSecCancelReq(dmConnId_t connId, uint8_t reason)
This function is called to cancel the pairing process.
void DmConnCteTxConfig(dmConnId_t connId, uint8_t cteTypeBits, uint8_t switchPatternLen, uint8_t *pAntennaIDs)
Configure the antenna switching pattern, and permitted CTE types used for transmitting CTEs requested...
void DmSecLescInit(void)
Initialize DM LE Secure Connections security.
uint8_t secLevel
Security level of pairing when key was exchanged.
Definition: dm_api.h:674
Antenna information read.
Definition: dm_api.h:551
void DmSmpCbackExec(dmEvt_t *pDmEvt)
For internal use only. Execute DM callback from SMP procedures.
hciLePerAdvSyncLostEvt_t perAdvSyncLost
handles DM_PER_ADV_SYNC_LOST_IND
Definition: dm_api.h:812
hciReadLocalSupCtrDlyCmdCmplEvt_t readLocalSupCtrDly
handles DM_READ_LOCAL_SUP_CTR_DLY_IND
Definition: dm_api.h:841
Sampling received CTE started.
Definition: dm_api.h:544
void DmCisMasterInit(void)
Initialize DM Connected Isochronous Stream (CIS) manager for operation as master. ...
bool_t DmSyncEnabled(uint16_t syncHandle)
Get status of sync identified by the handle.
L2CAP Command Reject.
Definition: dm_api.h:571
hciVendorSpecEvt_t vendorSpec
handles DM_VENDOR_SPEC_IND
Definition: dm_api.h:855
BIG sync establishment failed.
Definition: dm_api.h:567
Advertising stopped.
Definition: dm_api.h:487
bool_t DmBisInUse(uint16_t handle)
For internal use only. Return TRUE if the BIS is in use.
Common message structure passed to event handler.
Definition: wsf_os.h:106
uint8_t advHandle
Advertising handle.
Definition: dm_api.h:734
Read local supported codecs command complete event.
Definition: hci_api.h:875
uint16_t reason
Rejection reason.
Definition: dm_api.h:741
uint8_t numSets
Number of advertising sets.
Definition: dm_api.h:719
hciAuthPayloadToExpiredEvt_t authToExpired
handles DM_CONN_AUTH_TO_EXPIRED_IND
Definition: dm_api.h:798
void DmPrivRemDevFromResList(uint8_t addrType, const uint8_t *pIdentityAddr, uint16_t param)
Remove device from resolving list. When complete the client&#39;s callback function is called with a DM_P...
AES and random number security service API.
Connection RSSI read.
Definition: dm_api.h:510
Sampling received CTE stopped.
Definition: dm_api.h:545
void DmRemoteConnParamReqNegReply(dmConnId_t connId, uint8_t reason)
Negative reply to the HCI remote connection parameter request event. This command is used to indicate...
void DmL2cCmdRejInd(uint16_t handle, uint16_t result)
For internal use only. L2C calls this function to send the result of an L2CAP Command Reject up to th...
hciLeSetConnCteRxParamsCmdCmplEvt_t connCteRxSampleStart
handles DM_CONN_CTE_RX_SAMPLE_START_IND
Definition: dm_api.h:822
HciLeBigSyncLostEvt_t bigSyncLost
handles DM_BIG_SYNC_LOST_IND
Definition: dm_api.h:846
void DmExtScanInit(void)
Initialize DM extended scanning.
hciLeClearResListCmdCmplEvt_t clearResList
handles DM_PRIV_CLEAR_RES_LIST_IND
Definition: dm_api.h:791
Keypress indication from peer in passkey security.
Definition: dm_api.h:507
hciLePerAdvReportEvt_t perAdvReport
handles DM_PER_ADV_REPORT_IND
Definition: dm_api.h:817
Address resolving enable set.
Definition: dm_api.h:516
void DmPhyInit(void)
Initialize DM PHY.
Periodic advertising sync established.
Definition: dm_api.h:532
hciLePhyUpdateEvt_t phyUpdate
handles DM_PHY_UPDATE_IND
Definition: dm_api.h:801
hciLeLtkReqEvt_t ltkReqInd
handles DM_SEC_LTK_REQ_IND
Definition: dm_api.h:779
Periodic advertising sync lost.
Definition: dm_api.h:534
void DmPastConfig(dmConnId_t connId, uint8_t mode, uint16_t skip, uint16_t syncTimeout, uint8_t cteType)
Specify how the Controller should process periodic advertising synchronization information received f...
CIS connection closed.
Definition: dm_api.h:556
void DmSyncInitialRptEnable(bool_t enable)
DM enable or disable initial periodic advertisement reporting.
LE advertising set terminated.
Definition: hci_api.h:230
LE periodic advertising synch lost.
Definition: hci_api.h:276
Read local supported codec capabilities parameters.
Definition: hci_api.h:1173
dmSecKeyIndEvt_t keyInd
handles DM_SEC_KEY_IND
Definition: dm_api.h:778
Stack configuration.
uint8_t auth
Authentication and bonding flags.
Definition: dm_api.h:633
Connection CTE transmit parameters configured.
Definition: dm_api.h:546
void DmConnReadRssi(dmConnId_t connId)
Read RSSI of a given connection.
uint8_t DmConnLocalAddrType(dmConnId_t connId)
For internal use only. Return the local address type.
hciReadRssiCmdCmplEvt_t readRssi
handles DM_CONN_READ_RSSI_IND
Definition: dm_api.h:788
wsfMsgHdr_t hdr
Header.
Definition: dm_api.h:733
BIG sync established.
Definition: dm_api.h:566
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.