ble_iso.h File Reference

BLE ISO API. More...

#include "ble_error.h"
#include "ble_gapc.h"
#include <stdint.h>
#include <stdbool.h>

Go to the source code of this file.

Classes

struct  iso_start_bd_ann_t
 The parameter for starting broadcast announcement. More...
 
struct  iso_start_gen_ann_t
 The parameter for starting genneral announcement. More...
 
struct  iso_start_target_ann_t
 The parameter for starting target announcement. More...
 
struct  iso_disc_ann_t
 The parameter for discovery announcement. More...
 
struct  iso_sync_ann_t
 The parameter for sync announcement. More...
 
struct  iso_create_big_t
 The parameter for creating big. More...
 
struct  iso_create_big_sync_t
 The parameter for creating big sync. More...
 
struct  iso_set_data_path_t
 The parameter for setting data path. More...
 
struct  iso_rm_data_path_t
 The parameter for removing data path. More...
 
struct  iso_cis_param_t
 The parameter for setting cis. More...
 
struct  iso_set_cig_param_t
 The parameter for setting cig. More...
 
struct  iso_create_cis_param_t
 The parameter for creating per cis. More...
 
struct  iso_create_cis_t
 The parameter for creating multi cis. More...
 
struct  iso_set_per_adv_sync_tran_param_t
 The parameter for setting adv sync transport parameter. More...
 
struct  iso_set_default_per_adv_sync_tran_param_t
 The parameter for setting default periodic advertising synchronization transport. More...
 
struct  iso_set_per_adv_set_info_tran_t
 The parameter for setting periodic advertising set information. More...
 
struct  iso_per_adv_sync_tran_t
 The parameter for periodic advertising synchronization transport. More...
 
struct  iso_set_per_adv_rcv_enable_t
 The parameter for setting periodic advertising reciving enable. More...
 
struct  iso_set_data_path_trigger_t
 The parameter for set iso data path trigger. More...
 
struct  iso_cis_est_evt_t
 The parameter for cis establish event. More...
 
struct  iso_cis_req_evt_t
 The parameter for cis request event. More...
 
struct  iso_cis_disc_evt_t
 The parameter for cis disconnect event. More...
 
struct  iso_create_big_cmpl_evt_t
 The parameter for creating big complete event. More...
 
struct  iso_termi_big_cmpl_evt_t
 The parameter for terminating big complete event. More...
 
struct  iso_big_create_sync_est_evt_t
 The parameter for creating big sync complete event. More...
 
struct  iso_big_sync_lost_evt_t
 The parameter for big lost event. More...
 
struct  iso_big_info_report_evt_t
 The parameter for big info report event. More...
 
struct  iso_req_peer_sca_cmpl_evt_t
 The parameter for request peer sca complete event. More...
 
struct  iso_per_adv_sync_tran_rcv_evt_t
 The parameter for receiving periodic advertising Synchronization transport event. More...
 
struct  iso_read_iso_tx_sync_cmpl_evt_t
 The parameter for read iso tx sync complete event. More...
 
struct  iso_set_cig_param_cmpl_evt_t
 The parameter for set cig parameter complete event. More...
 
struct  iso_hci_data_t
 The structure for iso hci data. More...
 
struct  iso_cb_fun_t
 The parameter for set cig parameter complete event. More...
 
struct  ascp_gap_cb_fun_t
 The callback for gap event which need to be handled by ascp. More...
 

Macros

#define ISO_ADDR_LEN   6
 
#define ENC_CODE_LEN   16
 
#define ISO_SYNC0_PULSE   (0x1 << 0)
 
#define ISO_SYNC1_PULSE   (0x1 << 1)
 

Enumerations

enum  iso_op_id_t {
  ISO_READ_ISO_TX_SYNC,
  ISO_SET_CIG_PARAM,
  ISO_REMOVE_CIG,
  ISO_REJECT_CIS_REQ,
  ISO_SET_DATA_PATH,
  ISO_REMOVE_DATA_PATH,
  ISO_PER_ADV_SYNC_TRAN,
  ISO_SET_PER_ADV_SET_INFO_TRAN,
  ISO_SET_PER_ADV_SYNC_TRAN_PARAM,
  ISO_SET_DEFAULT_PER_ADV_SYNC_TRAN_PARAM
}
 Operation ID. More...
 
