mirror of https://github.com/ARMmbed/mbed-os.git
BLE - Small reordering to reduce diff.
parent
9e5e23aad6
commit
632851e5ae
|
@ -212,6 +212,21 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set if the whitelist should be used to find the peer.
|
||||
*
|
||||
* @param filterPolicy The initiator filter to apply.
|
||||
*
|
||||
* @return A reference to this.
|
||||
*/
|
||||
ConnectionParameters &setFilter(initiator_filter_policy_t filterPolicy)
|
||||
{
|
||||
#if BLE_FEATURE_WHITELIST
|
||||
_filterPolicy = filterPolicy;
|
||||
#endif // BLE_FEATURE_WHITELIST
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable or disable PHYs.
|
||||
*
|
||||
|
@ -273,6 +288,20 @@ public:
|
|||
return _ownAddressType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the initiator policy.
|
||||
*
|
||||
* @return The initiator policy.
|
||||
*/
|
||||
initiator_filter_policy_t getFilter() const
|
||||
{
|
||||
#if BLE_FEATURE_WHITELIST
|
||||
return _filterPolicy;
|
||||
#else
|
||||
return initiator_filter_policy_t::NO_FILTER;
|
||||
#endif // BLE_FEATURE_WHITELIST
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the number of PHY enabled.
|
||||
* @return The number of PHY enabled.
|
||||
|
@ -288,35 +317,6 @@ public:
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set if the whitelist should be used to find the peer.
|
||||
*
|
||||
* @param filterPolicy The initiator filter to apply.
|
||||
*
|
||||
* @return A reference to this.
|
||||
*/
|
||||
ConnectionParameters &setFilter(initiator_filter_policy_t filterPolicy)
|
||||
{
|
||||
#if BLE_FEATURE_WHITELIST
|
||||
_filterPolicy = filterPolicy;
|
||||
#endif // BLE_FEATURE_WHITELIST
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the initiator policy.
|
||||
*
|
||||
* @return The initiator policy.
|
||||
*/
|
||||
initiator_filter_policy_t getFilter() const
|
||||
{
|
||||
#if BLE_FEATURE_WHITELIST
|
||||
return _filterPolicy;
|
||||
#else
|
||||
return initiator_filter_policy_t::NO_FILTER;
|
||||
#endif // BLE_FEATURE_WHITELIST
|
||||
}
|
||||
|
||||
#if !defined(DOXYGEN_ONLY)
|
||||
|
||||
phy_set_t getPhySet() const
|
||||
|
|
|
@ -545,11 +545,7 @@ public:
|
|||
advertising_peer_address_type_t peer_identity_address_type,
|
||||
const address_t &peer_identity_address
|
||||
) {
|
||||
impl()->on_keys_distributed_bdaddr_(
|
||||
connection,
|
||||
peer_identity_address_type,
|
||||
peer_identity_address
|
||||
);
|
||||
impl()->on_keys_distributed_bdaddr_(connection, peer_identity_address_type, peer_identity_address);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -562,7 +558,7 @@ public:
|
|||
connection_handle_t connection,
|
||||
const csrk_t &csrk
|
||||
) {
|
||||
impl()->on_keys_distributed_csrk(connection, csrk);
|
||||
impl()->on_keys_distributed_csrk_(connection, csrk);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1184,13 +1184,6 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
|
|||
return BLE_ERROR_NONE;
|
||||
}
|
||||
|
||||
template <template<class> class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler>
|
||||
typename GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandler>::LegacyGap::AdvertisingPolicyMode_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandler>::getAdvertisingPolicyMode_(void) const
|
||||
{
|
||||
useVersionOneAPI();
|
||||
return (AdvertisingPolicyMode_t) _advertising_filter_policy.value();
|
||||
}
|
||||
|
||||
template <template<class> class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler>
|
||||
ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandler>::setScanningPolicyMode_(ScanningPolicyMode_t mode)
|
||||
{
|
||||
|
@ -1204,13 +1197,6 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
|
|||
return BLE_ERROR_NONE;
|
||||
}
|
||||
|
||||
template <template<class> class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler>
|
||||
typename GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandler>::LegacyGap::ScanningPolicyMode_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandler>::getScanningPolicyMode_(void) const
|
||||
{
|
||||
useVersionOneAPI();
|
||||
return (ScanningPolicyMode_t) _scanning_filter_policy.value();
|
||||
}
|
||||
|
||||
template <template<class> class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler>
|
||||
ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandler>::setInitiatorPolicyMode_(InitiatorPolicyMode_t mode)
|
||||
{
|
||||
|
@ -1224,6 +1210,20 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
|
|||
return BLE_ERROR_NONE;
|
||||
}
|
||||
|
||||
template <template<class> class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler>
|
||||
typename GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandler>::LegacyGap::AdvertisingPolicyMode_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandler>::getAdvertisingPolicyMode_(void) const
|
||||
{
|
||||
useVersionOneAPI();
|
||||
return (AdvertisingPolicyMode_t) _advertising_filter_policy.value();
|
||||
}
|
||||
|
||||
template <template<class> class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler>
|
||||
typename GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandler>::LegacyGap::ScanningPolicyMode_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandler>::getScanningPolicyMode_(void) const
|
||||
{
|
||||
useVersionOneAPI();
|
||||
return (ScanningPolicyMode_t) _scanning_filter_policy.value();
|
||||
}
|
||||
|
||||
template <template<class> class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler>
|
||||
typename GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandler>::LegacyGap::InitiatorPolicyMode_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandler>::getInitiatorPolicyMode_(void) const
|
||||
{
|
||||
|
|
|
@ -41,4 +41,4 @@ const uint8_t DFUServicePacketCharacteristicUUID[] = {
|
|||
|
||||
DFUService::ResetPrepare_t DFUService::handoverCallback = NULL;
|
||||
|
||||
#endif /* #ifdef TARGET_NRF51822 */
|
||||
#endif /* #ifdef TARGET_NRF51822 */
|
||||
|
|
|
@ -38,4 +38,4 @@ const uint8_t UARTServiceTXCharacteristicUUID[UUID::LENGTH_OF_LONG_UUID] = {
|
|||
const uint8_t UARTServiceRXCharacteristicUUID[UUID::LENGTH_OF_LONG_UUID] = {
|
||||
0x6E, 0x40, (uint8_t)(UARTServiceRXCharacteristicShortUUID >> 8), (uint8_t)(UARTServiceRXCharacteristicShortUUID & 0xFF), 0xB5, 0xA3, 0xF3, 0x93,
|
||||
0xE0, 0xA9, 0xE5, 0x0E, 0x24, 0xDC, 0xCA, 0x9E,
|
||||
};
|
||||
};
|
||||
|
|
|
@ -32,4 +32,4 @@ const uint8_t UUID_TX_POWER_MODE_CHAR[UUID::LENGTH_OF_LONG_UUID] = UUID_URI_B
|
|||
const uint8_t UUID_BEACON_PERIOD_CHAR[UUID::LENGTH_OF_LONG_UUID] = UUID_URI_BEACON(0x20, 0x88);
|
||||
const uint8_t UUID_RESET_CHAR[UUID::LENGTH_OF_LONG_UUID] = UUID_URI_BEACON(0x20, 0x89);
|
||||
|
||||
const uint8_t BEACON_UUID[sizeof(UUID::ShortUUIDBytes_t)] = {0xD8, 0xFE};
|
||||
const uint8_t BEACON_UUID[sizeof(UUID::ShortUUIDBytes_t)] = {0xD8, 0xFE};
|
||||
|
|
|
@ -183,6 +183,7 @@ public:
|
|||
_signing_event_handler = signing_event_handler;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
static uint16_t compute_attributes_count(GattService& service);
|
||||
|
||||
|
|
|
@ -372,7 +372,6 @@ private:
|
|||
PrivacyControlBlock* _pending_privacy_control_blocks;
|
||||
bool _processing_privacy_control_block;
|
||||
irk_t _irk;
|
||||
|
||||
csrk_t _csrk;
|
||||
csrk_t* _peer_csrks[DM_CONN_MAX];
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue