File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed
features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_NRF52/source Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,23 @@ peer_address_type_t convert_identity_address(advertising_peer_address_type_t add
115
115
}
116
116
}
117
117
118
+ ble::phy_t convert_phy (uint8_t nordic_phy)
119
+ {
120
+ switch (nordic_phy) {
121
+ case BLE_GAP_PHY_1MBPS:
122
+ return ble::phy_t ::LE_1M;
123
+
124
+ case BLE_GAP_PHY_2MBPS:
125
+ return ble::phy_t ::LE_2M;
126
+
127
+ case BLE_GAP_PHY_CODED:
128
+ return ble::phy_t ::LE_CODED;
129
+
130
+ default :
131
+ return ble::phy_t ::NONE;
132
+ }
133
+ }
134
+
118
135
// FIXME: update when SD 5 (not alpha!) or more is used for 52840.
119
136
#ifndef BLE_GAP_PHY_AUTO
120
137
#define BLE_GAP_PHY_AUTO 0
@@ -1630,8 +1647,8 @@ void nRF5xGap::on_phy_update(
1630
1647
_eventHandler->onPhyUpdateComplete (
1631
1648
status,
1632
1649
connection,
1633
- Phy_t::LE_1M ,
1634
- Phy_t::LE_1M
1650
+ convert_phy (evt. tx_phy ) ,
1651
+ convert_phy (evt. rx_phy )
1635
1652
);
1636
1653
}
1637
1654
You can’t perform that action at this time.
0 commit comments