enum  iso_adv_type_t {
  ISO_ADV_UNDIRECT,
  ISO_ADV_DIRECT
}
 Adv type for announcement. More...
 
enum  iso_add_type_t {
  PUBLIC = 0,
  RANDOM
}
 Address type. More...
 
enum  iso_data_path_type_t {
  DATA_PATH_DISABLE = 0xFF,
  DATA_PATH_HCI = 0x00,
  DATA_PATH_GEN = 0xF2,
  DATA_PATH_GDX = 0xF6
}
 Data path type. More...
 
enum  iso_data_path_direction_t {
  HOST_TO_CONTROLLER = 0x00,
  CONTROLLER_TO_HOST = 0x01,
  DIRECTION_BOTH = 0x02
}
 Data path direction type. More...
 
enum  iso_sca_type_t {
  SCA0 = 0x00,
  SCA1 = 0x01,
  SCA2 = 0x02,
  SCA3 = 0x03,
  SCA4 = 0x04,
  SCA5 = 0x05,
  SCA6 = 0x06,
  SCA7 = 0x07
}
 SCA type. More...
 
enum  iso_packing_type_t {
  PACK_SEQ = 0x00,
  PACK_INT = 0x01
}
 Packing type. More...
 
enum  iso_framing_type_t {
  UNFRAMED = 0x00,
  FRAMED = 0x01
}
 Framing type. More...
 
enum  iso_encryption_type_t {
  UNENCRYPTED = 0x00,
  ENCRYPTED = 0x01
}
 Encryption type. More...
 
enum  iso_sync_mode_t {
  NO_EVT_NO_REPORT = 0x00,
  WITH_EVT_NO_REPORT = 0x01,
  WITH_EVT_WITH_REPORT = 0x02
}
 Sync mode type. More...
 
enum  iso_cte_type_t {
  NOT_SYNC_WITH_AOA = 0x01,
  NOT_SYNC_WITH_AOD_1US = 0x02,
  NOT_SYNC_WITH_AOD_2US = 0x04,
  NOT_SYNC_WITHOUT_CTE = 0x10
}
 Cte type. More...
 
enum  iso_phy_type_t {
  ISO_PHY_1M = 0x01 << 0,
  ISO_PHY_2M = 0x01 << 1,
  ISO_PHY_CODED = 0x01 << 2
}
 Phy type. More...
 
enum  iso_termi_big_reason_t {
  TERMINATE_BY_REMOTE = 0x13,
  TERMINATE_BY_LOCAL = 0x16
}
 Terminate big/big sync reason. More...
 
enum  {
  BLE_GATT_COMMON_EVT_MTU_EXCHANGE = BLE_GATT_COMMON_EVT_BASE,
  BLE_GATT_COMMON_EVT_PRF_REGISTER,
  BLE_GATT_COMMON_EVT_MAX,
  ISO_GPIO_MASK_0 = 0x1,
  ISO_GPIO_MASK_1 = 0x2,
  ISO_GPIO_MASK_2 = 0x4,
  ISO_GPIO_MASK_3 = 0x8,
  ISO_GPIO_MASK_4 = 0x10,
  ISO_GPIO_MASK_5 = 0x20,
  ISO_GPIO_MASK_6 = 0x40,
  ISO_GPIO_MASK_7 = 0x80,
  AMS_PLAYER_ATTR_ID_NAME,
  AMS_PLAYER_ATTR_ID_PLAYBACK_INFO,
  AMS_PLAYER_ATTR_ID_VOLUME,
  IAS_ALERT_NONE,
  IAS_ALERT_MILD,
  IAS_ALERT_HIGH,
  EXFLASH_CONFIG_CACHE_MODE = 0x00,
  EXFLASH_CONFIG_READ_CMD = 0x01,
  EXFLASH_CONFIG_BAUD_RATE = 0x02,
  EXFLASH_CONFIG_CLOCK_MODE = 0x03,
  EXFLASH_CONFIG_CACHE_FLUSH = 0x04,
  EXFLASH_CONFIG_PAGE_TYPE = 0x05,
  DFU_CACHE_TYPE_CALL_STACK = 0x00,
  DFU_CACHE_TYPE_REG,
  TRC_PWR_WFE_MODE = 0,
  TRC_PWR_DSLEEP_MODE,
  TRC_PWR_ACTIVE_MODE,
  TRC_PWR_BLE_RET_DSLEEP,
  TRC_PWR_APP_TIMER_REFUSE,
  TRC_PWR_APP_TIMER_PASS,
  TRC_PWR_BLE_TIMER_REFUSE,
  TRC_PWR_BLE_TIMER_PASS,
  TRC_PWR_RTC_TIMER_REFUSE,
  TRC_PWR_RTC_TIMER_PASS,
  TRC_PWR_RTC1_TIMER_REFUSE,
  TRC_PWR_RTC1_TIMER_PASS,
  TRC_PWR_WDT_TIMER_REFUSE,
  TRC_PWR_WDT_TIMER_PASS
}
 

