Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(BLE): HCI Accessible BLE Stats #1064

Merged
merged 5 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified Libraries/BlePhy/MAX32665/libphy.a
Binary file not shown.
Binary file modified Libraries/BlePhy/MAX32665/libphy_hard.a
Binary file not shown.
117 changes: 0 additions & 117 deletions Libraries/BlePhy/MAX32665/libphy_hardfp.log

This file was deleted.

18 changes: 17 additions & 1 deletion Libraries/Cordio/controller/include/ble/bb_ble_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,14 @@ uint16_t BbBleInitPeriodicList(uint8_t numEntries, uint8_t *pFreeMem, uint32_t f
*/
/*************************************************************************************************/
void BbBleGetAdvStats(BbBleAdvPktStats_t *pStats);

/*************************************************************************************************/
/*!
* \brief Reset scan packet statistics.
*
* \return None.
*/
/*************************************************************************************************/
void BbBleResetAdvStats(void);
/*************************************************************************************************/
/*!
* \brief Get scan packet statistics.
Expand All @@ -314,6 +321,15 @@ void BbBleGetAdvStats(BbBleAdvPktStats_t *pStats);
/*************************************************************************************************/
void BbBleGetScanStats(BbBleScanPktStats_t *pStats);

/*************************************************************************************************/
/*!
* \brief Reset scan packet statistics.
*
* \return None.
*/
/*************************************************************************************************/
void BbBleResetScanStats(void);

/*************************************************************************************************/
/*!
* \brief Get auxiliary advertising packet statistics.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -600,3 +600,7 @@ void BbBleGetScanStats(BbBleScanPktStats_t *pStats)
{
*pStats = bbScanStats;
}
void BbBleResetScanStats(void)
{
memset(&bbScanStats, 0, sizeof(BbBleScanPktStats_t));
}
4 changes: 4 additions & 0 deletions Libraries/Cordio/controller/sources/ble/bb/bb_ble_adv_slave.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,3 +465,7 @@ void BbBleGetAdvStats(BbBleAdvPktStats_t *pStats)
{
*pStats = bbAdvStats;
}
void BbBleResetAdvStats(void)
{
memset(&bbAdvStats, 0, sizeof(BbBleAdvPktStats_t));
}
14 changes: 7 additions & 7 deletions Libraries/Cordio/controller/sources/ble/lhci/lhci_cmd_vs.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,16 +218,16 @@ bool_t lhciCommonVsStdDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf)
evtParamLen += sizeof(int8_t);
break;
}
case LHCI_OPCODE_VS_PHY_EN:
case LHCI_OPCODE_VS_RESET_ADV_STATS:
{
status = LL_SUCCESS;
PalBbEnable();
BbBleResetAdvStats();
break;
}
case LHCI_OPCODE_VS_PHY_DIS:
case LHCI_OPCODE_VS_RESET_SCAN_STATS:
{
status = LL_SUCCESS;
PalBbDisable();
BbBleResetScanStats();
break;
}

Expand Down Expand Up @@ -255,9 +255,8 @@ bool_t lhciCommonVsStdDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf)
case LHCI_OPCODE_VS_REG_WRITE:
case LHCI_OPCODE_VS_RX_TEST:
case LHCI_OPCODE_VS_TX_TEST:
case LHCI_OPCODE_VS_PHY_EN:
case LHCI_OPCODE_VS_PHY_DIS:

case LHCI_OPCODE_VS_RESET_ADV_STATS:
case LHCI_OPCODE_VS_RESET_SCAN_STATS:

/* no action */
break;
Expand All @@ -270,6 +269,7 @@ bool_t lhciCommonVsStdDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf)
/*
TODO: Needs feature in PHY
*/
// PalBbEnable();
pBuf[0] = -10;
break;
}
Expand Down
4 changes: 2 additions & 2 deletions Libraries/Cordio/controller/sources/ble/lhci/lhci_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -369,10 +369,10 @@ extern "C" {
#define LHCI_OPCODE_VS_GET_RSSI \
HCI_OPCODE(HCI_OGF_VENDOR_SPEC, \
0x306) /*!<Vendor specific Get RSSI*/
#define LHCI_OPCODE_VS_PHY_EN \
#define LHCI_OPCODE_VS_RESET_ADV_STATS \
HCI_OPCODE(HCI_OGF_VENDOR_SPEC, \
0x307) /*!<Vendor specific Get RSSI*/
#define LHCI_OPCODE_VS_PHY_DIS \
#define LHCI_OPCODE_VS_RESET_SCAN_STATS \
HCI_OPCODE(HCI_OGF_VENDOR_SPEC, \
0x308) /*!<Vendor specific Get RSSI*/
/* Vendor specific event masks. */
Expand Down
Loading