From baaebb47dc46fd249c3384046667855a3b81bb96 Mon Sep 17 00:00:00 2001 From: paul-szczepanek-arm <33840200+paul-szczepanek-arm@users.noreply.github.com> Date: Wed, 18 Jul 2018 15:58:16 +0100 Subject: [PATCH] fix typo in preferred --- features/FEATURE_BLE/ble/Gap.h | 16 +++++++------- features/FEATURE_BLE/ble/generic/GenericGap.h | 4 ++-- features/FEATURE_BLE/ble/pal/PalGap.h | 4 ++-- .../FEATURE_BLE/source/generic/GenericGap.cpp | 4 ++-- .../targets/TARGET_CORDIO/CordioPalGap.h | 2 +- .../TARGET_CORDIO/source/CordioPalGap.cpp | 2 +- .../TARGET_NRF52/source/nRF5xGap.cpp | 22 +++++++++---------- .../TARGET_NRF52/source/nRF5xGap.h | 6 ++--- 8 files changed, 30 insertions(+), 30 deletions(-) diff --git a/features/FEATURE_BLE/ble/Gap.h b/features/FEATURE_BLE/ble/Gap.h index ab55037e0e..500feca6bc 100644 --- a/features/FEATURE_BLE/ble/Gap.h +++ b/features/FEATURE_BLE/ble/Gap.h @@ -1454,18 +1454,18 @@ public: } /** - * Set the prefered PHYs to use in a connection. + * Set the preferred PHYs to use in a connection. * - * @param txPhy: Set of PHYs prefered for tx operations. If NULL then no - * prefered PHYs are set and the default value of the subsytem is used. + * @param txPhy: Set of PHYs preferred for tx operations. If NULL then no + * preferred PHYs are set and the default value of the subsytem is used. * - * @param rxPhy: Set of PHYs prefered for rx operations. If NULL then no - * prefered PHYs are set and the default value of the subsytem is used. + * @param rxPhy: Set of PHYs preferred for rx operations. If NULL then no + * preferred PHYs are set and the default value of the subsytem is used. * * @return BLE_ERROR_NONE if the preferences have been set or an appropriate * error code. */ - virtual ble_error_t setPreferedPhys( + virtual ble_error_t setPreferredPhys( const PhySet_t* txPhys, const PhySet_t* rxPhys ) { @@ -1481,10 +1481,10 @@ public: * * @param connection Handle of the connection to update. * - * @param txPhys Set of PHYs prefered for tx operations. If NULL then the + * @param txPhys Set of PHYs preferred for tx operations. If NULL then the * choice is up to the Bluetooth subsystem. * - * @param rxPhys Set of PHYs prefered for rx operations. If NULL then the + * @param rxPhys Set of PHYs preferred for rx operations. If NULL then the * choice is up to the Bluetooth subsystem. * * @param codedSymbol Number of symbols used to code a bit when le coded is diff --git a/features/FEATURE_BLE/ble/generic/GenericGap.h b/features/FEATURE_BLE/ble/generic/GenericGap.h index c972730ba8..746371ebcd 100644 --- a/features/FEATURE_BLE/ble/generic/GenericGap.h +++ b/features/FEATURE_BLE/ble/generic/GenericGap.h @@ -140,9 +140,9 @@ public: virtual ble_error_t readPhy(Handle_t connection); /** - * @see Gap::setPreferedPhys + * @see Gap::setPreferredPhys */ - virtual ble_error_t setPreferedPhys( + virtual ble_error_t setPreferredPhys( const phy_set_t* txPhys, const phy_set_t* rxPhys ); diff --git a/features/FEATURE_BLE/ble/pal/PalGap.h b/features/FEATURE_BLE/ble/pal/PalGap.h index 7f45f437c2..14fd51112e 100644 --- a/features/FEATURE_BLE/ble/pal/PalGap.h +++ b/features/FEATURE_BLE/ble/pal/PalGap.h @@ -736,9 +736,9 @@ struct Gap { virtual ble_error_t read_phy(connection_handle_t connection) = 0; /** - * @see Gap::setPreferedPhys + * @see Gap::setPreferredPhys */ - virtual ble_error_t set_prefered_phys( + virtual ble_error_t set_preferred_phys( const phy_set_t& tx_phys, const phy_set_t& rx_phys ) = 0; diff --git a/features/FEATURE_BLE/source/generic/GenericGap.cpp b/features/FEATURE_BLE/source/generic/GenericGap.cpp index 551472af0c..94bddf9711 100644 --- a/features/FEATURE_BLE/source/generic/GenericGap.cpp +++ b/features/FEATURE_BLE/source/generic/GenericGap.cpp @@ -593,13 +593,13 @@ ble_error_t GenericGap::readPhy(Handle_t connection) { return _pal_gap.read_phy(connection); } -ble_error_t GenericGap::setPreferedPhys( +ble_error_t GenericGap::setPreferredPhys( const phy_set_t* txPhys, const phy_set_t* rxPhys ) { phy_set_t tx_phys(txPhys? txPhys->value() : 0); phy_set_t rx_phys(rxPhys? rxPhys->value() : 0); - return _pal_gap.set_prefered_phys(tx_phys, rx_phys); + return _pal_gap.set_preferred_phys(tx_phys, rx_phys); } ble_error_t GenericGap::setPhy( diff --git a/features/FEATURE_BLE/targets/TARGET_CORDIO/CordioPalGap.h b/features/FEATURE_BLE/targets/TARGET_CORDIO/CordioPalGap.h index 2f9fc076b8..286fc341f5 100644 --- a/features/FEATURE_BLE/targets/TARGET_CORDIO/CordioPalGap.h +++ b/features/FEATURE_BLE/targets/TARGET_CORDIO/CordioPalGap.h @@ -133,7 +133,7 @@ public: virtual ble_error_t read_phy(connection_handle_t connection); - virtual ble_error_t set_prefered_phys( + virtual ble_error_t set_preferred_phys( const phy_set_t& tx_phys, const phy_set_t& rx_phys ); diff --git a/features/FEATURE_BLE/targets/TARGET_CORDIO/source/CordioPalGap.cpp b/features/FEATURE_BLE/targets/TARGET_CORDIO/source/CordioPalGap.cpp index 0bf2f14c2a..b8a33f72b3 100644 --- a/features/FEATURE_BLE/targets/TARGET_CORDIO/source/CordioPalGap.cpp +++ b/features/FEATURE_BLE/targets/TARGET_CORDIO/source/CordioPalGap.cpp @@ -338,7 +338,7 @@ ble_error_t Gap::read_phy(connection_handle_t connection) { return BLE_ERROR_NONE; } -ble_error_t Gap::set_prefered_phys( +ble_error_t Gap::set_preferred_phys( const phy_set_t& tx_phys, const phy_set_t& rx_phys ) { diff --git a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF52/source/nRF5xGap.cpp b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF52/source/nRF5xGap.cpp index 58a850ff62..ae12ee7c27 100644 --- a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF52/source/nRF5xGap.cpp +++ b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF52/source/nRF5xGap.cpp @@ -139,8 +139,8 @@ nRF5xGap::nRF5xGap() : Gap(), _peripheral_privacy_configuration(default_peripheral_privacy_configuration), _central_privacy_configuration(default_central_privacy_configuration), _non_private_address_type(LegacyAddressType::RANDOM_STATIC), - _prefered_tx_phys(BLE_GAP_PHY_AUTO), - _prefered_rx_phys(BLE_GAP_PHY_AUTO), + _preferred_tx_phys(BLE_GAP_PHY_AUTO), + _preferred_rx_phys(BLE_GAP_PHY_AUTO), _connections_role() { m_connectionHandle = BLE_CONN_HANDLE_INVALID; @@ -671,17 +671,17 @@ ble_error_t nRF5xGap::readPhy(Handle_t connection) { return BLE_ERROR_NOT_IMPLEMENTED; } -ble_error_t nRF5xGap::setPreferedPhys( +ble_error_t nRF5xGap::setPreferredPhys( const ble::phy_set_t* txPhys, const ble::phy_set_t* rxPhys ) { - uint8_t prefered_tx_phys = txPhys? txPhys->value() : 0; - uint8_t prefered_rx_phys = rxPhys? rxPhys->value() : 0; + uint8_t preferred_tx_phys = txPhys? txPhys->value() : 0; + uint8_t preferred_rx_phys = rxPhys? rxPhys->value() : 0; #ifdef S140 ble_opt_t opt = { 0 }; - opt.gap_opt.preferred_phys.tx_phys = prefered_tx_phys; - opt.gap_opt.preferred_phys.rx_phys = prefered_rx_phys; + opt.gap_opt.preferred_phys.tx_phys = preferred_tx_phys; + opt.gap_opt.preferred_phys.rx_phys = preferred_rx_phys; uint32_t err = sd_ble_opt_set(BLE_GAP_OPT_PREFERRED_PHYS_SET, &opt); @@ -702,8 +702,8 @@ ble_error_t nRF5xGap::setPreferedPhys( #endif - _prefered_tx_phys = prefered_tx_phys; - _prefered_rx_phys = prefered_rx_phys; + _preferred_tx_phys = preferred_tx_phys; + _preferred_rx_phys = preferred_rx_phys; return BLE_ERROR_NONE; } @@ -1641,8 +1641,8 @@ void nRF5xGap::on_phy_update_request( const ble_gap_evt_phy_update_request_t& evt ) { ble_gap_phys_t phys = { - _prefered_tx_phys & evt.peer_preferred_phys.tx_phys, - _prefered_rx_phys & evt.peer_preferred_phys.rx_phys + _preferred_tx_phys & evt.peer_preferred_phys.tx_phys, + _preferred_rx_phys & evt.peer_preferred_phys.rx_phys }; if (!phys.tx_phys) { diff --git a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF52/source/nRF5xGap.h b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF52/source/nRF5xGap.h index d8f0bcf365..19273e815c 100644 --- a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF52/source/nRF5xGap.h +++ b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF52/source/nRF5xGap.h @@ -91,7 +91,7 @@ public: ble_error_t connect(const Address_t, BLEProtocol::AddressType_t peerAddrType, const ConnectionParams_t *connectionParams, const GapScanningParams *scanParams, bool identity); virtual ble_error_t readPhy(Handle_t connection); - virtual ble_error_t setPreferedPhys( + virtual ble_error_t setPreferredPhys( const ble::phy_set_t* txPhys, const ble::phy_set_t* rxPhys ); @@ -314,8 +314,8 @@ private: CentralPrivacyConfiguration_t _central_privacy_configuration; AddressType_t _non_private_address_type; Address_t _non_private_address; - uint8_t _prefered_tx_phys; - uint8_t _prefered_rx_phys; + uint8_t _preferred_tx_phys; + uint8_t _preferred_rx_phys; struct connection_role_t { connection_role_t() :