Skip to content

Commit f3031da

Browse files
committed
BLE: Disable handling of BT5.2 event in the controller.
These events are not used nor triggered by any of our APIs. It saves ~1.4k of flash
1 parent 557eac0 commit f3031da

File tree

1 file changed

+29
-0
lines changed
  • connectivity/FEATURE_BLE/libraries/cordio_stack/ble-host/sources/hci/dual_chip

1 file changed

+29
-0
lines changed

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ static const hciEvtParse_t hciEvtParseFcnTbl[] =
217217
hciEvtParseLeConnCteReqEnableCmdCmpl,
218218
hciEvtParseLeConnCteRspEnableCmdCmpl,
219219
hciEvtParseLeReadAntennaInfoCmdCmpl,
220+
#if 0
220221
hciEvtParseLeCisEst,
221222
hciEvtParseLeCisReq,
222223
hciEvtParseDisconnectCmpl,
@@ -235,6 +236,26 @@ static const hciEvtParse_t hciEvtParseFcnTbl[] =
235236
hciEvtParseLeBigSyncLost,
236237
hciEvtParseLeBigTermSyncCmpl,
237238
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
238259
};
239260

240261
/* HCI event structure length table, indexed by internal callback event value */
@@ -2583,6 +2604,7 @@ void hciEvtProcessCmdCmpl(uint8_t *p, uint8_t len)
25832604
cbackEvt = HCI_LE_PER_ADV_SET_INFO_TRSF_CMD_CMPL_CBACK_EVT;
25842605
break;
25852606

2607+
#if 0
25862608
case HCI_OPCODE_LE_SET_CIG_PARAMS:
25872609
cbackEvt = HCI_LE_SET_CIG_PARAMS_CMD_CMPL_CBACK_EVT;
25882610
break;
@@ -2618,6 +2640,7 @@ void hciEvtProcessCmdCmpl(uint8_t *p, uint8_t len)
26182640
case HCI_OPCODE_READ_LOCAL_SUP_CONTROLLER_DLY:
26192641
cbackEvt = HCI_READ_LOCAL_SUP_CTR_DLY_CMD_CMPL_CBACK_EVT;
26202642
break;
2643+
#endif
26212644

26222645
default:
26232646
/* test for vendor specific command completion OGF. */
@@ -2851,6 +2874,7 @@ void hciEvtProcessMsg(uint8_t *pEvt)
28512874
cbackEvt = HCI_LE_CTE_REQ_FAILED_CBACK_EVT;
28522875
break;
28532876

2877+
#if 0
28542878
case HCI_LE_CIS_EST_EVT:
28552879
/* if CIS connection created successfully */
28562880
if (*pEvt == HCI_SUCCESS)
@@ -2888,6 +2912,7 @@ void hciEvtProcessMsg(uint8_t *pEvt)
28882912
case HCI_LE_BIG_INFO_ADV_REPORT_EVT:
28892913
cbackEvt = HCI_LE_BIG_INFO_ADV_REPORT_CBACK_EVT;
28902914
break;
2915+
#endif
28912916

28922917
default:
28932918
break;
@@ -2899,11 +2924,13 @@ void hciEvtProcessMsg(uint8_t *pEvt)
28992924

29002925
/* if disconnect is for CIS connection */
29012926
BYTES_TO_UINT16(handle, (pEvt + 1));
2927+
#if 0
29022928
if (hciCoreCisByHandle(handle) != NULL)
29032929
{
29042930
cbackEvt = HCI_CIS_DISCONNECT_CMPL_CBACK_EVT;
29052931
}
29062932
else
2933+
#endif
29072934
{
29082935
cbackEvt = HCI_DISCONNECT_CMPL_CBACK_EVT;
29092936
}
@@ -2991,11 +3018,13 @@ void hciEvtProcessMsg(uint8_t *pEvt)
29913018
BYTES_TO_UINT16(handle, (pEvt + 1));
29923019
hciCoreConnClose(handle);
29933020
}
3021+
#if 0
29943022
else if (cbackEvt == HCI_CIS_DISCONNECT_CMPL_CBACK_EVT)
29953023
{
29963024
BYTES_TO_UINT16(handle, (pEvt + 1));
29973025
hciCoreCisClose(handle);
29983026
}
3027+
#endif
29993028
}
30003029
}
30013030

0 commit comments

Comments
 (0)