Skip to content

Commit 5f8b966

Browse files
committed
NRF52: C++11 fixes
1 parent a4738fa commit 5f8b966

File tree

1 file changed

+4
-4
lines changed
  • features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_NRF52/source

1 file changed

+4
-4
lines changed

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_NRF52/source/nRF5xGap.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -746,8 +746,8 @@ ble_error_t nRF5xGap::setPhy_(
746746
#else
747747
// TODO handle coded symbol once supported by the softdevice.
748748
ble_gap_phys_t gap_phys = {
749-
txPhys? txPhys->value() : 0,
750-
rxPhys? rxPhys->value() : 0
749+
txPhys? txPhys->value() : uint8_t(0),
750+
rxPhys? rxPhys->value() : uint8_t(0)
751751
};
752752

753753
uint32_t err = sd_ble_gap_phy_update(connection, &gap_phys);
@@ -1662,8 +1662,8 @@ void nRF5xGap::on_phy_update_request(
16621662
const ble_gap_evt_phy_update_request_t& evt
16631663
) {
16641664
ble_gap_phys_t phys = {
1665-
_preferred_tx_phys & evt.peer_preferred_phys.tx_phys,
1666-
_preferred_rx_phys & evt.peer_preferred_phys.rx_phys
1665+
static_cast<uint8_t>(_preferred_tx_phys & evt.peer_preferred_phys.tx_phys),
1666+
static_cast<uint8_t>(_preferred_rx_phys & evt.peer_preferred_phys.rx_phys)
16671667
};
16681668

16691669
if (!phys.tx_phys) {

0 commit comments

Comments
 (0)