diff options
| author | jacqueline <me@jacqueline.id.au> | 2025-07-25 13:33:07 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2025-07-25 13:33:07 +1000 |
| commit | c8e79a926620e48830778714cfe4b2ea2453fcaf (patch) | |
| tree | 8c756e08e01b8e147cf72bec128026f46bd854c5 /lib/bt/host/bluedroid/stack/btm/include | |
| parent | 237136f3e93cb6b5be24670d7520adb17cc0fa36 (diff) | |
| download | tangara-fw-c8e79a926620e48830778714cfe4b2ea2453fcaf.tar.gz | |
Update forked idf components
Diffstat (limited to 'lib/bt/host/bluedroid/stack/btm/include')
| -rw-r--r-- | lib/bt/host/bluedroid/stack/btm/include/btm_ble_int.h | 71 | ||||
| -rw-r--r-- | lib/bt/host/bluedroid/stack/btm/include/btm_int.h | 38 |
2 files changed, 98 insertions, 11 deletions
diff --git a/lib/bt/host/bluedroid/stack/btm/include/btm_ble_int.h b/lib/bt/host/bluedroid/stack/btm/include/btm_ble_int.h index 0f8888fb..de25c6fa 100644 --- a/lib/bt/host/bluedroid/stack/btm/include/btm_ble_int.h +++ b/lib/bt/host/bluedroid/stack/btm/include/btm_ble_int.h @@ -212,11 +212,14 @@ typedef struct { #define BTM_BLE_MAX_BG_CONN_DEV_NUM 10 typedef struct { + UINT16 scan_interval; + UINT16 scan_window; UINT16 min_conn_int; UINT16 max_conn_int; UINT16 slave_latency; UINT16 supervision_tout; - + UINT16 min_ce_len; + UINT16 max_ce_len; } tBTM_LE_CONN_PRAMS; @@ -339,10 +342,10 @@ typedef struct { tBTM_INQ_RESULTS_CB *p_scan_results_cb; tBTM_CMPL_CB *p_scan_cmpl_cb; TIMER_LIST_ENT scan_timer_ent; - +#if (BLE_42_SCAN_EN == TRUE) struct pkt_queue *adv_rpt_queue; struct osi_event *adv_rpt_ready; - +#endif // #if (BLE_42_SCAN_EN == TRUE) /* background connection procedure cb value */ tBTM_BLE_CONN_TYPE bg_conn_type; UINT32 scan_int; @@ -350,6 +353,10 @@ typedef struct { tBTM_BLE_SEL_CBACK *p_select_cback; /* white list information */ UINT8 white_list_avail_size; +#if (BLE_50_EXTEND_SYNC_EN == TRUE) + /* periodic list information */ + UINT8 periodic_adv_list_size; +#endif //#if (BLE_50_EXTEND_SYNC_EN == TRUE) tBTM_UPDATE_WHITELIST_CBACK *update_wl_cb; tBTM_BLE_WL_STATE wl_state; @@ -377,6 +384,8 @@ typedef struct { tBTM_BLE_STATE_MASK cur_states; /* bit mask of tBTM_BLE_STATE */ UINT8 link_count[2]; /* total link count master and slave*/ tBTM_UPDATE_DUPLICATE_EXCEPTIONAL_LIST_CMPL_CBACK *update_exceptional_list_cmp_cb; + tBTM_SET_CSA_SUPPORT_CMPL_CBACK *set_csa_support_cmpl_cb; + tBTM_SET_VENDOR_EVT_MASK_CBACK *set_vendor_evt_mask_cmpl_cb; } tBTM_BLE_CB; #ifdef __cplusplus @@ -384,12 +393,14 @@ extern "C" { #endif void btm_ble_timeout(TIMER_LIST_ENT *p_tle); +#if (BLE_42_SCAN_EN == TRUE) void btm_ble_process_adv_pkt (UINT8 *p); void btm_ble_process_adv_discard_evt(UINT8 *p); void btm_ble_process_direct_adv_pkt (UINT8 *p); bool btm_ble_adv_pkt_ready(void); bool btm_ble_adv_pkt_post(pkt_linked_item_t *pkt); void btm_ble_proc_scan_rsp_rpt (UINT8 *p); +#endif // #if (BLE_42_SCAN_EN == TRUE) tBTM_STATUS btm_ble_read_remote_name(BD_ADDR remote_bda, tBTM_INQ_INFO *p_cur, tBTM_CMPL_CB *p_cb); BOOLEAN btm_ble_cancel_remote_name(BD_ADDR remote_bda); @@ -405,7 +416,11 @@ void btm_ble_init (void); void btm_ble_free (void); void btm_ble_connected (UINT8 *bda, UINT16 handle, UINT8 enc_mode, UINT8 role, tBLE_ADDR_TYPE addr_type, BOOLEAN addr_matched); void btm_ble_read_remote_features_complete(UINT8 *p); + +#if (BLE_42_ADV_EN == TRUE) void btm_ble_write_adv_enable_complete(UINT8 *p); +#endif // #if (BLE_42_ADV_EN == TRUE) + void btm_ble_conn_complete(UINT8 *p, UINT16 evt_len, BOOLEAN enhanced); void btm_read_ble_local_supported_states_complete(UINT8 *p, UINT16 evt_len); tBTM_BLE_CONN_ST btm_ble_get_conn_st(void); @@ -455,9 +470,12 @@ void btm_ble_remove_from_white_list_complete(UINT8 *p, UINT16 evt_len); void btm_ble_clear_white_list_complete(UINT8 *p, UINT16 evt_len); void btm_ble_white_list_init(UINT8 white_list_size); +#if (tGATT_BG_CONN_DEV == TRUE) /* background connection function */ BOOLEAN btm_ble_suspend_bg_conn(void); BOOLEAN btm_ble_resume_bg_conn(void); +#endif // #if (tGATT_BG_CONN_DEV == TRUE) + void btm_ble_initiate_select_conn(BD_ADDR bda); BOOLEAN btm_ble_start_auto_conn(BOOLEAN start); BOOLEAN btm_ble_start_select_conn(BOOLEAN start, tBTM_BLE_SEL_CBACK *p_select_cback); @@ -500,12 +518,14 @@ void btm_ble_add_default_entry_to_resolving_list(void); void btm_ble_set_privacy_mode_complete(UINT8 *p, UINT16 evt_len); #endif +#if (BLE_HOST_BLE_MULTI_ADV_EN == TRUE) void btm_ble_multi_adv_configure_rpa (tBTM_BLE_MULTI_ADV_INST *p_inst); void btm_ble_multi_adv_init(void); void *btm_ble_multi_adv_get_ref(UINT8 inst_id); void btm_ble_multi_adv_cleanup(void); void btm_ble_multi_adv_reenable(UINT8 inst_id); void btm_ble_multi_adv_enb_privacy(BOOLEAN enable); +#endif // #if (BLE_HOST_BLE_MULTI_ADV_EN == TRUE) char btm_ble_map_adv_tx_power(int tx_power_index); void btm_ble_batchscan_init(void); void btm_ble_batchscan_cleanup(void); @@ -536,12 +556,57 @@ void btm_ble_channel_select_algorithm_evt(tBTM_BLE_CHANNEL_SEL_ALG *params); void btm_ble_periodic_adv_report_evt(tBTM_PERIOD_ADV_REPORT *params); void btm_ble_periodic_adv_sync_lost_evt(tBTM_BLE_PERIOD_ADV_SYNC_LOST *params); void btm_ble_periodic_adv_sync_establish_evt(tBTM_BLE_PERIOD_ADV_SYNC_ESTAB *params); +#if (BLE_50_EXTEND_SYNC_EN == TRUE) +void btm_ble_periodic_adv_list_init(UINT8 periodic_adv_size); +#endif //#if (BLE_50_EXTEND_SYNC_EN == TRUE) #endif // #if (BLE_50_FEATURE_SUPPORT == TRUE) #if (BLE_FEAT_PERIODIC_ADV_SYNC_TRANSFER == TRUE) void btm_ble_periodic_adv_sync_trans_recv_evt(tBTM_BLE_PERIOD_ADV_SYNC_TRANS_RECV *params); #endif // #if (BLE_FEAT_PERIODIC_ADV_SYNC_TRANSFER == TRUE) +#if (BLE_FEAT_ISO_EN == TRUE) +#if (BLE_FEAT_ISO_CIG_EN == TRUE) +void btm_ble_cis_established_evt(tBTM_BLE_CIS_ESTABLISHED_CMPL *params); +void btm_ble_cis_disconnected_evt(tBTM_BLE_CIS_DISCON_CMPL *params); +#endif // #if (BLE_FEAT_ISO_CIG_EN == TRUE) +void btm_ble_iso_read_iso_tx_sync_complete(UINT8 *p); +void btm_ble_iso_read_iso_link_quality_complete(UINT8 *p); +#if (BLE_FEAT_ISO_CIG_PERIPHERAL_EN == TRUE) +void btm_ble_cis_request_evt(tBTM_BLE_CIS_REQUEST_CMPL *params); +void btm_ble_accept_cis_req_cmd_status(tBTM_BLE_ISO_CB_PARAMS *cb_params); +#endif // #if (BLE_FEAT_ISO_CIG_PERIPHERAL_EN == TRUE) +#if (BLE_FEAT_ISO_CIG_CENTRAL_EN == TRUE) +void btm_ble_create_cis_cmd_status(tBTM_BLE_ISO_CB_PARAMS *cb_params); +void btm_ble_iso_set_cig_params_complete(UINT8 *p); +#endif // #if (BLE_FEAT_ISO_CIG_CENTRAL_EN == TRUE) +#if (BLE_FEAT_ISO_BIG_BROCASTER_EN == TRUE) +void btm_ble_big_create_cmpl_evt(tBTM_BLE_BIG_CREATE_CMPL *param); +void btm_ble_big_terminate_cmpl_evt(tBTM_BLE_BIG_TERMINATE_CMPL *params); +#endif // #if (BLE_FEAT_ISO_BIG_BROCASTER_EN == TRUE) +#if (BLE_FEAT_ISO_BIG_SYNCER_EN == TRUE) +void btm_ble_big_sync_estab_evt(tBTM_BLE_BIG_SYNC_ESTAB_CMPL *params); +void btm_ble_big_sync_lost_evt(tBTM_BLE_BIG_SYNC_LOST_EVT *params); +void btm_ble_biginfo_adv_report_evt(tBTM_BLE_BIGINFO_ADV_REPORT_EVT *params); +#endif // #if (BLE_FEAT_ISO_BIG_SYNCER_EN == TRUE) +void btm_ble_iso_data_path_update_complete(UINT16 opcode, UINT8 hci_status, UINT16 conn_handle); +#endif // #if (BLE_FEAT_ISO_EN == TRUE) + +#if (BLE_FEAT_CTE_EN == TRUE) +void btm_ble_cte_read_ant_infor_complete(UINT8 *p); +void btm_ble_connless_iq_report_evt(tBTM_BLE_CTE_CONNLESS_IQ_REPORT_EVT *params); +void btm_ble_conn_iq_report_evt(tBTM_BLE_CTE_CONN_IQ_REPORT_EVT *params); +void btm_ble_cte_req_failed_evt(tBTM_BLE_CTE_REQ_FAILED_EVT *params); +#endif // #if (BLE_FEAT_CTE_EN == TRUE) + +#if (BLE_FEAT_POWER_CONTROL_EN == TRUE) +void btm_ble_path_loss_threshold_evt(tBTM_BLE_PATH_LOSS_THRESHOLD_EVT *params); +void btm_ble_transmit_power_report_evt(tBTM_BLE_TRANS_POWER_REPORT_EVT *params); +#endif // #if (BLE_FEAT_POWER_CONTROL_EN == TRUE) +#if (BLE_FEAT_CONN_SUBRATING == TRUE) +void btm_ble_subrate_change_evt(tBTM_BLE_SUBRATE_CHANGE_EVT *params); +#endif // #if (BLE_FEAT_CONN_SUBRATING == TRUE) + /* #ifdef __cplusplus } diff --git a/lib/bt/host/bluedroid/stack/btm/include/btm_int.h b/lib/bt/host/bluedroid/stack/btm/include/btm_int.h index 3d01a5c2..d5b69c68 100644 --- a/lib/bt/host/bluedroid/stack/btm/include/btm_int.h +++ b/lib/bt/host/bluedroid/stack/btm/include/btm_int.h @@ -43,13 +43,12 @@ typedef struct tBTM_SEC_DEV_REC tBTM_SEC_DEV_REC; #include "stack/smp_api.h" #endif -#define ESP_VS_REM_LEGACY_AUTH_CMP 0x03 - #if BTM_MAX_LOC_BD_NAME_LEN > 0 typedef char tBTM_LOC_BD_NAME[BTM_MAX_LOC_BD_NAME_LEN + 1]; #endif #define BTM_ACL_IS_CONNECTED(bda) (btm_bda_to_acl (bda, BT_TRANSPORT_BR_EDR) != NULL) +#define BTM_LE_ACL_IS_CONNECTED(bda) (btm_bda_to_acl (bda, BT_TRANSPORT_LE) != NULL) /* Definitions for Server Channel Number (SCN) management */ @@ -192,6 +191,10 @@ tBTM_CMPL_CB *p_rln_cmpl_cb; /* Callback function to be called when TIMER_LIST_ENT rssi_timer; tBTM_CMPL_CB *p_rssi_cmpl_cb; /* Callback function to be called when */ /* read rssi function completes */ + +tBTM_CMPL_CB *p_ble_ch_map_cmpl_cb; /* Callback function to be called when */ +/* read channel map function completes */ + TIMER_LIST_ENT lnk_quality_timer; tBTM_CMPL_CB *p_lnk_qual_cmpl_cb;/* Callback function to be called when */ /* read link quality function completes */ @@ -207,8 +210,10 @@ tBTM_ROLE_SWITCH_CMPL switch_role_ref_data; tBTM_CMPL_CB *p_switch_role_cb; /* Callback function to be called when */ /* requested switch role is completed */ +#if (BLE_HOST_READ_TX_POWER_EN == TRUE) TIMER_LIST_ENT tx_power_timer; tBTM_CMPL_CB *p_tx_power_cmpl_cb;/* Callback function to be called */ +#endif // #if (BLE_HOST_READ_TX_POWER_EN == TRUE) #if CLASSIC_BT_INCLUDED == TRUE TIMER_LIST_ENT afh_channels_timer; @@ -469,7 +474,6 @@ typedef struct { tSCO_CONN sco_db[BTM_MAX_SCO_LINKS]; tBTM_ESCO_PARAMS def_esco_parms; BD_ADDR xfer_addr; - UINT16 sco_disc_reason; BOOLEAN esco_supported; /* TRUE if 1.2 cntlr AND supports eSCO links */ tBTM_SCO_TYPE desired_sco_mode; tBTM_SCO_TYPE xfer_sco_type; @@ -724,14 +728,18 @@ struct tBTM_SEC_DEV_REC{ */ typedef struct { #if BTM_MAX_LOC_BD_NAME_LEN > 0 +#if (CLASSIC_BT_INCLUDED == TRUE) tBTM_LOC_BD_NAME bredr_bd_name; /* local BREDR device name */ +#endif // #if (CLASSIC_BT_INCLUDED == TRUE) tBTM_LOC_BD_NAME ble_bd_name; /* local BLE device name */ #endif +#if (CLASSIC_BT_INCLUDED == TRUE) BOOLEAN pin_type; /* TRUE if PIN type is fixed */ UINT8 pin_code_len; /* Bonding information */ PIN_CODE pin_code; /* PIN CODE if pin type is fixed */ - BOOLEAN connectable; /* If TRUE page scan should be enabled */ - UINT8 def_inq_scan_mode; /* ??? limited/general/none */ + // BOOLEAN connectable; /* If TRUE page scan should be enabled */ + // UINT8 def_inq_scan_mode; /* ??? limited/general/none */ +#endif // #if (CLASSIC_BT_INCLUDED == TRUE) } tBTM_CFG; enum { @@ -885,6 +893,7 @@ typedef struct { UINT16 ediv; /* received ediv value from LTK request */ UINT8 key_size; tBTM_BLE_VSC_CB cmn_ble_vsc_cb; + BOOLEAN addr_res_en; /* internal use for test: address resolution enable/disable */ #endif /* Packet types supported by the local device */ @@ -951,7 +960,7 @@ typedef struct { #endif // SMP_INCLUDED == TRUE || BT_CLASSIC_ENABLED == TRUE list_t *p_sec_dev_rec_list; tBTM_SEC_SERV_REC *p_out_serv; - tBTM_MKEY_CALLBACK *mkey_cback; + // tBTM_MKEY_CALLBACK *mkey_cback; BD_ADDR connecting_bda; DEV_CLASS connecting_dc; @@ -1063,6 +1072,7 @@ void btm_cont_rswitch (tACL_CONN *p, tACL_CONN *btm_handle_to_acl (UINT16 hci_handle); void btm_read_link_policy_complete (UINT8 *p); void btm_read_rssi_complete (UINT8 *p); +void btm_read_channel_map_complete (UINT8 *p); void btm_read_tx_power_complete (UINT8 *p, BOOLEAN is_ble); void btm_acl_pkt_types_changed(UINT8 status, UINT16 handle, UINT16 pkt_types); void btm_read_link_quality_complete (UINT8 *p); @@ -1113,17 +1123,29 @@ void btm_read_phy_callback(uint8_t hci_status, uint16_t conn_handle, uint8_t tx_ #if (BLE_FEAT_PERIODIC_ADV_SYNC_TRANSFER == TRUE) void btm_ble_periodic_adv_sync_trans_complete(UINT16 op_code, UINT8 hci_status, UINT16 conn_handle); #endif +void btm_ble_big_sync_terminate_complete(UINT8 hci_status, UINT8 big_handle); + +#if (BLE_FEAT_POWER_CONTROL_EN == TRUE) +void btm_enh_read_trans_pwr_level_cmpl_evt(uint8_t *p); +void btm_read_remote_trans_pwr_level_cmpl(UINT8 status); +#endif // #if (BLE_FEAT_POWER_CONTROL_EN == TRUE) + +#if (BLE_FEAT_CONN_SUBRATING == TRUE) +void btm_subrate_req_cmd_status(UINT8 status); +#endif // #if (BLE_FEAT_CONN_SUBRATING == TRUE) + /* Internal functions provided by btm_sco.c ******************************************** */ void btm_sco_init (void); +void btm_sco_free(void); void btm_sco_connected (UINT8 hci_status, BD_ADDR bda, UINT16 hci_handle, tBTM_ESCO_DATA *p_esco_data); void btm_esco_proc_conn_chg (UINT8 status, UINT16 handle, UINT8 tx_interval, UINT8 retrans_window, UINT16 rx_pkt_len, UINT16 tx_pkt_len); void btm_sco_conn_req (BD_ADDR bda, DEV_CLASS dev_class, UINT8 link_type); -void btm_sco_removed (UINT16 hci_handle, UINT8 reason); +BOOLEAN btm_sco_removed (UINT16 hci_handle, UINT8 reason); void btm_sco_acl_removed (BD_ADDR bda); void btm_route_sco_data (BT_HDR *p_msg); BOOLEAN btm_is_sco_active (UINT16 handle); @@ -1203,7 +1225,7 @@ void btm_sec_auth_complete (UINT16 handle, UINT8 status); void btm_sec_encrypt_change (UINT16 handle, UINT8 status, UINT8 encr_enable); void btm_sec_connected (UINT8 *bda, UINT16 handle, UINT8 status, UINT8 enc_mode); tBTM_STATUS btm_sec_disconnect (UINT16 handle, UINT8 reason); -void btm_sec_disconnected (UINT16 handle, UINT8 reason); +BOOLEAN btm_sec_disconnected (UINT16 handle, UINT8 reason); void btm_sec_rmt_name_request_complete (UINT8 *bd_addr, UINT8 *bd_name, UINT8 status); void btm_sec_rmt_host_support_feat_evt (UINT8 *p); void btm_io_capabilities_req (UINT8 *p); |
