ble_iso.h
Go to the documentation of this file.
1 /**
2  ****************************************************************************************
3  *
4  * @file ble_iso.h
5  *
6  * @brief BLE ISO API
7  *
8  ****************************************************************************************
9  * @attention
10  #####Copyright (c) 2019 GOODIX
11  All rights reserved.
12 
13  Redistribution and use in source and binary forms, with or without
14  modification, are permitted provided that the following conditions are met:
15  * Redistributions of source code must retain the above copyright
16  notice, this list of conditions and the following disclaimer.
17  * Redistributions in binary form must reproduce the above copyright
18  notice, this list of conditions and the following disclaimer in the
19  documentation and/or other materials provided with the distribution.
20  * Neither the name of GOODIX nor the names of its contributors may be used
21  to endorse or promote products derived from this software without
22  specific prior written permission.
23 
24  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27  ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
28  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  POSSIBILITY OF SUCH DAMAGE.
35  *****************************************************************************************
36  */
37 
38  /**
39  * @addtogroup BLE
40  * @{
41  */
42 
43  /**
44  @addtogroup BLE_ISO Core Isochronous Channels
45  @{
46  @brief Definitions and prototypes for the ISO interfaces.
47  */
48 
49 #ifndef __BLE_ISO_H__
50 #define __BLE_ISO_H__
51 
52 #include "ble_error.h"
53 #include "ble_gapc.h"
54 #include <stdint.h>
55 #include <stdbool.h>
56 
57 /** @addtogroup BLE_ISO_DEFINES Defines
58  * @{ */
59 
60 #define ISO_ADDR_LEN 6 /**< Length for address. */
61 #define ENC_CODE_LEN 16 /**< Length for encryption code. */
62 
63 #define ISO_SYNC0_PULSE (0x1 << 0) /**< ISO sync0 pulse. */
64 #define ISO_SYNC1_PULSE (0x1 << 1) /**< ISO sync1 pulse. */
65 /** @} */
66 
67 
68 /**@addtogroup BLE_ISO_ENUMERATIONS Enumerations
69  * @{ */
70 
71  /**@brief Operation ID. */
72 typedef enum
73 {
84 } iso_op_id_t;
85 
86 /**@brief Adv type for announcement. */
87 typedef enum
88 {
89  ISO_ADV_UNDIRECT, /**< undirect adv. */
90  ISO_ADV_DIRECT, /**< direct adv (Low duty). */
92 
93 /**@brief Address type. */
94 typedef enum
95 {
96  PUBLIC = 0, /**< public type. */
97  RANDOM, /**< random type. */
99 
100 /**@brief Data path type. */
101 typedef enum
102 {
103  DATA_PATH_DISABLE = 0xFF, /**< Data path for disabled. */
104  DATA_PATH_HCI = 0x00, /**< Data path for hci. */
105  DATA_PATH_GEN = 0xF2, /**< Data path for gen. */
106  DATA_PATH_GDX = 0xF6, /**< Data path for gdx. */
108 
109 /**@brief Data path direction type. */
110 typedef enum
111 {
112  HOST_TO_CONTROLLER = 0x00, /**< Host to controller. */
113  CONTROLLER_TO_HOST = 0x01, /**< Controller to host. */
114  DIRECTION_BOTH = 0x02, /**< Host to controller and controller to host, just use for remove data path. */
116 
117 /**@brief SCA type. */
118 typedef enum
119 {
120  SCA0 = 0x00, /**< 251 ppm to 500 ppm. */
121  SCA1 = 0x01, /**< 151 ppm to 250 ppm. */
122  SCA2 = 0x02, /**< 101 ppm to 150 ppm. */
123  SCA3 = 0x03, /**< 76 ppm to 100 ppm. */
124  SCA4 = 0x04, /**< 51 ppm to 75 ppm. */
125  SCA5 = 0x05, /**< 31 ppm to 50 ppm. */
126  SCA6 = 0x06, /**< 21 ppm to 30 ppm. */
127  SCA7 = 0x07, /**< 0 ppm to 20 ppm. */
129 
130 /**@brief Packing type. */
131 typedef enum
132 {
133  PACK_SEQ = 0x00, /**< Sequential. */
134  PACK_INT = 0x01 /**< Interleaved. */
136 
137 /**@brief Framing type. */
138 typedef enum
139 {
140  UNFRAMED = 0x00, /**< Unframed. */
141  FRAMED = 0x01 /**< Framed. */
143 
144 /**@brief Encryption type. */
145 typedef enum
146 {
147  UNENCRYPTED = 0x00, /**< Unencrypted. */
148  ENCRYPTED = 0x01 /**< Encrypted. */
150 
151 /**@brief Sync mode type. */
152 typedef enum
153 {
154  NO_EVT_NO_REPORT = 0x00, /**< No attempt is made to synchronize to the periodic advertising and no
155  HCI_LE_Periodic_Advertising_Sync_Transfer_Received event is sent to the Host */
156  WITH_EVT_NO_REPORT = 0x01, /**< An HCI_LE_Periodic_Advertising_Sync_Transfer_Received event is sent to the Host.
157  HCI_LE_Periodic_Advertising_Report events will be disabled. */
158  WITH_EVT_WITH_REPORT = 0x02, /**< An HCI_LE_Periodic_Advertising_Sync_Transfer_Received event is sent to the Host.
159  HCI_LE_Periodic_Advertising_Report events will be enabled. */
161 
162 /**@brief Cte type. */
163 typedef enum
164 {
165  NOT_SYNC_WITH_AOA = 0x01, /**< Do not sync to packets with an AoA Constant Tone Extension. */
166  NOT_SYNC_WITH_AOD_1US = 0x02, /**< Do not sync to packets with an AoD Constant Tone Extension with 1 us slots. */
167  NOT_SYNC_WITH_AOD_2US = 0x04, /**< Do not sync to packets with an AoD Constant Tone Extension with 2 us slots. */
168  NOT_SYNC_WITHOUT_CTE = 0x10, /**< Do not sync to packets without a Constant Tone Extension. */
170 
171 /**@brief Phy type. */
172 typedef enum
173 {
174  ISO_PHY_1M = 0x01 << 0, /**< The transmitter PHY of packets is LE 1M. */
175  ISO_PHY_2M = 0x01 << 1, /**< The transmitter PHY of packets is LE 2M. */
176  ISO_PHY_CODED = 0x01 << 2 /**< The transmitter PHY of packets is LE Coded. */
178 
179 /**@brief Terminate big/big sync reason. */
180 typedef enum
181 {
182  TERMINATE_BY_REMOTE = 0x13, /**< Remote user terminate. */
183  TERMINATE_BY_LOCAL = 0x16, /**< Local user terminate. */
185 
186 enum
187 {
195  ISO_GPIO_MASK_7 = 0x80
196 };
197 /** @} */
198 
199 /** @addtogroup BLE_ISO_STRUCTURES Structures
200  * @{ */
201 
202 /**
203 @brief The parameter for starting broadcast announcement.
204 */
205 typedef struct
206 {
207  uint8_t adv_idx; /**< Adv index, (Range: 0 to 4). */
208  uint8_t sid; /**< Adv set ID, (Range: 0x00 to 0xFF). */
209  uint16_t interval; /**< Adv interval, (Range: 0x0006 to 0xFFFF), Time = N * 1.25 ms,Time Range: 7.5ms to 81.91875 s. */
210  uint16_t data_len; /**< Broadcast audio announcement data length. */
211  uint8_t *data; /**< Broadcast audio announcement data. */
213 
214 /**
215 @brief The parameter for starting genneral announcement.
216 */
217 typedef struct
218 {
219  uint8_t adv_idx; /**< Adv index. */
220  uint32_t interval; /**< Adv interval, (Range: 0x000020 to 0xFFFFFF), Time = N * 0.625. */
221  uint16_t data_len; /**< General audio announcement data length. */
222  uint8_t *data; /**< General audio announcement data. */
224 
225 /**
226 @brief The parameter for starting target announcement.
227 */
228 typedef struct
229 {
230  uint8_t adv_idx; /**< Adv index. */
231  uint32_t interval; /**< Adv interval, (Range: 0x000020 to 0xFFFFFF), Time = N * 0.625. */
232  uint8_t adv_type; /**< Adv type, see iso_adv_type_t , the peer addr_type and addr
233  is invalid for undirect type, and should ignore them. */
234  uint8_t peer_add_type; /**< Peer address type, see iso_add_type_t */
235  uint8_t peer_addr[ISO_ADDR_LEN]; /**< Peer address. */
236  uint16_t data_len; /**< Target audio announcement data length. */
237  uint8_t *data; /**< Target audio announcement data. */
239 
240 /**
241 @brief The parameter for discovery announcement.
242 */
243 typedef struct
244 {
245  uint16_t interval; /**< Scan interval between 0x0004 and 0x4000 in 0.625 ms units(range: 2.5 ms to 10.24 s). */
246  uint16_t window; /**< Scan window between 0x0004 and 0x4000 in 0.625 ms units(range: 2.5 ms to 10.24 s). */
247  uint16_t timeout; /**< Scan timeout should be a value between 0x0001 and 0xFFFF(unit: 10 ms).
248  0x0000 indicates that the timeout have no effect. */
250 
251 /**
252 @brief The parameter for sync announcement.
253 */
254 typedef struct
255 {
256  uint8_t sid; /**< public type. */
257  uint8_t peer_addr_type; /**< Peer address type, see iso_add_type_t */
258  uint8_t peer_addr[ISO_ADDR_LEN]; /**< Peer address. */
259  uint16_t sync_timeout; /**< Synchronization timeout for the periodic advertising(in unit of 10ms between 100ms and 163.84s). */
261 
262 /**
263 @brief The parameter for creating big.
264 */
265 typedef struct
266 {
267  uint8_t big_hdl; /**< Used to identify the BIG (0x00 to 0xEF). */
268  uint8_t per_adv_idx; /**< Used to identify the periodic advertising set (0 to 4). */
269  uint8_t num_bis; /**< Total number of BISs in the BIG(0x01 to 0x1F). */
270  uint32_t sdu_interval; /**< Time duration between SDUs in microseconds(0x000100 to 0x0FFFFF). */
271  uint16_t max_sdu_size; /**< Maximum size of a SDU (0x001 to 0xFFF). */
272  uint16_t tran_latency; /**< Maximum time (in milliseconds) between transmission and reception of a BIS Data PDU (0x0000 to 0x0FA0). */
273  uint8_t rtn; /**< Number of times every BIS Data PDU should be retransmitted(0x00 to 0x0F). */
274  uint8_t phy; /**< Indicates the PHY used for transmission of PDUs of BISs in the BIG.see iso_phy_type_t */
275  uint8_t packing; /**< Sequential or Interleaved, see iso_packing_type_t. */
276  uint8_t framing; /**< Unframed or Framed, see iso_framing_type_t. */
277  uint8_t encryption; /**< Unencrypted or Encrypted, see iso_encryption_type_t. */
278  uint8_t encryption_code[ENC_CODE_LEN]; /**< The code used for encrypting or decrypting payloads of an encrypted BIS. */
280 
281 /**
282 @brief The parameter for creating big sync.
283 */
284 typedef struct
285 {
286  uint8_t big_hdl; /**< Used to identify the BIG (0x00 to 0xEF). */
287  uint16_t per_sync_idx; /**< Used to identify the periodic advertising set (0 to 4). */
288  uint8_t encryption; /**< Unencrypted or Encrypted, see iso_encryption_type_t. */
289  uint8_t enc_code [ENC_CODE_LEN]; /**< The code used for encrypting or decrypting payloads of an encrypted BIS. */
290  uint8_t mse; /**< Maximum number of subevents that are used to receive data payloads in each isochronous interval (0x01 to 0xFF). */
291  uint16_t big_sync_timeout; /**< Synchronization timeout for the BIS, Range: 0x000A to 0x4000. Time = N*10 ms, Time Range: 100 ms to 163.84 s */
292  uint8_t num_bis; /**< Total number of BISs to synchronize (0x01 to 0x1F). */
293  uint8_t *bis; /**< List of BISs in the BIG (0x01 to 0x1F). */
295 
296 /**
297 @brief The parameter for setting data path.
298 */
299 typedef struct
300 {
301  uint16_t conn_hdl; /**< Connection handle of a CIS or BIS. */
302  uint8_t direction; /**< Direction for data path, see iso_data_path_direction_t. */
303  uint8_t data_path_type; /**< Type for data path, see iso_data_path_type_t. */
304  uint8_t codec_id[5]; /**< Codec ID (octet 0:coding format; octet 1 to 2:company ID; octets 3 to 4:vendor-defined codec ID) */
305  uint32_t ctrl_delay; /**< Controller delay in microseconds (Range: 0x000000 to 0x3D0900). */
306  uint8_t codec_cfg_len; /**< Codec configuration length. */
307  uint8_t *codec_cfg; /**< Codec configuration. */
309 
310 /**
311 @brief The parameter for removing data path.
312 */
313 typedef struct
314 {
315  uint16_t conn_hdl; /**< Connection handle of a CIS or BIS. */
316  uint8_t direction; /**< Specifies the input data transport path, see iso_data_path_direction_t. */
318 
319 /**
320 @brief The parameter for setting cis.
321 */
322 typedef struct
323 {
324  uint8_t cis_id; /**< Used to identify a CIS (0x00 to 0xEF). */
325  uint16_t sdu_size_m2s; /**< Maximum size of a SDU in octets from the master Host (0x000 to 0xFFF). */
326  uint16_t sdu_size_s2m; /**< Maximum size of a SDU in octets from the slave Host (0x000 to 0xFFF). */
327  uint8_t phy_m2s; /**< Master to slave PHY, see iso_phy_type_t. */
328  uint8_t phy_s2m; /**< Slave to master PHY, see iso_phy_type_t. */
329  uint8_t rtn_m2s; /**< Number of times every CIS Data PDU should be retransmitted from the master to slave (0x00 to 0x0F). */
330  uint8_t rtn_s2m; /**< Number of times every CIS Data PDU should be retransmitted from the slave to master (0x00 to 0x0F). */
332 
333 /**
334 @brief The parameter for setting cig.
335 */
336 typedef struct
337 {
338  uint8_t cig_id; /**< Used to identify a CIG (0x00 to 0xEF). */
339  uint32_t sdu_int_m2s; /**< The interval, in microseconds, of periodic SDUs.(0x0000FF to 0xFFFFF). */
340  uint32_t sdu_int_s2m; /**< The interval, in microseconds, of periodic SDUs. (0x0000FF to 0xFFFFF). */
341  uint8_t sca; /**< The worst-case sleep clock accuracy of all the slaves, see iso_sca_type_t. */
342  uint8_t packing; /**< Sequential or Interleaved, see iso_packing_type_t. */
343  uint8_t framing; /**< Unframed or Framed, see iso_framing_type_t. */
344  uint16_t trans_latency_m2s; /**< Maximum time, in milliseconds, for an SDU to be transported from the master Controller to slave Controller(0x0005 to 0x0FA0). */
345  uint16_t trans_latency_s2m; /**< Maximum time, in milliseconds, for an SDU to be transported from the slave Controller to master Controller(0x0005 to 0x0FA0). */
346  uint8_t cis_cnt; /**< Total number of CISs (0x00 to 0x1F). */
347  iso_cis_param_t *cis_param; /**< CIS parameter, see iso_cis_param_t. */
349 
350 /**
351 @brief The parameter for creating per cis.
352 */
353 typedef struct
354 {
355  uint16_t cis_hdl; /**< List of connection handles of CISes (Range 0x0000-0x0EFF). */
356  uint16_t conn_idx; /**< Connection index of ACL Link. */
358 
359 /**
360 @brief The parameter for creating multi cis.
361 */
362 typedef struct
363 {
364  uint8_t num_cis; /**< Total number of CISs to be established (0x01 to 0x1F). */
365  iso_create_cis_param_t *params; /**< Create cis param, see iso_create_cis_param_t. */
367 
368 /**
369 @brief The parameter for setting adv sync transport parameter.
370 */
371 typedef struct
372 {
373  uint16_t conn_hdl; /**< Connection handle of the ACL, (Range: 0x0000 to 0x0EFF). */
374  uint8_t mode; /**< the action to be taken when periodic advertising synchronization information is received, see iso_sync_mode_t. */
375  uint16_t skip; /**< The number of periodic advertising packets that can be skipped after a successful receive, (Range: 0x0000 to 0x01F3). */
376  uint16_t sync_timeout; /**< Synchronization timeout for the periodic advertising,(Range: 0x000A to 0x4000). Time = N*10 ms, Time Range: 100 ms to 163.84 s */
377  uint8_t cte_type; /**< specifies whether to only synchronize to periodic advertising with certain types of Constant Tone Extension, see iso_cte_type_t. */
379 
380 /**
381 @brief The parameter for setting default periodic advertising synchronization transport.
382 */
383 typedef struct
384 {
385  uint8_t mode; /**< the action to be taken when periodic advertising synchronization information is received, see iso_sync_mode_t. */
386  uint16_t skip; /**< The number of periodic advertising packets that can be skipped after a successful receive, (Range: 0x0000 to 0x01F3). */
387  uint16_t sync_timeout; /**< Synchronization timeout for the periodic advertising,(Range: 0x000A to 0x4000). Time = N*10 ms, Time Range: 100 ms to 163.84 s */
388  uint8_t cte_type; /**< specifies whether to only synchronize to periodic advertising with certain types of Constant Tone Extension, see iso_cte_type_t. */
390 
391 /**
392 @brief The parameter for setting periodic advertising set information.
393 */
394 typedef struct
395 {
396  uint16_t adv_hdl; /**< Used to identify an advertising set,(Range: 0x00-0xEF). */
397  uint16_t service_data; /**< The Service_Data parameter is a value provided by the Host to identify
398  the periodic advertisement to the peer device. It is not used by the Controller.*/
399  uint16_t conn_hdl; /**< Connection_Handle, (Range: 0x0000 to 0x0EFF)*/
401 
402 /**
403 @brief The parameter for periodic advertising synchronization transport.
404 */
405 typedef struct
406 {
407  uint16_t sync_hdl; /**< identifying the periodic advertising, (Range: 0x0000 to 0x0EFF). */
408  uint16_t service_data; /**< The Service_Data parameter is a value provided by the Host to identify
409  the periodic advertisement to the peer device. It is not used by the Controller.*/
410  uint16_t conn_hdl; /**< Connection_Handle, (Range: 0x0000 to 0x0EFF)*/
412 
413 /**
414 @brief The parameter for setting periodic advertising reciving enable.
415 */
416 typedef struct
417 {
418  uint16_t sync_hdl; /**< identifying the periodic advertising, (Range: 0x0000 to 0x0EFF). */
419  uint8_t enable; /**< 0x00: Reporting disabled, 0x01: Reporting enabled. */
421 
422 /**
423 @brief The parameter for set iso data path trigger.
424 */
425 typedef struct
426 {
427  uint16_t conn_hdl; /**< Connection handle of CIS/BIS. */
428  uint8_t direction; /**< Specifies the data transport path, see iso_data_path_direction_t. */
429  uint8_t enable_flag; /**< 0x00: disable, 0x01: enable. */
430  int32_t trigger_offset; /**< Trigger offset in microseconds. */
432 
433 /**
434 @brief The parameter for cis establish event.
435 */
436 typedef struct
437 {
438  uint8_t status; /**< 0x00: The CIS has been established, 0x01 to 0xFF: The CIS failed to be established. */
439  uint16_t cis_hdl; /**< Connection handle of CIS (Range 0x0000-0x0EFF). */
440  uint32_t cig_sync_delay; /**< The CIG synchronization delay time in microseconds(Range 0x0000EA to 0x7FFFFF). */
441  uint32_t cis_sync_delay; /**< The CIS synchronization delay time in microseconds(Range 0x0000EA to 0x7FFFFF). */
442  uint32_t tran_latency_m2s; /**< The maximum time, in microseconds, for transmission of SDUs of all CISes from master to slave(Range 0x0000EA to 0x7FFFFF). */
443  uint32_t tran_latency_s2m; /**< The maximum time, in microseconds, for transmission of SDUs of all CISes from slave to master(Range 0x0000EA to 0x7FFFFF). */
444  uint8_t phy_m2s; /**< indicates the PHY selected for packets from the master to slave. see iso_phy_type_t*/
445  uint8_t phy_s2m; /**< indicates the PHY selected for packets from the slave to master. see iso_phy_type_t */
446  uint8_t nse; /**< Maximum number of subevents in each isochronous event (Range 0x01 to 0x1E). */
447  uint8_t bn_m2s; /**< The burst number for master to slave transmission (Range 0x00 to 0x0F). 0x00: no isochronous data from the master to the slave. */
448  uint8_t bn_s2m; /**< The burst number for slave to master transmission (Range 0x00 to 0x0F). 0x00: no isochronous data from the slave to the master. */
449  uint8_t ft_m2s; /**< The flush timeout, in multiples of the ISO_Interval for the CIS, for each payload sent from the master to the slave (Range: 0x01 to 0xFF). */
450  uint8_t ft_s2m; /**< The flush timeout, in multiples of the ISO_Interval for the CIS, for each payload sent from the slave to the master (Range: 0x01 to 0xFF). */
451  uint16_t max_pdu_m2s; /**< Maximum size, in octets, of the payload from master to slave (Range: 0x0000 to 0x00FB). */
452  uint16_t max_pdu_s2m; /**< Maximum size, in octets, of the payload from slave to master (Range: 0x0000 to 0x00FB). */
453  uint16_t iso_interval; /**< The time between two consecutive CIS anchor points (unit:1.25ms, Range:0x0004 to 0x0C80, Time Range:5ms to 4s). */
455 
456 /**
457 @brief The parameter for cis request event.
458 */
459 typedef struct
460 {
461  uint16_t conn_idx; /**< Connection index of the ACL. */
462  uint16_t cis_hdl; /**< Connection handle of CIS (Range 0x0000-0x0EFF). */
463  uint8_t cig_id; /**< Identifier of the CIG (Range 0x00-0xEF). */
464  uint8_t cis_id; /**< Identifier of the CIS (Range 0x00-0xEF). */
466 
467 /**
468 @brief The parameter for cis disconnect event.
469 */
470 typedef struct
471 {
472  uint16_t cis_hdl; /**< Connection handle of CIS (Range 0x0000-0x0EFF). */
473  uint8_t reason; /**< Reason for disconnect CIS. */
475 
476 /**
477 @brief The parameter for creating big complete event.
478 */
479 typedef struct
480 {
481  uint8_t status; /**< 0x00: Establishment of the BIG has been completed. 0x01 to 0xFF: Establishment of the BIG failed to be completed */
482  uint8_t big_hdl; /**< Used as the identifier of the BIG, (Range: 0x00 to 0xEF) */
483  uint32_t big_sync_delay; /**< Transmission delay time in microseconds of all BISs in the BIG,(Range: 0x0000EA to 0x7FFFFF). */
484  uint32_t big_trans_latency; /**< The maximum delay time, in microseconds, for transmission of SDUs of all BISes,(Range: 0x0000EA to 0x7FFFFF). */
485  uint8_t phy; /**< PHY used, bit 0: 1Mbps, bit 1: 2Mbps, bit 2: LE-Coded. */
486  uint8_t nse; /**< The number of subevents in each BIS event in the BIG, range 0x01-0x1E. */
487  uint8_t bn; /**< TThe number of new payloads in each BIS event, range 0x01-0x07. */
488  uint8_t pto; /**< Offset used for pre-transmissions, range 0x00-0x0F. */
489  uint8_t irc; /**< The number of times a payload is transmitted in a BIS event, range 0x01-0x0F. */
490  uint16_t max_pdu; /**< Maximum size of the payload in octets, range 0x00-0xFB. */
491  uint16_t iso_interval; /**< ISO interval (1.25ms unit, range: 5ms to 4s). */
492  uint8_t num_bis; /**< Total number of BISs in the BIG,(Range: 0x01 to 0x1F). */
493  uint16_t *bis_hdl; /**< The connection handles of the BISs, (Range: 0x0000 to 0x0EFF). */
495 
496 /**
497 @brief The parameter for terminating big complete event.
498 */
499 typedef struct
500 {
501  uint8_t reason; /**< indicate the reason why the BIG was terminated. */
502  uint8_t big_hdl; /**< Used as the identifier of the BIG (Range 0x00 to 0xEF). */
504 
505 /**
506 @brief The parameter for creating big sync complete event.
507 */
508 typedef struct
509 {
510  uint8_t status; /**< 0x00: Synchronization to BIG has been completed.0x01 to 0xFF: Synchronization to BIG failed to be completed. */
511  uint8_t big_hdl; /**< Used as the identifier of the BIG (Range 0x00 to 0xEF). */
512  uint32_t big_trans_latency; /**< The maximum delay time, in microseconds, for transmission of SDUs of all BISes(Range 0x0000EA to 0x7FFFFF). */
513  uint8_t nse; /**< The number of subevents in each BIS event in the BIG, range 0x01-0x1E. */
514  uint8_t bn; /**< The number of new payloads in each BIS event, range 0x01-0x07. */
515  uint8_t pto; /**< Offset used for pre-transmissions, range 0x00-0x0F. */
516  uint8_t irc; /**< The number of times a payload is transmitted in a BIS event, range 0x01-0x0F. */
517  uint16_t max_pdu; /**< Maximum size of the payload in octets, range 0x00-0xFB. */
518  uint16_t iso_interval; /**< ISO interval (1.25ms unit, range: 5ms to 4s). */
519  uint8_t num_bis; /**< Total number of BISs in the BIG.(Range 0x01 to 0x1F). */
520  uint16_t *bis_hdl; /**< The connection handles of the BISs, (Range: 0x0000 to 0x0EFF). */
522 
523 /**
524 @brief The parameter for big lost event.
525 */
526 typedef struct
527 {
528  uint16_t big_hdl; /**< Used as the identifier the big, (Range: 0x0000 to 0x0EFF). */
529  uint8_t reason; /**< indicate the reason why the synchronization was terminated. */
531 
532 /**
533 @brief The parameter for big info report event.
534 */
535 typedef struct
536 {
537  uint8_t per_sync_idx; /**< Per sync index, (Range: 0x00 to 0x05). */
538  uint8_t num_bis; /**< Number of BIS (Range 0x01-0x1F). */
539  uint8_t nse; /**< Value of the NSE (Range 0x01-0x1F). */
540  uint16_t iso_interval; /**< Value of the ISO interval. */
541  uint8_t bn; /**< Value of the BN (Range 0x00-0x07). */
542  uint8_t pto; /**< Value of the PTO (Range 0x00-0x0F). */
543  uint8_t irc; /**< Value of the IRC (Range 0x01-0x0F). */
544  uint16_t max_pdu; /**< Value of the Max_PDU (Range 0x0000-0x00FB). */
545  uint32_t sdu_interval; /**< Value of the SDU_Interval (Range Range 0x0000FF-0x0FFFFF). */
546  uint16_t max_sdu; /**< Value of the Max_SDU (Range 0x0000-0x0FFF). */
547  uint8_t phy; /**< Value of the PHY (0x01: 1M, 0x02: 2M, 0x03: Coded, All other values: RFU). */
548  uint8_t framing; /**< Value of the Framing (0x00: Unframed, 0x01: Framed, All other values: RFU). */
549  uint8_t encryption; /**< Value of the Encryption (0x00: Unencrypted, 0x01: Encrypted, All other values: RFU)). */
551 
552 /**
553 @brief The parameter for request peer sca complete event.
554 */
555 typedef struct
556 {
557  uint8_t status; /**< 0x00: The SCA parameter received successfully.0x01-0xFF: The reception of SCA parameter failed */
558  uint16_t acl_hdl; /**< Connection handle of the ACL, (Range: 0x0000 to 0x0EFF). */
559  uint8_t sca; /**< See iso_sca_type_t. */
561 
562 /**
563 @brief The parameter for receiving periodic advertising Synchronization transport event.
564 */
565 typedef struct
566 {
567  uint8_t status; /**< 0x00: Synchronization to the periodic advertising succeeded, 0x01 to 0xFF: Synchronization to the periodic advertising failed */
568  uint16_t conn_hdl; /**< Connection_Handle, (Range: 0x0000 to 0x0EFF). */
569  uint16_t service_data; /**< A value provided by the peer device. */
570  uint8_t adv_sid; /**< Value of the Advertising SID used to advertise the periodic advertising. */
571  uint16_t sync_hdl; /**< Sync_Handle identifying the periodic advertising, (Range: 0x0000 to 0x0EFF). */
573 
574 /**
575 @brief The parameter for read iso tx sync complete event.
576 */
577 typedef struct
578 {
579  uint8_t status; /**< 0x00: succeeded. 0x01-0xFF: failed */
580  uint16_t con_hdl; /**< Connection handle of the bis or cis, (Range: 0x0000 to 0x0EFF). */
581  uint16_t pkt_seq_num; /**< The packet sequence number of the ISO_SDU. */
582  uint32_t time_stap; /**< The timestamp of an SDU identified by the seq_num, (Range: 0x00000000 to 0xFFFFFFFF) */
583  uint32_t time_offset; /**< The time offset associated with the ISO_SDU identified by the seq_num, (Range: 0x000000 to 0xFFFFFF)*/
585 
586 /**
587 @brief The parameter for set cig parameter complete event.
588 */
589 typedef struct
590 {
591  uint8_t status; /**< 0x00: succeeded. 0x01-0xFF: failed */
592  uint8_t cig_id; /**< Used to identify a CIG, (Range: 0x00 to 0xEF). */
593  uint8_t cis_count; /**< Total number of CISs, (Range: 0x00 to 0x10). */
594  uint16_t *cis_hdl; /**< List of connection handles of CISs in the CIG, (Range: 0x0000 to 0x0EFF). */
596 
597 /**
598 @brief The structure for iso hci data.
599 */
600 typedef struct
601 {
602  uint16_t conn_hdl; /**< Used to identify a cis or bis. */
603  uint32_t time_stamp; /**< The Bluetooth_TimeStamp (BTS). */
604  uint16_t seq_num; /**< Packet sequence number. */
605  uint16_t sdu_len; /**< Sdu length. */
606  uint8_t *sdu; /**< Sdu data buffer. */
608 
609 /**
610 @brief The parameter for set cig parameter complete event.
611 */
612 
613 /**
614 @brief The callback for iso.
615 */
616 typedef struct
617 {
618  void (*iso_sdu_rcv_cb)(iso_hci_data_t *data_info); /**< The callback for receving iso sdu. */
619 
620  void (*iso_sdu_send_cb)(iso_hci_data_t *data_info); /**< The callback for sending iso sdu. */
621 
622  void (*iso_cis_est_evt_cb)(iso_cis_est_evt_t *evt); /**< The callback for receving cis established event. */
623 
624  void (*iso_cis_req_evt_cb)(iso_cis_req_evt_t *evt); /**< The callback for receving a request to establish a CIS from the master. */
625 
626  void (*iso_cis_disc_ind_cb)(iso_cis_disc_evt_t *evt); /**< The callback for cis disconnect. */
627 
628  void (*iso_create_big_cmpl_evt_cb)(iso_create_big_cmpl_evt_t *evt); /**< The callback for receving create big complete event. */
629 
630  void (*iso_termi_big_cmpl_evt_cb)(iso_termi_big_cmpl_evt_t *evt); /**< The callback for receving terminate big complete event. */
631 
632  void (*iso_big_create_sync_est_evt_cb)(iso_big_create_sync_est_evt_t *evt); /**< The callback for receving big create sync established event. */
633 
634  void (*iso_big_sync_lost_evt_cb)(iso_big_sync_lost_evt_t *evt); /**< The callback for receving big lost event. */
635 
636  void (*iso_big_info_report_evt_cb)(iso_big_info_report_evt_t *evt); /**< The callback for receving big info report event. */
637 
638  void (*iso_req_peer_sca_cmpl_evt_cb)(iso_req_peer_sca_cmpl_evt_t *evt); /**< The callback for receving request peer sca complete event. */
639 
640  void (*iso_read_iso_tx_sync_cmpl_evt_cb)(iso_read_iso_tx_sync_cmpl_evt_t *evt); /**< The callback for read iso tx sync complete event. */
641 
642  void (*iso_set_cig_param_cmpl_evt_cb)(iso_set_cig_param_cmpl_evt_t *evt); /**< The callback for set cig parameter complete event. */
643 
644  void (*iso_rm_cig_cmpl_evt_cb)(uint8_t status, uint8_t cig_id); /**< The callback for remove cig complete event. */
645 
646  void (*iso_reject_cis_req_cmpl_evt_cb)(uint8_t status, uint16_t cis_hdl); /**< The callback for reject cis request complete event. */
647 
648  void (*iso_set_data_path_cmpl_evt_cb)(uint8_t status, uint16_t con_hdl); /**< The callback for set data path complete event. */
649 
650  void (*iso_rm_data_path_cmpl_evt_cb)(uint8_t status, uint16_t con_hdl); /**< The callback for remove data path complete event. */
651 
652  void (*iso_temi_big_sync_cmpl_evt_cb)(uint8_t status); /**< The callback for teminate big sync complete event. */
653 
654  void (*iso_set_data_path_trigger_cmpl_evt_cb)(uint8_t status); /**< The callback for teminate big sync complete event. */
655 
656  void (*iso_cmd_status_evt_cb)(uint16_t op_code, uint8_t status); /**< The callback for cmd status. */
657 } iso_cb_fun_t;
658 
659 /**
660 @brief The callback for gap event which need to be handled by ascp.
661 */
662 typedef struct
663 {
664  void (*gap_adv_report_ind_cb)(const ble_gap_ext_adv_report_ind_t *p_adv_report); /**< The callback for receving adv report event. */
665 
666  void (*gap_sync_established_cb)(uint8_t inst_idx, uint8_t status, const ble_gap_sync_established_ind_t *p_sync_est_evt); /**< The callback for receving sync periodic adv success event. */
667 
669 
670 /** @} */
671 
672 
673 /** @addtogroup BLE_ISO_FUNCTIONS Functions
674  * @{ */
675 
676 /**
677  ****************************************************************************************
678  * @brief Register callback for iso.
679  * @param[in] cb: Pointer to the callback function structure.
680  *
681  * @retval SDK_SUCCESS: The callback is successfully to register.
682  * @retval BLE_SDK_ERR_BAD_PARAM: The parameter is invalid, such as the cb is NULL.
683  ****************************************************************************************
684  */
686 
687 /**
688  ****************************************************************************************
689  * @brief Register the gap evetn callback for ascp.
690  * @param[in] cb: Pointer to the callback function structure.
691  ****************************************************************************************
692  */
694 
695 /**
696  ****************************************************************************************
697  * @brief Start broadcast audio announcement by using periodic adv.
698  * @param[in] param: Pointer to the start broadcast announcement structure.
699  * @param[in] ext_adv_data: Pointer to the ext adv data.
700  * @param[in] ext_adv_data_len: The length of ext adv data.
701  *
702  * @retval SDK_SUCCESS The parameter is valid.
703  * @retval BLE_SDK_ERR_BAD_PARAM The parameter is invalid.
704  ****************************************************************************************
705  */
706 uint16_t ble_iso_start_bd_ann(iso_start_bd_ann_t *param, uint8_t *ext_adv_data, uint16_t ext_adv_data_len);
707 
708 /**
709  ****************************************************************************************
710  * @brief Start general audio announcement by using extended adv.
711  * @param[in] param: Pointer to the start general announcement structure.
712  *
713  * @retval SDK_SUCCESS The parameter is valid.
714  * @retval BLE_SDK_ERR_BAD_PARAM The parameter is invalid.
715  ****************************************************************************************
716  */
718 
719 /**
720  ****************************************************************************************
721  * @brief Start target audio announcement by using extended adv.
722  * @param[in] param: Pointer to the start target announcement structure.
723  *
724  * @retval SDK_SUCCESS The parameter is valid.
725  * @retval BLE_SDK_ERR_BAD_PARAM The parameter is invalid.
726  ****************************************************************************************
727  */
729 
730 /**
731  ****************************************************************************************
732  * @brief Stop the audio announcement by using stop adv.
733  * @param[in] adv_idx: Advertising Index.
734  *
735  * @retval SDK_SUCCESS The parameter is valid.
736  * @retval BLE_SDK_ERR_BAD_PARAM The parameter is invalid.
737  ****************************************************************************************
738  */
739 uint16_t ble_iso_stop_ann(uint8_t adv_idx);
740 
741 /**
742  ****************************************************************************************
743  * @brief Discovery the audio announcement by using extended scan.
744  * @param[in] param: Pointer to the Discovery announcement structure.
745  *
746  * @retval SDK_SUCCESS The parameter is valid.
747  * @retval SDK_ERR_POINTER_NULL: Invalid pointer supplied.
748  * @retval SDK_ERR_NO_RESOURCES: Not enough resources.
749  ****************************************************************************************
750  */
752 
753 /**
754  ****************************************************************************************
755  * @brief Stop discovery the audio announcement by stop extended scan.
756  *
757  * @retval SDK_SUCCESS.
758  * @retval SDK_ERR_DISALLOWED: Operation is disallowed.
759  ****************************************************************************************
760  */
762 
763 /**
764  ****************************************************************************************
765  * @brief Sync the broadcast audio announcement by sync the period adv.
766  * @param[in] index: Periodic synchronization index.
767  * @param[in] param: Pointer to the sync audio announcement structure.
768  *
769  * @retval SDK_SUCCESS The parameter is valid.
770  * @retval BLE_SDK_ERR_BAD_PARAM The parameter is invalid.
771  * @retval SDK_ERR_INVALID_PER_SYNC_IDX: Invalid periodic syncronization index supplied.
772  * @retval SDK_ERR_NO_RESOURCES: Not enough resources.
773  * @retval SDK_ERR_DISALLOWED: Operation is disallowed.
774  ****************************************************************************************
775  */
776 uint16_t ble_iso_sync_bd_ann(uint8_t index, iso_sync_ann_t *param);
777 
778 /**
779  ****************************************************************************************
780  * @brief Stop sync the broadcast audio announcement.
781  * @param[in] index: Periodic synchronization index.
782  *
783  * @retval SDK_SUCCESS: Operation is successful.
784  * @retval SDK_ERR_INVALID_PER_SYNC_IDX: Invalid periodic syncronization index supplied.
785  * @retval SDK_ERR_DISALLOWED: Operation is disallowed.
786  ****************************************************************************************
787  */
788 uint16_t ble_iso_stop_sync_bd_ann(uint8_t index);
789 
790 /**
791  ****************************************************************************************
792  * @brief Create the BIG.
793  * @param[in] param: Pointer to the create big structure.
794  *
795  * @retval SDK_SUCCESS The parameter is valid.
796  * @retval BLE_SDK_ERR_BAD_PARAM The parameter is invalid.
797  ****************************************************************************************
798  */
800 
801 /**
802  ****************************************************************************************
803  * @brief Terminate the BIG.
804  * @param[in] big_hdl: Used to identify the BIG (0x00 to 0xEF).
805  * @param[in] reason: The reason for teminate the big.
806  *
807  * @retval SDK_SUCCESS The parameter is valid.
808  * @retval BLE_SDK_ERR_BAD_PARAM The parameter is invalid.
809  ****************************************************************************************
810  */
811 uint16_t ble_iso_terminate_big(uint8_t big_hdl, uint8_t reason);
812 
813 /**
814  ****************************************************************************************
815  * @brief Create the BIG sync.
816  * @param[in] param: Pointer to the create big sync structure.
817  *
818  * @retval SDK_SUCCESS The parameter is valid.
819  * @retval BLE_SDK_ERR_BAD_PARAM The parameter is invalid.
820  ****************************************************************************************
821  */
823 
824 /**
825  ****************************************************************************************
826  * @brief Terminate the BIG sync.
827  * @param[in] big_hdl: Used to identify the BIG (0x00 to 0xEF).
828  *
829  * @retval SDK_SUCCESS The parameter is valid.
830  * @retval BLE_SDK_ERR_BAD_PARAM The parameter is invalid.
831  ****************************************************************************************
832  */
833 uint16_t ble_iso_terminate_big_sync(uint8_t big_hdl);
834 
835 /**
836  ****************************************************************************************
837  * @brief Set CIG paramter.
838  * @param[in] param: Pointer to the cig parameter structure.
839  *
840  * @retval SDK_SUCCESS The parameter is valid.
841  * @retval BLE_SDK_ERR_BAD_PARAM The parameter is invalid.
842  ****************************************************************************************
843  */
845 
846 /**
847  ****************************************************************************************
848  * @brief Create CIS.
849  * @param[in] param: Pointer to the create cis parameter structure.
850  *
851  * @retval SDK_SUCCESS The parameter is valid.
852  * @retval BLE_SDK_ERR_BAD_PARAM The parameter is invalid.
853  ****************************************************************************************
854  */
856 
857 /**
858  ****************************************************************************************
859  * @brief Remove the cig indicated by the cig_id.
860  * @param[in] cig_id: Used to identify a CIG (Range: 0x00 to 0xEF).
861  *
862  * @retval SDK_SUCCESS The parameter is valid.
863  * @retval BLE_SDK_ERR_BAD_PARAM The parameter is invalid.
864  ****************************************************************************************
865  */
866 uint16_t ble_iso_rm_cig(uint8_t cig_id);
867 
868 /**
869  ****************************************************************************************
870  * @brief Slave Host to inform the Controller to accept the request for the CIS that is
871  * identified by the cis_hdl.
872  * @param[in] cis_hdl: Connection handle of the CIS. (Range: 0x0000 to 0x0EFF).
873  *
874  * @retval SDK_SUCCESS The parameter is valid.
875  * @retval BLE_SDK_ERR_BAD_PARAM The parameter is invalid.
876  ****************************************************************************************
877  */
878 uint16_t ble_iso_accept_cis_req(uint16_t cis_hdl);
879 
880 /**
881  ****************************************************************************************
882  * @brief slave Host to reject the request for the CIS that is identified by the cis_hdl.
883  * @param[in] cis_hdl: Connection handle of the CIS. (Range: 0x0000 to 0x0EFF).
884  * @param[in] reason: Reason the CIS request was rejected.
885  * @retval SDK_SUCCESS The parameter is valid.
886  * @retval BLE_SDK_ERR_BAD_PARAM The parameter is invalid.
887  ****************************************************************************************
888  */
889 uint16_t ble_iso_reject_cis_req(uint16_t cis_hdl, uint8_t reason);
890 
891 /**
892  ****************************************************************************************
893  * @brief disconnect the CIS that is identified by the cis_hdl.
894  * @param[in] cis_hdl: Connection handle of the CIS. (Range: 0x0000 to 0x0EFF).
895  *
896  * @retval SDK_SUCCESS The parameter is valid.
897  * @retval BLE_SDK_ERR_BAD_PARAM The parameter is invalid.
898  ****************************************************************************************
899  */
900 uint16_t ble_iso_disc_cis(uint16_t cis_hdl);
901 
902 /**
903  ****************************************************************************************
904  * @brief Set the ISO data path.
905  * @param[in] param: Pointer to set data path parameter structure.
906  * @retval SDK_SUCCESS The parameter is valid.
907  * @retval BLE_SDK_ERR_BAD_PARAM The parameter is invalid.
908  ****************************************************************************************
909  */
911 
912 /**
913  ****************************************************************************************
914  * @brief Remove the ISO data path.
915  * @param[in] param: Pointer to remove data path parameter structure.
916  * @retval SDK_SUCCESS The parameter is valid.
917  * @retval BLE_SDK_ERR_BAD_PARAM The parameter is invalid.
918  ****************************************************************************************
919  */
921 
922 /**
923  ****************************************************************************************
924  * @brief Read the Sleep Clock Accuracy of the peer device.
925  * @param[in] conn_idx: Connection of the acl connection.
926  * @retval SDK_SUCCESS The parameter is valid.
927  * @retval BLE_SDK_ERR_BAD_PARAM The parameter is invalid.
928  ****************************************************************************************
929  */
930 uint16_t ble_iso_req_peer_sca(uint16_t conn_idx);
931 
932 /**
933  ****************************************************************************************
934  * @brief read the Bluetooth_TimeStamp (BTS) of a packet identified by the Packet_Sequence_Number
935  * on a CIS or BIS identified by the Connection_Handle.
936  * @param[in] conn_hdl: Connection handle of a CIS or BIS, (Range: 0x0000 to 0x0EFF).
937  * @retval SDK_SUCCESS The parameter is valid.
938  * @retval BLE_SDK_ERR_BAD_PARAM The parameter is invalid.
939  ****************************************************************************************
940  */
941 uint16_t ble_iso_read_tx_sync(uint16_t conn_hdl);
942 
943 /**
944  ****************************************************************************************
945  * @brief Set iso data path trigger
946  * @param[in] param: Pointer to the set data path trigger parameter structure.
947  * @retval SDK_SUCCESS The parameter is valid.
948  * @retval BLE_SDK_ERR_BAD_PARAM The parameter is invalid.
949  ****************************************************************************************
950  */
952 
953 /**
954  ****************************************************************************************
955  * @brief Un-mask the ISO GPIO
956  * @param[in] gpio_sel: Bits to un-mask iso_gpio.see enum iso_gpio_mask_t.
957  * @retval SDK_SUCCESS The parameter is valid.
958  * @retval BLE_SDK_ERR_BAD_PARAM The parameter is invalid.
959  ****************************************************************************************
960  */
961 uint16_t ble_iso_gpio_enable(uint8_t gpio_sel);
962 
963 /**
964  ****************************************************************************************
965  * @brief Set iso sync pulse GPIO trigger
966  * @param[in] iso_sync_p_sel: select iso sync0 pulse(ISO_SYNC0_PULSE) or/and iso sync1 pulse(ISO_SYNC1_PULSE).
967  * @param[in] sync0_gpio_sel: Bits to select which iso_gpio signals cause an iso sync0 pulse. GPIO_0 is default for iso sync pulse gpio.see enum iso_gpio_mask_t.
968  * @param[in] sync1_gpio_sel: Bits to select which iso_gpio signals cause an iso sync1 pulse. GPIO_0 is default for iso sync pulse gpio.see enum iso_gpio_mask_t.
969  * @retval SDK_SUCCESS The parameter is valid.
970  * @retval BLE_SDK_ERR_BAD_PARAM The parameter is invalid.
971  ****************************************************************************************
972  */
973 uint16_t ble_iso_set_iso_sync_pulse(uint8_t iso_sync_p_sel, uint8_t sync0_gpio_sel, uint8_t sync1_gpio_sel);
974 
975 /** @} */
976 
977 #endif
978 
979 /**
980  @}
981 */
982 /** @} */
983 
iso_big_info_report_evt_t::nse
uint8_t nse
Value of the NSE (Range 0x01-0x1F).
Definition: ble_iso.h:539
iso_big_create_sync_est_evt_t::irc
uint8_t irc
The number of times a payload is transmitted in a BIS event, range 0x01-0x0F.
Definition: ble_iso.h:516
iso_hci_data_t::time_stamp
uint32_t time_stamp
The Bluetooth_TimeStamp (BTS).
Definition: ble_iso.h:603
iso_hci_data_t::seq_num
uint16_t seq_num
Packet sequence number.
Definition: ble_iso.h:604
iso_req_peer_sca_cmpl_evt_t::sca
uint8_t sca
See iso_sca_type_t.
Definition: ble_iso.h:559
iso_big_info_report_evt_t::bn
uint8_t bn
Value of the BN (Range 0x00-0x07).
Definition: ble_iso.h:541
iso_per_adv_sync_tran_rcv_evt_t::adv_sid
uint8_t adv_sid
Value of the Advertising SID used to advertise the periodic advertising.
Definition: ble_iso.h:570
SCA6
@ SCA6
21 ppm to 30 ppm.
Definition: ble_iso.h:126
iso_create_cis_param_t::cis_hdl
uint16_t cis_hdl
List of connection handles of CISes (Range 0x0000-0x0EFF).
Definition: ble_iso.h:355
ISO_GPIO_MASK_7
@ ISO_GPIO_MASK_7
Definition: ble_iso.h:195
iso_start_gen_ann_t::data_len
uint16_t data_len
General audio announcement data length.
Definition: ble_iso.h:221
ISO_ADV_UNDIRECT
@ ISO_ADV_UNDIRECT
undirect adv.
Definition: ble_iso.h:89
ISO_REMOVE_DATA_PATH
@ ISO_REMOVE_DATA_PATH
Definition: ble_iso.h:79
iso_create_big_cmpl_evt_t::big_sync_delay
uint32_t big_sync_delay
Transmission delay time in microseconds of all BISs in the BIG,(Range: 0x0000EA to 0x7FFFFF).
Definition: ble_iso.h:483
iso_set_cig_param_t::sdu_int_m2s
uint32_t sdu_int_m2s
The interval, in microseconds, of periodic SDUs.
Definition: ble_iso.h:339
ISO_SET_DEFAULT_PER_ADV_SYNC_TRAN_PARAM
@ ISO_SET_DEFAULT_PER_ADV_SYNC_TRAN_PARAM
Definition: ble_iso.h:83
ble_gap_sync_established_ind_t
Sync established indication.
Definition: ble_gapc.h:711
iso_cis_est_evt_t::phy_m2s
uint8_t phy_m2s
indicates the PHY selected for packets from the master to slave.
Definition: ble_iso.h:444
iso_set_data_path_t::data_path_type
uint8_t data_path_type
Type for data path, see iso_data_path_type_t.
Definition: ble_iso.h:303
iso_cis_param_t::cis_id
uint8_t cis_id
Used to identify a CIS (0x00 to 0xEF).
Definition: ble_iso.h:324
ble_iso_discover_ann
uint16_t ble_iso_discover_ann(iso_disc_ann_t *param)
Discovery the audio announcement by using extended scan.
iso_big_info_report_evt_t::phy
uint8_t phy
Value of the PHY (0x01: 1M, 0x02: 2M, 0x03: Coded, All other values: RFU).
Definition: ble_iso.h:547
SCA3
@ SCA3
76 ppm to 100 ppm.
Definition: ble_iso.h:123
ble_iso_set_iso_sync_pulse
uint16_t ble_iso_set_iso_sync_pulse(uint8_t iso_sync_p_sel, uint8_t sync0_gpio_sel, uint8_t sync1_gpio_sel)
Set iso sync pulse GPIO trigger.
SCA1
@ SCA1
151 ppm to 250 ppm.
Definition: ble_iso.h:121
ble_iso_register_ascp_gap_callback
void ble_iso_register_ascp_gap_callback(ascp_gap_cb_fun_t *cb)
Register the gap evetn callback for ascp.
ISO_PHY_2M
@ ISO_PHY_2M
The transmitter PHY of packets is LE 2M.
Definition: ble_iso.h:175
iso_set_data_path_t::ctrl_delay
uint32_t ctrl_delay
Controller delay in microseconds (Range: 0x000000 to 0x3D0900).
Definition: ble_iso.h:305
WITH_EVT_WITH_REPORT
@ WITH_EVT_WITH_REPORT
An HCI_LE_Periodic_Advertising_Sync_Transfer_Received event is sent to the Host.
Definition: ble_iso.h:158
SCA2
@ SCA2
101 ppm to 150 ppm.
Definition: ble_iso.h:122
ISO_GPIO_MASK_4
@ ISO_GPIO_MASK_4
Definition: ble_iso.h:192
iso_set_per_adv_set_info_tran_t::service_data
uint16_t service_data
The Service_Data parameter is a value provided by the Host to identify the periodic advertisement to ...
Definition: ble_iso.h:397
iso_termi_big_cmpl_evt_t
The parameter for terminating big complete event.
Definition: ble_iso.h:500
iso_op_id_t
iso_op_id_t
Operation ID.
Definition: ble_iso.h:73
iso_cis_disc_evt_t::cis_hdl
uint16_t cis_hdl
Connection handle of CIS (Range 0x0000-0x0EFF).
Definition: ble_iso.h:472
iso_create_big_t::sdu_interval
uint32_t sdu_interval
Time duration between SDUs in microseconds(0x000100 to 0x0FFFFF).
Definition: ble_iso.h:270
ble_iso_rm_cig
uint16_t ble_iso_rm_cig(uint8_t cig_id)
Remove the cig indicated by the cig_id.
iso_big_info_report_evt_t::max_sdu
uint16_t max_sdu
Value of the Max_SDU (Range 0x0000-0x0FFF).
Definition: ble_iso.h:546
iso_set_default_per_adv_sync_tran_param_t::skip
uint16_t skip
The number of periodic advertising packets that can be skipped after a successful receive,...
Definition: ble_iso.h:386
iso_create_big_t::big_hdl
uint8_t big_hdl
Used to identify the BIG (0x00 to 0xEF).
Definition: ble_iso.h:267
iso_cis_req_evt_t::cig_id
uint8_t cig_id
Identifier of the CIG (Range 0x00-0xEF).
Definition: ble_iso.h:463
iso_create_big_t
The parameter for creating big.
Definition: ble_iso.h:266
iso_set_cig_param_cmpl_evt_t::cis_hdl
uint16_t * cis_hdl
List of connection handles of CISs in the CIG, (Range: 0x0000 to 0x0EFF).
Definition: ble_iso.h:594
iso_set_cig_param_t::trans_latency_s2m
uint16_t trans_latency_s2m
Maximum time, in milliseconds, for an SDU to be transported from the slave Controller to master Contr...
Definition: ble_iso.h:345
ble_iso_start_target_ann
uint16_t ble_iso_start_target_ann(iso_start_target_ann_t *param)
Start target audio announcement by using extended adv.
iso_cis_est_evt_t::max_pdu_m2s
uint16_t max_pdu_m2s
Maximum size, in octets, of the payload from master to slave (Range: 0x0000 to 0x00FB).
Definition: ble_iso.h:451
iso_big_sync_lost_evt_t
The parameter for big lost event.
Definition: ble_iso.h:527
iso_disc_ann_t::timeout
uint16_t timeout
Scan timeout should be a value between 0x0001 and 0xFFFF(unit: 10 ms).
Definition: ble_iso.h:247
iso_sync_ann_t::sync_timeout
uint16_t sync_timeout
Synchronization timeout for the periodic advertising(in unit of 10ms between 100ms and 163....
Definition: ble_iso.h:259
iso_create_big_t::framing
uint8_t framing
Unframed or Framed, see iso_framing_type_t.
Definition: ble_iso.h:276
iso_cb_fun_t
The parameter for set cig parameter complete event.
Definition: ble_iso.h:617
iso_hci_data_t::sdu
uint8_t * sdu
Sdu data buffer.
Definition: ble_iso.h:606
ble_iso_start_bd_ann
uint16_t ble_iso_start_bd_ann(iso_start_bd_ann_t *param, uint8_t *ext_adv_data, uint16_t ext_adv_data_len)
Start broadcast audio announcement by using periodic adv.
iso_cis_disc_evt_t::reason
uint8_t reason
Reason for disconnect CIS.
Definition: ble_iso.h:473
ble_iso_stop_sync_bd_ann
uint16_t ble_iso_stop_sync_bd_ann(uint8_t index)
Stop sync the broadcast audio announcement.
iso_start_bd_ann_t::data_len
uint16_t data_len
Broadcast audio announcement data length.
Definition: ble_iso.h:210
iso_create_big_sync_t::big_hdl
uint8_t big_hdl
Used to identify the BIG (0x00 to 0xEF).
Definition: ble_iso.h:286
iso_cis_est_evt_t::max_pdu_s2m
uint16_t max_pdu_s2m
Maximum size, in octets, of the payload from slave to master (Range: 0x0000 to 0x00FB).
Definition: ble_iso.h:452
iso_set_cig_param_t::cig_id
uint8_t cig_id
Used to identify a CIG (0x00 to 0xEF).
Definition: ble_iso.h:338
iso_create_big_t::phy
uint8_t phy
Indicates the PHY used for transmission of PDUs of BISs in the BIG.see iso_phy_type_t.
Definition: ble_iso.h:274
iso_cis_req_evt_t::cis_hdl
uint16_t cis_hdl
Connection handle of CIS (Range 0x0000-0x0EFF).
Definition: ble_iso.h:462
iso_create_big_sync_t::per_sync_idx
uint16_t per_sync_idx
Used to identify the periodic advertising set (0 to 4).
Definition: ble_iso.h:287
iso_create_big_sync_t::mse
uint8_t mse
Maximum number of subevents that are used to receive data payloads in each isochronous interval (0x01...
Definition: ble_iso.h:290
iso_create_big_cmpl_evt_t::nse
uint8_t nse
The number of subevents in each BIS event in the BIG, range 0x01-0x1E.
Definition: ble_iso.h:486
iso_hci_data_t::conn_hdl
uint16_t conn_hdl
Used to identify a cis or bis.
Definition: ble_iso.h:602
iso_big_info_report_evt_t::encryption
uint8_t encryption
Value of the Encryption (0x00: Unencrypted, 0x01: Encrypted, All other values: RFU)).
Definition: ble_iso.h:549
iso_set_default_per_adv_sync_tran_param_t::sync_timeout
uint16_t sync_timeout
Synchronization timeout for the periodic advertising,(Range: 0x000A to 0x4000).
Definition: ble_iso.h:387
DATA_PATH_GEN
@ DATA_PATH_GEN
Data path for gen.
Definition: ble_iso.h:105
iso_create_big_cmpl_evt_t::num_bis
uint8_t num_bis
Total number of BISs in the BIG,(Range: 0x01 to 0x1F).
Definition: ble_iso.h:492
iso_start_bd_ann_t::adv_idx
uint8_t adv_idx
Adv index, (Range: 0 to 4).
Definition: ble_iso.h:207
iso_create_big_t::rtn
uint8_t rtn
Number of times every BIS Data PDU should be retransmitted(0x00 to 0x0F).
Definition: ble_iso.h:273
NOT_SYNC_WITHOUT_CTE
@ NOT_SYNC_WITHOUT_CTE
Do not sync to packets without a Constant Tone Extension.
Definition: ble_iso.h:168
iso_start_bd_ann_t::data
uint8_t * data
Broadcast audio announcement data.
Definition: ble_iso.h:211
ble_iso_stop_ann
uint16_t ble_iso_stop_ann(uint8_t adv_idx)
Stop the audio announcement by using stop adv.
ble_iso_set_cig_param
uint16_t ble_iso_set_cig_param(iso_set_cig_param_t *param)
Set CIG paramter.
iso_set_data_path_trigger_t::enable_flag
uint8_t enable_flag
0x00: disable, 0x01: enable.
Definition: ble_iso.h:429
iso_create_big_sync_t::bis
uint8_t * bis
List of BISs in the BIG (0x01 to 0x1F).
Definition: ble_iso.h:293
NOT_SYNC_WITH_AOD_1US
@ NOT_SYNC_WITH_AOD_1US
Do not sync to packets with an AoD Constant Tone Extension with 1 us slots.
Definition: ble_iso.h:166
iso_create_big_sync_t::num_bis
uint8_t num_bis
Total number of BISs to synchronize (0x01 to 0x1F).
Definition: ble_iso.h:292
iso_create_cis_param_t::conn_idx
uint16_t conn_idx
Connection index of ACL Link.
Definition: ble_iso.h:356
iso_cis_param_t::sdu_size_s2m
uint16_t sdu_size_s2m
Maximum size of a SDU in octets from the slave Host (0x000 to 0xFFF).
Definition: ble_iso.h:326
iso_set_per_adv_sync_tran_param_t
The parameter for setting adv sync transport parameter.
Definition: ble_iso.h:372
iso_create_big_sync_t::big_sync_timeout
uint16_t big_sync_timeout
Synchronization timeout for the BIS, Range: 0x000A to 0x4000.
Definition: ble_iso.h:291
iso_set_per_adv_sync_tran_param_t::sync_timeout
uint16_t sync_timeout
Synchronization timeout for the periodic advertising,(Range: 0x000A to 0x4000).
Definition: ble_iso.h:376
iso_big_sync_lost_evt_t::reason
uint8_t reason
indicate the reason why the synchronization was terminated.
Definition: ble_iso.h:529
iso_big_create_sync_est_evt_t::big_trans_latency
uint32_t big_trans_latency
The maximum delay time, in microseconds, for transmission of SDUs of all BISes(Range 0x0000EA to 0x7F...
Definition: ble_iso.h:512
iso_create_big_t::encryption
uint8_t encryption
Unencrypted or Encrypted, see iso_encryption_type_t.
Definition: ble_iso.h:277
iso_big_create_sync_est_evt_t::max_pdu
uint16_t max_pdu
Maximum size of the payload in octets, range 0x00-0xFB.
Definition: ble_iso.h:517
ISO_GPIO_MASK_1
@ ISO_GPIO_MASK_1
Definition: ble_iso.h:189
iso_start_gen_ann_t
The parameter for starting genneral announcement.
Definition: ble_iso.h:218
iso_packing_type_t
iso_packing_type_t
Packing type.
Definition: ble_iso.h:132
DATA_PATH_GDX
@ DATA_PATH_GDX
Data path for gdx.
Definition: ble_iso.h:106
iso_start_target_ann_t::data_len
uint16_t data_len
Target audio announcement data length.
Definition: ble_iso.h:236
iso_rm_data_path_t::direction
uint8_t direction
Specifies the input data transport path, see iso_data_path_direction_t.
Definition: ble_iso.h:316
iso_set_cig_param_t::cis_param
iso_cis_param_t * cis_param
CIS parameter, see iso_cis_param_t.
Definition: ble_iso.h:347
iso_req_peer_sca_cmpl_evt_t::acl_hdl
uint16_t acl_hdl
Connection handle of the ACL, (Range: 0x0000 to 0x0EFF).
Definition: ble_iso.h:558
NOT_SYNC_WITH_AOD_2US
@ NOT_SYNC_WITH_AOD_2US
Do not sync to packets with an AoD Constant Tone Extension with 2 us slots.
Definition: ble_iso.h:167
TERMINATE_BY_REMOTE
@ TERMINATE_BY_REMOTE
Remote user terminate.
Definition: ble_iso.h:182
iso_cis_est_evt_t::ft_s2m
uint8_t ft_s2m
The flush timeout, in multiples of the ISO_Interval for the CIS, for each payload sent from the slave...
Definition: ble_iso.h:450
iso_big_create_sync_est_evt_t::nse
uint8_t nse
The number of subevents in each BIS event in the BIG, range 0x01-0x1E.
Definition: ble_iso.h:513
ISO_READ_ISO_TX_SYNC
@ ISO_READ_ISO_TX_SYNC
Definition: ble_iso.h:74
ISO_SET_PER_ADV_SYNC_TRAN_PARAM
@ ISO_SET_PER_ADV_SYNC_TRAN_PARAM
Definition: ble_iso.h:82
iso_big_info_report_evt_t
The parameter for big info report event.
Definition: ble_iso.h:536
iso_cis_req_evt_t::cis_id
uint8_t cis_id
Identifier of the CIS (Range 0x00-0xEF).
Definition: ble_iso.h:464
iso_set_per_adv_rcv_enable_t::sync_hdl
uint16_t sync_hdl
identifying the periodic advertising, (Range: 0x0000 to 0x0EFF).
Definition: ble_iso.h:418
iso_cis_est_evt_t::ft_m2s
uint8_t ft_m2s
The flush timeout, in multiples of the ISO_Interval for the CIS, for each payload sent from the maste...
Definition: ble_iso.h:449
iso_cis_param_t::phy_m2s
uint8_t phy_m2s
Master to slave PHY, see iso_phy_type_t.
Definition: ble_iso.h:327
iso_create_big_cmpl_evt_t::bn
uint8_t bn
TThe number of new payloads in each BIS event, range 0x01-0x07.
Definition: ble_iso.h:487
iso_big_info_report_evt_t::sdu_interval
uint32_t sdu_interval
Value of the SDU_Interval (Range Range 0x0000FF-0x0FFFFF).
Definition: ble_iso.h:545
iso_cis_est_evt_t::bn_m2s
uint8_t bn_m2s
The burst number for master to slave transmission (Range 0x00 to 0x0F).
Definition: ble_iso.h:447
DATA_PATH_HCI
@ DATA_PATH_HCI
Data path for hci.
Definition: ble_iso.h:104
iso_start_target_ann_t::adv_idx
uint8_t adv_idx
Adv index.
Definition: ble_iso.h:230
iso_req_peer_sca_cmpl_evt_t::status
uint8_t status
0x00: The SCA parameter received successfully.0x01-0xFF: The reception of SCA parameter failed
Definition: ble_iso.h:557
iso_start_gen_ann_t::interval
uint32_t interval
Adv interval, (Range: 0x000020 to 0xFFFFFF), Time = N * 0.625.
Definition: ble_iso.h:220
iso_set_cig_param_t::cis_cnt
uint8_t cis_cnt
Total number of CISs (0x00 to 0x1F).
Definition: ble_iso.h:346
iso_framing_type_t
iso_framing_type_t
Framing type.
Definition: ble_iso.h:139
iso_set_data_path_t::conn_hdl
uint16_t conn_hdl
Connection handle of a CIS or BIS.
Definition: ble_iso.h:301
iso_cis_est_evt_t::tran_latency_m2s
uint32_t tran_latency_m2s
The maximum time, in microseconds, for transmission of SDUs of all CISes from master to slave(Range 0...
Definition: ble_iso.h:442
iso_set_cig_param_cmpl_evt_t
The parameter for set cig parameter complete event.
Definition: ble_iso.h:590
HOST_TO_CONTROLLER
@ HOST_TO_CONTROLLER
Host to controller.
Definition: ble_iso.h:112
iso_disc_ann_t::window
uint16_t window
Scan window between 0x0004 and 0x4000 in 0.625 ms units(range: 2.5 ms to 10.24 s).
Definition: ble_iso.h:246
iso_rm_data_path_t
The parameter for removing data path.
Definition: ble_iso.h:314
iso_read_iso_tx_sync_cmpl_evt_t::pkt_seq_num
uint16_t pkt_seq_num
The packet sequence number of the ISO_SDU.
Definition: ble_iso.h:581
iso_set_default_per_adv_sync_tran_param_t::mode
uint8_t mode
the action to be taken when periodic advertising synchronization information is received,...
Definition: ble_iso.h:385
ble_iso_create_cis
uint16_t ble_iso_create_cis(iso_create_cis_t *param)
Create CIS.
ble_iso_stop_discover_ann
uint16_t ble_iso_stop_discover_ann(void)
Stop discovery the audio announcement by stop extended scan.
iso_create_big_cmpl_evt_t
The parameter for creating big complete event.
Definition: ble_iso.h:480
iso_per_adv_sync_tran_t::sync_hdl
uint16_t sync_hdl
identifying the periodic advertising, (Range: 0x0000 to 0x0EFF).
Definition: ble_iso.h:407
iso_big_sync_lost_evt_t::big_hdl
uint16_t big_hdl
Used as the identifier the big, (Range: 0x0000 to 0x0EFF).
Definition: ble_iso.h:528
ble_iso_rm_data_path
uint16_t ble_iso_rm_data_path(iso_rm_data_path_t *param)
Remove the ISO data path.
iso_start_gen_ann_t::adv_idx
uint8_t adv_idx
Adv index.
Definition: ble_iso.h:219
iso_set_per_adv_sync_tran_param_t::cte_type
uint8_t cte_type
specifies whether to only synchronize to periodic advertising with certain types of Constant Tone Ext...
Definition: ble_iso.h:377
iso_per_adv_sync_tran_rcv_evt_t::conn_hdl
uint16_t conn_hdl
Connection_Handle, (Range: 0x0000 to 0x0EFF).
Definition: ble_iso.h:568
iso_per_adv_sync_tran_t::conn_hdl
uint16_t conn_hdl
Connection_Handle, (Range: 0x0000 to 0x0EFF)
Definition: ble_iso.h:410
PACK_INT
@ PACK_INT
Interleaved.
Definition: ble_iso.h:134
iso_encryption_type_t
iso_encryption_type_t
Encryption type.
Definition: ble_iso.h:146
ble_iso_set_data_path
uint16_t ble_iso_set_data_path(iso_set_data_path_t *param)
Set the ISO data path.
iso_create_big_cmpl_evt_t::status
uint8_t status
0x00: Establishment of the BIG has been completed.
Definition: ble_iso.h:481
iso_sca_type_t
iso_sca_type_t
SCA type.
Definition: ble_iso.h:119
iso_big_create_sync_est_evt_t::status
uint8_t status
0x00: Synchronization to BIG has been completed.0x01 to 0xFF: Synchronization to BIG failed to be com...
Definition: ble_iso.h:510
iso_cis_est_evt_t::nse
uint8_t nse
Maximum number of subevents in each isochronous event (Range 0x01 to 0x1E).
Definition: ble_iso.h:446
iso_disc_ann_t
The parameter for discovery announcement.
Definition: ble_iso.h:244
DATA_PATH_DISABLE
@ DATA_PATH_DISABLE
Data path for disabled.
Definition: ble_iso.h:103
iso_cis_est_evt_t::status
uint8_t status
0x00: The CIS has been established, 0x01 to 0xFF: The CIS failed to be established.
Definition: ble_iso.h:438
iso_big_info_report_evt_t::pto
uint8_t pto
Value of the PTO (Range 0x00-0x0F).
Definition: ble_iso.h:542
ble_gap_ext_adv_report_ind_t
APP receives the extended advertising report indication info struct.
Definition: ble_gapc.h:693
iso_create_big_t::max_sdu_size
uint16_t max_sdu_size
Maximum size of a SDU (0x001 to 0xFFF).
Definition: ble_iso.h:271
iso_set_data_path_trigger_t::direction
uint8_t direction
Specifies the data transport path, see iso_data_path_direction_t.
Definition: ble_iso.h:428
iso_create_big_t::num_bis
uint8_t num_bis
Total number of BISs in the BIG(0x01 to 0x1F).
Definition: ble_iso.h:269
ble_iso_sync_bd_ann
uint16_t ble_iso_sync_bd_ann(uint8_t index, iso_sync_ann_t *param)
Sync the broadcast audio announcement by sync the period adv.
iso_start_bd_ann_t
The parameter for starting broadcast announcement.
Definition: ble_iso.h:206
iso_per_adv_sync_tran_rcv_evt_t::sync_hdl
uint16_t sync_hdl
Sync_Handle identifying the periodic advertising, (Range: 0x0000 to 0x0EFF).
Definition: ble_iso.h:571
iso_start_target_ann_t::interval
uint32_t interval
Adv interval, (Range: 0x000020 to 0xFFFFFF), Time = N * 0.625.
Definition: ble_iso.h:231
ble_error.h
File that contains error codes.
ble_iso_set_data_path_trigger
uint16_t ble_iso_set_data_path_trigger(iso_set_data_path_trigger_t *param)
Set iso data path trigger.
iso_set_data_path_t::codec_cfg_len
uint8_t codec_cfg_len
Codec configuration length.
Definition: ble_iso.h:306
ble_gapc.h
BLE GAPC API.
iso_cis_est_evt_t::cis_sync_delay
uint32_t cis_sync_delay
The CIS synchronization delay time in microseconds(Range 0x0000EA to 0x7FFFFF).
Definition: ble_iso.h:441
iso_per_adv_sync_tran_t::service_data
uint16_t service_data
The Service_Data parameter is a value provided by the Host to identify the periodic advertisement to ...
Definition: ble_iso.h:408
iso_big_info_report_evt_t::max_pdu
uint16_t max_pdu
Value of the Max_PDU (Range 0x0000-0x00FB).
Definition: ble_iso.h:544
iso_set_data_path_t::codec_cfg
uint8_t * codec_cfg
Codec configuration.
Definition: ble_iso.h:307
ISO_GPIO_MASK_2
@ ISO_GPIO_MASK_2
Definition: ble_iso.h:190
iso_create_big_t::per_adv_idx
uint8_t per_adv_idx
Used to identify the periodic advertising set (0 to 4).
Definition: ble_iso.h:268
iso_create_big_sync_t::encryption
uint8_t encryption
Unencrypted or Encrypted, see iso_encryption_type_t.
Definition: ble_iso.h:288
iso_set_per_adv_sync_tran_param_t::mode
uint8_t mode
the action to be taken when periodic advertising synchronization information is received,...
Definition: ble_iso.h:374
iso_create_big_cmpl_evt_t::pto
uint8_t pto
Offset used for pre-transmissions, range 0x00-0x0F.
Definition: ble_iso.h:488
ISO_GPIO_MASK_5
@ ISO_GPIO_MASK_5
Definition: ble_iso.h:193
iso_set_default_per_adv_sync_tran_param_t
The parameter for setting default periodic advertising synchronization transport.
Definition: ble_iso.h:384
iso_create_big_cmpl_evt_t::iso_interval
uint16_t iso_interval
ISO interval (1.25ms unit, range: 5ms to 4s).
Definition: ble_iso.h:491
ble_iso_accept_cis_req
uint16_t ble_iso_accept_cis_req(uint16_t cis_hdl)
Slave Host to inform the Controller to accept the request for the CIS that is identified by the cis_h...
UNFRAMED
@ UNFRAMED
Unframed.
Definition: ble_iso.h:140
iso_create_cis_t
The parameter for creating multi cis.
Definition: ble_iso.h:363
ISO_ADV_DIRECT
@ ISO_ADV_DIRECT
direct adv (Low duty).
Definition: ble_iso.h:90
iso_per_adv_sync_tran_rcv_evt_t::service_data
uint16_t service_data
A value provided by the peer device.
Definition: ble_iso.h:569
ISO_PER_ADV_SYNC_TRAN
@ ISO_PER_ADV_SYNC_TRAN
Definition: ble_iso.h:80
iso_big_info_report_evt_t::irc
uint8_t irc
Value of the IRC (Range 0x01-0x0F).
Definition: ble_iso.h:543
iso_start_target_ann_t
The parameter for starting target announcement.
Definition: ble_iso.h:229
iso_big_info_report_evt_t::iso_interval
uint16_t iso_interval
Value of the ISO interval.
Definition: ble_iso.h:540
iso_set_per_adv_rcv_enable_t
The parameter for setting periodic advertising reciving enable.
Definition: ble_iso.h:417
ascp_gap_cb_fun_t
The callback for gap event which need to be handled by ascp.
Definition: ble_iso.h:663
iso_create_cis_t::params
iso_create_cis_param_t * params
Create cis param, see iso_create_cis_param_t.
Definition: ble_iso.h:365
iso_create_big_t::packing
uint8_t packing
Sequential or Interleaved, see iso_packing_type_t.
Definition: ble_iso.h:275
SCA4
@ SCA4
51 ppm to 75 ppm.
Definition: ble_iso.h:124
ble_iso_create_big_sync
uint16_t ble_iso_create_big_sync(iso_create_big_sync_t *param)
Create the BIG sync.
iso_cis_est_evt_t
The parameter for cis establish event.
Definition: ble_iso.h:437
iso_set_data_path_trigger_t::trigger_offset
int32_t trigger_offset
Trigger offset in microseconds.
Definition: ble_iso.h:430
iso_set_per_adv_sync_tran_param_t::conn_hdl
uint16_t conn_hdl
Connection handle of the ACL, (Range: 0x0000 to 0x0EFF).
Definition: ble_iso.h:373
iso_req_peer_sca_cmpl_evt_t
The parameter for request peer sca complete event.
Definition: ble_iso.h:556
iso_big_create_sync_est_evt_t::big_hdl
uint8_t big_hdl
Used as the identifier of the BIG (Range 0x00 to 0xEF).
Definition: ble_iso.h:511
ISO_REMOVE_CIG
@ ISO_REMOVE_CIG
Definition: ble_iso.h:76
ISO_SET_DATA_PATH
@ ISO_SET_DATA_PATH
Definition: ble_iso.h:78
iso_big_info_report_evt_t::framing
uint8_t framing
Value of the Framing (0x00: Unframed, 0x01: Framed, All other values: RFU).
Definition: ble_iso.h:548
iso_cis_est_evt_t::tran_latency_s2m
uint32_t tran_latency_s2m
The maximum time, in microseconds, for transmission of SDUs of all CISes from slave to master(Range 0...
Definition: ble_iso.h:443
ISO_SET_CIG_PARAM
@ ISO_SET_CIG_PARAM
Definition: ble_iso.h:75
SCA0
@ SCA0
251 ppm to 500 ppm.
Definition: ble_iso.h:120
iso_adv_type_t
iso_adv_type_t
Adv type for announcement.
Definition: ble_iso.h:88
iso_set_data_path_t
The parameter for setting data path.
Definition: ble_iso.h:300
ble_iso_terminate_big
uint16_t ble_iso_terminate_big(uint8_t big_hdl, uint8_t reason)
Terminate the BIG.
ISO_ADDR_LEN
#define ISO_ADDR_LEN
Length for address.
Definition: ble_iso.h:60
ENC_CODE_LEN
#define ENC_CODE_LEN
Length for encryption code.
Definition: ble_iso.h:61
iso_start_bd_ann_t::sid
uint8_t sid
Adv set ID, (Range: 0x00 to 0xFF).
Definition: ble_iso.h:208
ISO_SET_PER_ADV_SET_INFO_TRAN
@ ISO_SET_PER_ADV_SET_INFO_TRAN
Definition: ble_iso.h:81
iso_cis_est_evt_t::cig_sync_delay
uint32_t cig_sync_delay
The CIG synchronization delay time in microseconds(Range 0x0000EA to 0x7FFFFF).
Definition: ble_iso.h:440
iso_sync_ann_t::sid
uint8_t sid
public type.
Definition: ble_iso.h:256
ISO_GPIO_MASK_3
@ ISO_GPIO_MASK_3
Definition: ble_iso.h:191
iso_cis_req_evt_t
The parameter for cis request event.
Definition: ble_iso.h:460
ISO_GPIO_MASK_0
@ ISO_GPIO_MASK_0
Definition: ble_iso.h:188
iso_cte_type_t
iso_cte_type_t
Cte type.
Definition: ble_iso.h:164
iso_cis_param_t::sdu_size_m2s
uint16_t sdu_size_m2s
Maximum size of a SDU in octets from the master Host (0x000 to 0xFFF).
Definition: ble_iso.h:325
TERMINATE_BY_LOCAL
@ TERMINATE_BY_LOCAL
Local user terminate.
Definition: ble_iso.h:183
ble_iso_create_big
uint16_t ble_iso_create_big(iso_create_big_t *param)
Create the BIG.
ISO_REJECT_CIS_REQ
@ ISO_REJECT_CIS_REQ
Definition: ble_iso.h:77
SCA5
@ SCA5
31 ppm to 50 ppm.
Definition: ble_iso.h:125
iso_cis_est_evt_t::bn_s2m
uint8_t bn_s2m
The burst number for slave to master transmission (Range 0x00 to 0x0F).
Definition: ble_iso.h:448
iso_start_bd_ann_t::interval
uint16_t interval
Adv interval, (Range: 0x0006 to 0xFFFF), Time = N * 1.25 ms,Time Range: 7.5ms to 81....
Definition: ble_iso.h:209
CONTROLLER_TO_HOST
@ CONTROLLER_TO_HOST
Controller to host.
Definition: ble_iso.h:113
iso_start_target_ann_t::data
uint8_t * data
Target audio announcement data.
Definition: ble_iso.h:237
iso_create_cis_t::num_cis
uint8_t num_cis
Total number of CISs to be established (0x01 to 0x1F).
Definition: ble_iso.h:364
iso_create_big_cmpl_evt_t::irc
uint8_t irc
The number of times a payload is transmitted in a BIS event, range 0x01-0x0F.
Definition: ble_iso.h:489
iso_add_type_t
iso_add_type_t
Address type.
Definition: ble_iso.h:95
ISO_GPIO_MASK_6
@ ISO_GPIO_MASK_6
Definition: ble_iso.h:194
WITH_EVT_NO_REPORT
@ WITH_EVT_NO_REPORT
An HCI_LE_Periodic_Advertising_Sync_Transfer_Received event is sent to the Host.
Definition: ble_iso.h:156
ble_iso_gpio_enable
uint16_t ble_iso_gpio_enable(uint8_t gpio_sel)
Un-mask the ISO GPIO.
PUBLIC
@ PUBLIC
public type.
Definition: ble_iso.h:96
iso_cis_param_t::rtn_s2m
uint8_t rtn_s2m
Number of times every CIS Data PDU should be retransmitted from the slave to master (0x00 to 0x0F).
Definition: ble_iso.h:330
iso_big_create_sync_est_evt_t::pto
uint8_t pto
Offset used for pre-transmissions, range 0x00-0x0F.
Definition: ble_iso.h:515
iso_set_cig_param_t::sdu_int_s2m
uint32_t sdu_int_s2m
The interval, in microseconds, of periodic SDUs.
Definition: ble_iso.h:340
iso_set_cig_param_t::framing
uint8_t framing
Unframed or Framed, see iso_framing_type_t.
Definition: ble_iso.h:343
iso_set_per_adv_sync_tran_param_t::skip
uint16_t skip
The number of periodic advertising packets that can be skipped after a successful receive,...
Definition: ble_iso.h:375
ble_iso_start_gen_ann
uint16_t ble_iso_start_gen_ann(iso_start_gen_ann_t *param)
Start general audio announcement by using extended adv.
iso_start_target_ann_t::adv_type
uint8_t adv_type
Adv type, see iso_adv_type_t , the peer addr_type and addr is invalid for undirect type,...
Definition: ble_iso.h:232
iso_per_adv_sync_tran_rcv_evt_t
The parameter for receiving periodic advertising Synchronization transport event.
Definition: ble_iso.h:566
iso_set_per_adv_rcv_enable_t::enable
uint8_t enable
0x00: Reporting disabled, 0x01: Reporting enabled.
Definition: ble_iso.h:419
NO_EVT_NO_REPORT
@ NO_EVT_NO_REPORT
No attempt is made to synchronize to the periodic advertising and no HCI_LE_Periodic_Advertising_Sync...
Definition: ble_iso.h:154
iso_big_info_report_evt_t::num_bis
uint8_t num_bis
Number of BIS (Range 0x01-0x1F).
Definition: ble_iso.h:538
iso_big_create_sync_est_evt_t::bis_hdl
uint16_t * bis_hdl
The connection handles of the BISs, (Range: 0x0000 to 0x0EFF).
Definition: ble_iso.h:520
ble_iso_disc_cis
uint16_t ble_iso_disc_cis(uint16_t cis_hdl)
disconnect the CIS that is identified by the cis_hdl.
NOT_SYNC_WITH_AOA
@ NOT_SYNC_WITH_AOA
Do not sync to packets with an AoA Constant Tone Extension.
Definition: ble_iso.h:165
iso_cis_param_t::rtn_m2s
uint8_t rtn_m2s
Number of times every CIS Data PDU should be retransmitted from the master to slave (0x00 to 0x0F).
Definition: ble_iso.h:329
iso_create_big_cmpl_evt_t::bis_hdl
uint16_t * bis_hdl
The connection handles of the BISs, (Range: 0x0000 to 0x0EFF).
Definition: ble_iso.h:493
iso_cis_param_t::phy_s2m
uint8_t phy_s2m
Slave to master PHY, see iso_phy_type_t.
Definition: ble_iso.h:328
iso_create_big_cmpl_evt_t::big_hdl
uint8_t big_hdl
Used as the identifier of the BIG, (Range: 0x00 to 0xEF)
Definition: ble_iso.h:482
iso_termi_big_cmpl_evt_t::big_hdl
uint8_t big_hdl
Used as the identifier of the BIG (Range 0x00 to 0xEF).
Definition: ble_iso.h:502
iso_cis_est_evt_t::phy_s2m
uint8_t phy_s2m
indicates the PHY selected for packets from the slave to master.
Definition: ble_iso.h:445
PACK_SEQ
@ PACK_SEQ
Sequential.
Definition: ble_iso.h:133
iso_hci_data_t::sdu_len
uint16_t sdu_len
Sdu length.
Definition: ble_iso.h:605
iso_data_path_type_t
iso_data_path_type_t
Data path type.
Definition: ble_iso.h:102
iso_sync_mode_t
iso_sync_mode_t
Sync mode type.
Definition: ble_iso.h:153
FRAMED
@ FRAMED
Framed.
Definition: ble_iso.h:141
iso_read_iso_tx_sync_cmpl_evt_t
The parameter for read iso tx sync complete event.
Definition: ble_iso.h:578
iso_big_create_sync_est_evt_t::iso_interval
uint16_t iso_interval
ISO interval (1.25ms unit, range: 5ms to 4s).
Definition: ble_iso.h:518
ble_iso_register_callback
uint16_t ble_iso_register_callback(iso_cb_fun_t *cb)
Register callback for iso.
iso_cis_param_t
The parameter for setting cis.
Definition: ble_iso.h:323
iso_data_path_direction_t
iso_data_path_direction_t
Data path direction type.
Definition: ble_iso.h:111
iso_start_gen_ann_t::data
uint8_t * data
General audio announcement data.
Definition: ble_iso.h:222
iso_big_create_sync_est_evt_t
The parameter for creating big sync complete event.
Definition: ble_iso.h:509
iso_rm_data_path_t::conn_hdl
uint16_t conn_hdl
Connection handle of a CIS or BIS.
Definition: ble_iso.h:315
iso_sync_ann_t::peer_addr_type
uint8_t peer_addr_type
Peer address type, see iso_add_type_t.
Definition: ble_iso.h:257
iso_create_big_sync_t
The parameter for creating big sync.
Definition: ble_iso.h:285
iso_create_big_cmpl_evt_t::big_trans_latency
uint32_t big_trans_latency
The maximum delay time, in microseconds, for transmission of SDUs of all BISes,(Range: 0x0000EA to 0x...
Definition: ble_iso.h:484
iso_set_per_adv_set_info_tran_t::adv_hdl
uint16_t adv_hdl
Used to identify an advertising set,(Range: 0x00-0xEF).
Definition: ble_iso.h:396
iso_termi_big_reason_t
iso_termi_big_reason_t
Terminate big/big sync reason.
Definition: ble_iso.h:181
ble_iso_terminate_big_sync
uint16_t ble_iso_terminate_big_sync(uint8_t big_hdl)
Terminate the BIG sync.
iso_big_info_report_evt_t::per_sync_idx
uint8_t per_sync_idx
Per sync index, (Range: 0x00 to 0x05).
Definition: ble_iso.h:537
iso_disc_ann_t::interval
uint16_t interval
Scan interval between 0x0004 and 0x4000 in 0.625 ms units(range: 2.5 ms to 10.24 s).
Definition: ble_iso.h:245
iso_set_data_path_trigger_t
The parameter for set iso data path trigger.
Definition: ble_iso.h:426
iso_read_iso_tx_sync_cmpl_evt_t::time_stap
uint32_t time_stap
The timestamp of an SDU identified by the seq_num, (Range: 0x00000000 to 0xFFFFFFFF)
Definition: ble_iso.h:582
iso_set_data_path_trigger_t::conn_hdl
uint16_t conn_hdl
Connection handle of CIS/BIS.
Definition: ble_iso.h:427
ble_iso_req_peer_sca
uint16_t ble_iso_req_peer_sca(uint16_t conn_idx)
Read the Sleep Clock Accuracy of the peer device.
iso_set_data_path_t::direction
uint8_t direction
Direction for data path, see iso_data_path_direction_t.
Definition: ble_iso.h:302
iso_hci_data_t
The structure for iso hci data.
Definition: ble_iso.h:601
iso_set_cig_param_cmpl_evt_t::cig_id
uint8_t cig_id
Used to identify a CIG, (Range: 0x00 to 0xEF).
Definition: ble_iso.h:592
iso_set_cig_param_t::packing
uint8_t packing
Sequential or Interleaved, see iso_packing_type_t.
Definition: ble_iso.h:342
iso_termi_big_cmpl_evt_t::reason
uint8_t reason
indicate the reason why the BIG was terminated.
Definition: ble_iso.h:501
ble_iso_reject_cis_req
uint16_t ble_iso_reject_cis_req(uint16_t cis_hdl, uint8_t reason)
slave Host to reject the request for the CIS that is identified by the cis_hdl.
iso_set_cig_param_t::sca
uint8_t sca
The worst-case sleep clock accuracy of all the slaves, see iso_sca_type_t.
Definition: ble_iso.h:341
iso_start_target_ann_t::peer_add_type
uint8_t peer_add_type
Peer address type, see iso_add_type_t.
Definition: ble_iso.h:234
SCA7
@ SCA7
0 ppm to 20 ppm.
Definition: ble_iso.h:127
iso_set_cig_param_cmpl_evt_t::cis_count
uint8_t cis_count
Total number of CISs, (Range: 0x00 to 0x10).
Definition: ble_iso.h:593
iso_phy_type_t
iso_phy_type_t
Phy type.
Definition: ble_iso.h:173
RANDOM
@ RANDOM
random type.
Definition: ble_iso.h:97
iso_set_per_adv_set_info_tran_t::conn_hdl
uint16_t conn_hdl
Connection_Handle, (Range: 0x0000 to 0x0EFF)
Definition: ble_iso.h:399
iso_set_cig_param_cmpl_evt_t::status
uint8_t status
0x00: succeeded.
Definition: ble_iso.h:591
iso_cis_est_evt_t::cis_hdl
uint16_t cis_hdl
Connection handle of CIS (Range 0x0000-0x0EFF).
Definition: ble_iso.h:439
iso_create_big_t::tran_latency
uint16_t tran_latency
Maximum time (in milliseconds) between transmission and reception of a BIS Data PDU (0x0000 to 0x0FA0...
Definition: ble_iso.h:272
iso_big_create_sync_est_evt_t::num_bis
uint8_t num_bis
Total number of BISs in the BIG.
Definition: ble_iso.h:519
iso_create_big_cmpl_evt_t::phy
uint8_t phy
PHY used, bit 0: 1Mbps, bit 1: 2Mbps, bit 2: LE-Coded.
Definition: ble_iso.h:485
iso_read_iso_tx_sync_cmpl_evt_t::status
uint8_t status
0x00: succeeded.
Definition: ble_iso.h:579
iso_read_iso_tx_sync_cmpl_evt_t::con_hdl
uint16_t con_hdl
Connection handle of the bis or cis, (Range: 0x0000 to 0x0EFF).
Definition: ble_iso.h:580
ISO_PHY_CODED
@ ISO_PHY_CODED
The transmitter PHY of packets is LE Coded.
Definition: ble_iso.h:176
iso_big_create_sync_est_evt_t::bn
uint8_t bn
The number of new payloads in each BIS event, range 0x01-0x07.
Definition: ble_iso.h:514
iso_cis_req_evt_t::conn_idx
uint16_t conn_idx
Connection index of the ACL.
Definition: ble_iso.h:461
iso_cis_disc_evt_t
The parameter for cis disconnect event.
Definition: ble_iso.h:471
ble_iso_read_tx_sync
uint16_t ble_iso_read_tx_sync(uint16_t conn_hdl)
read the Bluetooth_TimeStamp (BTS) of a packet identified by the Packet_Sequence_Number on a CIS or B...
ENCRYPTED
@ ENCRYPTED
Encrypted.
Definition: ble_iso.h:148
iso_per_adv_sync_tran_rcv_evt_t::status
uint8_t status
0x00: Synchronization to the periodic advertising succeeded, 0x01 to 0xFF: Synchronization to the per...
Definition: ble_iso.h:567
iso_create_cis_param_t
The parameter for creating per cis.
Definition: ble_iso.h:354
iso_sync_ann_t
The parameter for sync announcement.
Definition: ble_iso.h:255
iso_set_per_adv_set_info_tran_t
The parameter for setting periodic advertising set information.
Definition: ble_iso.h:395
DIRECTION_BOTH
@ DIRECTION_BOTH
Host to controller and controller to host, just use for remove data path.
Definition: ble_iso.h:114
iso_cis_est_evt_t::iso_interval
uint16_t iso_interval
The time between two consecutive CIS anchor points (unit:1.25ms, Range:0x0004 to 0x0C80,...
Definition: ble_iso.h:453
iso_per_adv_sync_tran_t
The parameter for periodic advertising synchronization transport.
Definition: ble_iso.h:406
iso_set_default_per_adv_sync_tran_param_t::cte_type
uint8_t cte_type
specifies whether to only synchronize to periodic advertising with certain types of Constant Tone Ext...
Definition: ble_iso.h:388
iso_read_iso_tx_sync_cmpl_evt_t::time_offset
uint32_t time_offset
The time offset associated with the ISO_SDU identified by the seq_num, (Range: 0x000000 to 0xFFFFFF)
Definition: ble_iso.h:583
iso_set_cig_param_t::trans_latency_m2s
uint16_t trans_latency_m2s
Maximum time, in milliseconds, for an SDU to be transported from the master Controller to slave Contr...
Definition: ble_iso.h:344
iso_set_cig_param_t
The parameter for setting cig.
Definition: ble_iso.h:337
UNENCRYPTED
@ UNENCRYPTED
Unencrypted.
Definition: ble_iso.h:147
ISO_PHY_1M
@ ISO_PHY_1M
The transmitter PHY of packets is LE 1M.
Definition: ble_iso.h:174
iso_create_big_cmpl_evt_t::max_pdu
uint16_t max_pdu
Maximum size of the payload in octets, range 0x00-0xFB.
Definition: ble_iso.h:490