Functions

uint16_t ble_iso_register_callback (iso_cb_fun_t *cb)
 Register callback for iso. More...
 
void ble_iso_register_ascp_gap_callback (ascp_gap_cb_fun_t *cb)
 Register the gap evetn callback for ascp. More...
 
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. More...
 
uint16_t ble_iso_start_gen_ann (iso_start_gen_ann_t *param)
 Start general audio announcement by using extended adv. More...
 
uint16_t ble_iso_start_target_ann (iso_start_target_ann_t *param)
 Start target audio announcement by using extended adv. More...
 
uint16_t ble_iso_stop_ann (uint8_t adv_idx)
 Stop the audio announcement by using stop adv. More...
 
uint16_t ble_iso_discover_ann (iso_disc_ann_t *param)
 Discovery the audio announcement by using extended scan. More...
 
uint16_t ble_iso_stop_discover_ann (void)
 Stop discovery the audio announcement by stop extended scan. More...
 
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. More...
 
uint16_t ble_iso_stop_sync_bd_ann (uint8_t index)
 Stop sync the broadcast audio announcement. More...
 
uint16_t ble_iso_create_big (iso_create_big_t *param)
 Create the BIG. More...
 
uint16_t ble_iso_terminate_big (uint8_t big_hdl, uint8_t reason)
 Terminate the BIG. More...
 
uint16_t ble_iso_create_big_sync (iso_create_big_sync_t *param)
 Create the BIG sync. More...
 
uint16_t ble_iso_terminate_big_sync (uint8_t big_hdl)
 Terminate the BIG sync. More...
 
uint16_t ble_iso_set_cig_param (iso_set_cig_param_t *param)
 Set CIG paramter. More...
 
uint16_t ble_iso_create_cis (iso_create_cis_t *param)
 Create CIS. More...
 
uint16_t ble_iso_rm_cig (uint8_t cig_id)
 Remove the cig indicated by the cig_id. More...
 
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_hdl. More...
 
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. More...
 
uint16_t ble_iso_disc_cis (uint16_t cis_hdl)
 disconnect the CIS that is identified by the cis_hdl. More...
 
uint16_t ble_iso_set_data_path (iso_set_data_path_t *param)
 Set the ISO data path. More...
 
uint16_t ble_iso_rm_data_path (iso_rm_data_path_t *param)
 Remove the ISO data path. More...
 
uint16_t ble_iso_req_peer_sca (uint16_t conn_idx)
 Read the Sleep Clock Accuracy of the peer device. More...
 
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 BIS identified by the Connection_Handle. More...
 
uint16_t ble_iso_set_data_path_trigger (iso_set_data_path_trigger_t *param)
 Set iso data path trigger. More...
 
uint16_t ble_iso_gpio_enable (uint8_t gpio_sel)
 Un-mask the ISO GPIO. More...
 
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. More...
 

Detailed Description

BLE ISO API.

Attention
#####Copyright (c) 2019 GOODIX All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file ble_iso.h.