Skip to content

Commit ad37f56

Browse files
committed
BLE: Set host default version to 5.1
Disable 5.2 event handling if not enabled.
1 parent 87ea47f commit ad37f56

File tree

2 files changed

+13
-25
lines changed
  • connectivity/FEATURE_BLE/libraries/cordio_stack

2 files changed

+13
-25
lines changed

connectivity/FEATURE_BLE/libraries/cordio_stack/ble-host/sources/hci/dual_chip/hci_evt.c

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ static const hciEvtParse_t hciEvtParseFcnTbl[] =
217217
hciEvtParseLeConnCteReqEnableCmdCmpl,
218218
hciEvtParseLeConnCteRspEnableCmdCmpl,
219219
hciEvtParseLeReadAntennaInfoCmdCmpl,
220-
#if 0
220+
#if HCI_VER_BT >= HCI_VER_BT_CORE_SPEC_5_2
221221
hciEvtParseLeCisEst,
222222
hciEvtParseLeCisReq,
223223
hciEvtParseDisconnectCmpl,
@@ -236,26 +236,7 @@ static const hciEvtParse_t hciEvtParseFcnTbl[] =
236236
hciEvtParseLeBigSyncLost,
237237
hciEvtParseLeBigTermSyncCmpl,
238238
hciEvtParseLeBigInfoAdvRpt
239-
#else
240-
NULL,
241-
NULL,
242-
NULL,
243-
NULL,
244-
NULL,
245-
NULL,
246-
NULL,
247-
NULL,
248-
NULL,
249-
NULL,
250-
NULL,
251-
NULL,
252-
NULL,
253-
NULL,
254-
NULL,
255-
NULL,
256-
NULL,
257-
NULL,
258-
#endif
239+
#endif // HCI_VER_BT_CORE_SPEC_5_2
259240
};
260241

261242
/* HCI event structure length table, indexed by internal callback event value */
@@ -329,6 +310,7 @@ static const uint8_t hciEvtCbackLen[] =
329310
sizeof(hciLeConnCteReqEnableCmdCmplEvt_t),
330311
sizeof(hciLeConnCteRspEnableCmdCmplEvt_t),
331312
sizeof(hciLeReadAntennaInfoCmdCmplEvt_t),
313+
#if HCI_VER_BT >= HCI_VER_BT_CORE_SPEC_5_2
332314
sizeof(HciLeCisEstEvt_t),
333315
sizeof(HciLeCisReqEvt_t),
334316
sizeof(hciDisconnectCmplEvt_t),
@@ -347,6 +329,7 @@ static const uint8_t hciEvtCbackLen[] =
347329
sizeof(HciLeBigSyncLostEvt_t),
348330
sizeof(HciLeBigTermSyncCmplEvt_t),
349331
sizeof(HciLeBigInfoAdvRptEvt_t)
332+
#endif
350333
};
351334

352335
/* Global event statistics. */
@@ -2604,7 +2587,7 @@ void hciEvtProcessCmdCmpl(uint8_t *p, uint8_t len)
26042587
cbackEvt = HCI_LE_PER_ADV_SET_INFO_TRSF_CMD_CMPL_CBACK_EVT;
26052588
break;
26062589

2607-
#if 0
2590+
#if HCI_VER_BT >= HCI_VER_BT_CORE_SPEC_5_2
26082591
case HCI_OPCODE_LE_SET_CIG_PARAMS:
26092592
cbackEvt = HCI_LE_SET_CIG_PARAMS_CMD_CMPL_CBACK_EVT;
26102593
break;
@@ -2874,7 +2857,7 @@ void hciEvtProcessMsg(uint8_t *pEvt)
28742857
cbackEvt = HCI_LE_CTE_REQ_FAILED_CBACK_EVT;
28752858
break;
28762859

2877-
#if 0
2860+
#if HCI_VER_BT >= HCI_VER_BT_CORE_SPEC_5_2
28782861
case HCI_LE_CIS_EST_EVT:
28792862
/* if CIS connection created successfully */
28802863
if (*pEvt == HCI_SUCCESS)
@@ -2924,7 +2907,7 @@ void hciEvtProcessMsg(uint8_t *pEvt)
29242907

29252908
/* if disconnect is for CIS connection */
29262909
BYTES_TO_UINT16(handle, (pEvt + 1));
2927-
#if 0
2910+
#if HCI_VER_BT >= HCI_VER_BT_CORE_SPEC_5_2
29282911
if (hciCoreCisByHandle(handle) != NULL)
29292912
{
29302913
cbackEvt = HCI_CIS_DISCONNECT_CMPL_CBACK_EVT;
@@ -3018,7 +3001,7 @@ void hciEvtProcessMsg(uint8_t *pEvt)
30183001
BYTES_TO_UINT16(handle, (pEvt + 1));
30193002
hciCoreConnClose(handle);
30203003
}
3021-
#if 0
3004+
#if HCI_VER_BT >= HCI_VER_BT_CORE_SPEC_5_2
30223005
else if (cbackEvt == HCI_CIS_DISCONNECT_CMPL_CBACK_EVT)
30233006
{
30243007
BYTES_TO_UINT16(handle, (pEvt + 1));

connectivity/FEATURE_BLE/libraries/cordio_stack/wsf/include/hci_defs.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,6 +1421,11 @@ extern "C" {
14211421
#define HCI_VER_BT_CORE_SPEC_5_2 0x0B /*!< Bluetooth core specification 5.2 */
14221422
/**@}*/
14231423

1424+
#ifndef HCI_VER_BT
1425+
#define HCI_VER_BT HCI_VER_BT_CORE_SPEC_5_1
1426+
#endif
1427+
1428+
14241429
/** \name Parameter lengths
14251430
*
14261431
*/

0 commit comments

Comments
 (0)