feat(ble/bluedroid): Supported BLE bluedroid host pawr connection

This commit is contained in:
zhiweijian
2025-12-30 11:28:15 +08:00
parent fff1b9cf31
commit 37c75157dc
29 changed files with 311 additions and 41 deletions
@@ -1140,7 +1140,8 @@ extern void GATT_StartIf (tGATT_IF gatt_if);
**
*******************************************************************************/
extern BOOLEAN GATT_Connect (tGATT_IF gatt_if, BD_ADDR bd_addr, tBLE_ADDR_TYPE bd_addr_type,
BOOLEAN is_direct, tBT_TRANSPORT transport, BOOLEAN is_aux);
BOOLEAN is_direct, tBT_TRANSPORT transport, BOOLEAN is_aux,
BOOLEAN is_pawr_synced, UINT8 adv_handle, UINT8 subevent);
/*******************************************************************************
@@ -451,6 +451,7 @@
#define HCI_BLE_SET_PERIOD_ADV_SUBEVT_DATA (0x0082 | HCI_GRP_BLE_CMDS)
#define HCI_BLE_SET_PERIOD_ADV_RSP_DATA (0x0083 | HCI_GRP_BLE_CMDS)
#define HCI_BLE_SET_PERIOD_SYNC_SUBEVT (0x0084 | HCI_GRP_BLE_CMDS)
#define HCI_BLE_EXT_CREATE_CONN_V2 (0x0085 | HCI_GRP_BLE_CMDS)
#define HCI_BLE_SET_PERIOD_ADV_PARAMS_V2 (0x0086 | HCI_GRP_BLE_CMDS)
#endif // #if (BT_BLE_FEAT_PAWR_EN == TRUE)
@@ -947,6 +947,10 @@ typedef struct {
} tHCI_ExtConnParams;
typedef struct {
#if (BT_BLE_FEAT_PAWR_EN == TRUE)
UINT8 adv_handle;
UINT8 subevent;
#endif // (BT_BLE_FEAT_PAWR_EN == TRUE)
UINT8 filter_policy;
UINT8 own_addr_type;
UINT8 peer_addr_type;
@@ -1032,6 +1036,10 @@ UINT8 btsnd_hcic_ble_ext_scan_enable(UINT8 enable, UINT8 filter_dups,
BOOLEAN btsnd_hcic_ble_create_ext_conn(tHCI_CreatExtConn *p_conn);
#if (BT_BLE_FEAT_PAWR_EN == TRUE)
BOOLEAN btsnd_hcic_ble_create_ext_conn_v2(tHCI_CreatExtConn *p_conn);
#endif // (BT_BLE_FEAT_PAWR_EN == TRUE)
BOOLEAN btsnd_hcic_ble_periodic_adv_create_sync(UINT8 filter_policy, UINT8 adv_sid,
UINT8 adv_addr_type, BD_ADDR adv_addr,
UINT16 sync_timeout, UINT8 sync_cte_type);
@@ -121,7 +121,7 @@ typedef UINT8 tL2CAP_CHNL_DATA_RATE;
#define L2CAP_FCR_CHAN_OPT_ALL_MASK (L2CAP_FCR_CHAN_OPT_BASIC | L2CAP_FCR_CHAN_OPT_ERTM | L2CAP_FCR_CHAN_OPT_STREAM)
/* Validity check for PSM. PSM values must be odd. Also, all PSM values must
** be assigned such that the least significant bit of the most sigificant
** be assigned such that the least significant bit of the most significant
** octet equals zero.
*/
#define L2C_INVALID_PSM(psm) (((psm) & 0x0101) != 0x0001)
@@ -938,7 +938,7 @@ typedef struct {
**
** Parameters: tL2CAP_UCD_CB_INFO
**
** Return value: TRUE if successs
** Return value: TRUE if success
**
*******************************************************************************/
extern BOOLEAN L2CA_UcdRegister ( UINT16 psm, tL2CAP_UCD_CB_INFO *p_cb_info );
@@ -951,7 +951,7 @@ extern BOOLEAN L2CA_UcdRegister ( UINT16 psm, tL2CAP_UCD_CB_INFO *p_cb_info );
**
** Parameters: PSM
**
** Return value: TRUE if successs
** Return value: TRUE if success
**
*******************************************************************************/
extern BOOLEAN L2CA_UcdDeregister ( UINT16 psm );
@@ -968,7 +968,7 @@ extern BOOLEAN L2CA_UcdDeregister ( UINT16 psm );
** L2CAP_UCD_INFO_TYPE_MTU
**
**
** Return value: TRUE if successs
** Return value: TRUE if success
**
*******************************************************************************/
extern BOOLEAN L2CA_UcdDiscover ( UINT16 psm, BD_ADDR rem_bda, UINT8 info_type );
@@ -1001,7 +1001,7 @@ extern UINT16 L2CA_UcdDataWrite (UINT16 psm, BD_ADDR rem_bda, BT_HDR *p_buf, UIN
** Parameters: BD Addr
** Timeout in second
**
** Return value: TRUE if successs
** Return value: TRUE if success
**
*******************************************************************************/
extern BOOLEAN L2CA_UcdSetIdleTimeout ( BD_ADDR rem_bda, UINT16 timeout );
@@ -1089,7 +1089,8 @@ extern BOOLEAN L2CA_RegisterFixedChannel (UINT16 fixed_cid, tL2CAP_FIXED_CHNL_R
** Return value: TRUE if connection started
**
*******************************************************************************/
extern BOOLEAN L2CA_ConnectFixedChnl (UINT16 fixed_cid, BD_ADDR bd_addr, tBLE_ADDR_TYPE bd_addr_type, BOOLEAN is_aux);
extern BOOLEAN L2CA_ConnectFixedChnl (UINT16 fixed_cid, BD_ADDR bd_addr, tBLE_ADDR_TYPE bd_addr_type, BOOLEAN is_aux,
BOOLEAN is_pawr_synced, UINT8 adv_handle, UINT8 subevent);
/*******************************************************************************
**