fix typo in preferred

pull/7899/head
paul-szczepanek-arm 2018-07-18 15:58:16 +01:00 committed by Vincent Coubard
parent d64479a2ee
commit baaebb47dc
8 changed files with 30 additions and 30 deletions

View File

@ -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

View File

@ -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
);

View File

@ -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;

View File

@ -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(

View File

@ -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
);

View File

@ -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
) {

View File

@ -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) {

View File

@ -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() :