diff --git a/connectivity/FEATURE_BLE/libraries/cordio_stack/ble-host/sources/hci/dual_chip/hci_evt.c b/connectivity/FEATURE_BLE/libraries/cordio_stack/ble-host/sources/hci/dual_chip/hci_evt.c index 9b6bb0f92d..6e507c693c 100644 --- a/connectivity/FEATURE_BLE/libraries/cordio_stack/ble-host/sources/hci/dual_chip/hci_evt.c +++ b/connectivity/FEATURE_BLE/libraries/cordio_stack/ble-host/sources/hci/dual_chip/hci_evt.c @@ -217,7 +217,7 @@ static const hciEvtParse_t hciEvtParseFcnTbl[] = hciEvtParseLeConnCteReqEnableCmdCmpl, hciEvtParseLeConnCteRspEnableCmdCmpl, hciEvtParseLeReadAntennaInfoCmdCmpl, -#if 0 +#if HCI_VER_BT >= HCI_VER_BT_CORE_SPEC_5_2 hciEvtParseLeCisEst, hciEvtParseLeCisReq, hciEvtParseDisconnectCmpl, @@ -236,26 +236,7 @@ static const hciEvtParse_t hciEvtParseFcnTbl[] = hciEvtParseLeBigSyncLost, hciEvtParseLeBigTermSyncCmpl, hciEvtParseLeBigInfoAdvRpt -#else - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, -#endif +#endif // HCI_VER_BT_CORE_SPEC_5_2 }; /* HCI event structure length table, indexed by internal callback event value */ @@ -329,6 +310,7 @@ static const uint8_t hciEvtCbackLen[] = sizeof(hciLeConnCteReqEnableCmdCmplEvt_t), sizeof(hciLeConnCteRspEnableCmdCmplEvt_t), sizeof(hciLeReadAntennaInfoCmdCmplEvt_t), +#if HCI_VER_BT >= HCI_VER_BT_CORE_SPEC_5_2 sizeof(HciLeCisEstEvt_t), sizeof(HciLeCisReqEvt_t), sizeof(hciDisconnectCmplEvt_t), @@ -347,6 +329,7 @@ static const uint8_t hciEvtCbackLen[] = sizeof(HciLeBigSyncLostEvt_t), sizeof(HciLeBigTermSyncCmplEvt_t), sizeof(HciLeBigInfoAdvRptEvt_t) +#endif }; /* Global event statistics. */ @@ -2604,7 +2587,7 @@ void hciEvtProcessCmdCmpl(uint8_t *p, uint8_t len) cbackEvt = HCI_LE_PER_ADV_SET_INFO_TRSF_CMD_CMPL_CBACK_EVT; break; -#if 0 +#if HCI_VER_BT >= HCI_VER_BT_CORE_SPEC_5_2 case HCI_OPCODE_LE_SET_CIG_PARAMS: cbackEvt = HCI_LE_SET_CIG_PARAMS_CMD_CMPL_CBACK_EVT; break; @@ -2874,7 +2857,7 @@ void hciEvtProcessMsg(uint8_t *pEvt) cbackEvt = HCI_LE_CTE_REQ_FAILED_CBACK_EVT; break; -#if 0 +#if HCI_VER_BT >= HCI_VER_BT_CORE_SPEC_5_2 case HCI_LE_CIS_EST_EVT: /* if CIS connection created successfully */ if (*pEvt == HCI_SUCCESS) @@ -2924,7 +2907,7 @@ void hciEvtProcessMsg(uint8_t *pEvt) /* if disconnect is for CIS connection */ BYTES_TO_UINT16(handle, (pEvt + 1)); -#if 0 +#if HCI_VER_BT >= HCI_VER_BT_CORE_SPEC_5_2 if (hciCoreCisByHandle(handle) != NULL) { cbackEvt = HCI_CIS_DISCONNECT_CMPL_CBACK_EVT; @@ -3018,7 +3001,7 @@ void hciEvtProcessMsg(uint8_t *pEvt) BYTES_TO_UINT16(handle, (pEvt + 1)); hciCoreConnClose(handle); } -#if 0 +#if HCI_VER_BT >= HCI_VER_BT_CORE_SPEC_5_2 else if (cbackEvt == HCI_CIS_DISCONNECT_CMPL_CBACK_EVT) { BYTES_TO_UINT16(handle, (pEvt + 1)); diff --git a/connectivity/FEATURE_BLE/libraries/cordio_stack/wsf/include/hci_defs.h b/connectivity/FEATURE_BLE/libraries/cordio_stack/wsf/include/hci_defs.h index 69eeffa0eb..c6ebb3dc4f 100644 --- a/connectivity/FEATURE_BLE/libraries/cordio_stack/wsf/include/hci_defs.h +++ b/connectivity/FEATURE_BLE/libraries/cordio_stack/wsf/include/hci_defs.h @@ -1421,6 +1421,11 @@ extern "C" { #define HCI_VER_BT_CORE_SPEC_5_2 0x0B /*!< Bluetooth core specification 5.2 */ /**@}*/ +#ifndef HCI_VER_BT +#define HCI_VER_BT HCI_VER_BT_CORE_SPEC_5_1 +#endif + + /** \name Parameter lengths * */