-
Notifications
You must be signed in to change notification settings - Fork 3k
BLE: NRF52 returns used tx/rx phy on phy update callback #9220
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
Conversation
@desmond-blue, thank you for your changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the submission, could you add a conversion function that maps phy values from the nordic domain to the mbed domain ? There is already few conversion functions in the anonymous namespace at the top of the file.
ble::phy_t convert_phy(uint8_t nordic_phy)
{
switch(evt.rx_phy) {
case BLE_GAP_PHY_1MBPS:
return ble::phy_t::LE_1M;
case BLE_GAP_PHY_2MBPS:
return ble::phy_t::LE_2M;
case BLE_GAP_PHY_CODED:
return ble::phy_t::LE_CODED;
default:
return ble::phy_t::NONE;
}
}
// in on_phy_update
_eventHandler->onPhyUpdateComplete(
status,
connection,
convert_phy(evt.tx_phy),
convert_phy(evt.rx_phy)
);
fd7119e
to
f281e06
Compare
Thanks for the reviewing, I change the code accordingly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
CI started |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Description
The on phy upate callback function of NRF52, which is nRF5xGap::on_phy_update(), doesn't respect to used tx/rx phy, the parameters are hard-coded to LE_1M.
Those parameters should be set according to event from btle_handler()
Pull request type
Reviewers