From 909b78fc1464267a5a7bea8f2a63d2de3b34126f Mon Sep 17 00:00:00 2001 From: paul-szczepanek-arm <33840200+paul-szczepanek-arm@users.noreply.github.com> Date: Thu, 21 Feb 2019 15:55:11 +0000 Subject: [PATCH] complete gap feature ifdef --- features/FEATURE_BLE/ble/Gap.h | 5 +- features/FEATURE_BLE/ble/gap/ScanParameters.h | 2 +- features/FEATURE_BLE/source/gap/Gap.tpp | 2 +- .../FEATURE_BLE/source/generic/GenericGap.tpp | 51 +++++++++++++++++-- 4 files changed, 53 insertions(+), 7 deletions(-) diff --git a/features/FEATURE_BLE/ble/Gap.h b/features/FEATURE_BLE/ble/Gap.h index f2db1725e9..3782314725 100644 --- a/features/FEATURE_BLE/ble/Gap.h +++ b/features/FEATURE_BLE/ble/Gap.h @@ -984,7 +984,8 @@ public: const ConnectionParams_t *connectionParams, const GapScanningParams *scanParams ); -#endif BLE_ROLE_CENTRAL +#endif // BLE_ROLE_CENTRAL + #if BLE_FEATURE_CONNECTABLE /** * Initiate a disconnection procedure. @@ -2469,7 +2470,7 @@ protected: * Current scan response. */ GapAdvertisingData _scanResponse; -#endif BLE_ROLE_BROADCASTER +#endif // BLE_ROLE_BROADCASTER #if BLE_FEATURE_CONNECTABLE /** * Number of open connections. diff --git a/features/FEATURE_BLE/ble/gap/ScanParameters.h b/features/FEATURE_BLE/ble/gap/ScanParameters.h index 47beaa953e..e07fc84be2 100644 --- a/features/FEATURE_BLE/ble/gap/ScanParameters.h +++ b/features/FEATURE_BLE/ble/gap/ScanParameters.h @@ -168,7 +168,7 @@ public: scanning_filter_policy = filter_policy; return *this; } -#endif BLE_FEATURE_WHITELIST +#endif // BLE_FEATURE_WHITELIST /** * Get the filter to use during scanning diff --git a/features/FEATURE_BLE/source/gap/Gap.tpp b/features/FEATURE_BLE/source/gap/Gap.tpp index 870542e1c0..292a3bd6ce 100644 --- a/features/FEATURE_BLE/source/gap/Gap.tpp +++ b/features/FEATURE_BLE/source/gap/Gap.tpp @@ -352,7 +352,7 @@ ble_error_t Gap::disconnect( { return impl()->disconnect_(connectionHandle, reason); } -#endif BLE_FEATURE_CONNECTABLE +#endif // BLE_FEATURE_CONNECTABLE #if BLE_FEATURE_PHY_MANAGEMENT template diff --git a/features/FEATURE_BLE/source/generic/GenericGap.tpp b/features/FEATURE_BLE/source/generic/GenericGap.tpp index f46f53a96b..e0d4c9faea 100644 --- a/features/FEATURE_BLE/source/generic/GenericGap.tpp +++ b/features/FEATURE_BLE/source/generic/GenericGap.tpp @@ -2215,6 +2215,7 @@ void GenericGap class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler> const uint8_t GenericGap::MAX_ADVERTISING_SETS; +#if BLE_ROLE_OBSERVER template class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler> uint8_t GenericGap::getMaxAdvertisingSetNumber_() { @@ -2249,6 +2250,7 @@ uint16_t GenericGap class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler> ble_error_t GenericGap::createAdvertisingSet_( advertising_handle_t *handle, @@ -2325,6 +2327,7 @@ ble_error_t GenericGap class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler> ble_error_t GenericGap::setAdvertisingParameters_( @@ -2342,9 +2345,12 @@ ble_error_t GenericGap class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler> ble_error_t GenericGap::setExtendedAdvertisingParameters( advertising_handle_t handle, @@ -2434,6 +2441,7 @@ ble_error_t GenericGap class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler> ble_error_t GenericGap::setAdvertisingPayload_( @@ -2608,6 +2616,7 @@ ble_error_t GenericGap class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler> ble_error_t GenericGap::setPeriodicAdvertisingParameters_( advertising_handle_t handle, @@ -2880,7 +2895,10 @@ bool GenericGap class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler> void GenericGap::on_enhanced_connection_complete_( pal::hci_error_code_t status, @@ -2916,7 +2934,9 @@ void GenericGap class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler> void GenericGap::on_extended_advertising_report_( advertising_event_t event_type, @@ -2957,7 +2977,10 @@ void GenericGap class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler> void GenericGap::on_periodic_advertising_sync_established_( pal::hci_error_code_t error, @@ -3025,7 +3048,11 @@ void GenericGap class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler> void GenericGap::on_advertising_set_terminated_( pal::hci_error_code_t status, @@ -3049,7 +3076,10 @@ void GenericGap class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler> void GenericGap::on_scan_request_received_( advertising_handle_t advertising_handle, @@ -3069,7 +3099,9 @@ void GenericGap class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler> void GenericGap::on_connection_update_complete_( pal::hci_error_code_t status, @@ -3130,7 +3162,9 @@ void GenericGap class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler> ble_error_t GenericGap::setScanParameters_(const ScanParameters ¶ms) { @@ -3233,7 +3267,10 @@ ble_error_t GenericGap class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler> ble_error_t GenericGap::createSync_( peer_address_type_t peerAddressType, @@ -3302,7 +3339,10 @@ ble_error_t GenericGap class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler> ble_error_t GenericGap::terminateSync_(periodic_sync_handle_t handle) { @@ -3314,7 +3354,10 @@ ble_error_t GenericGap class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler> ble_error_t GenericGap::addDeviceToPeriodicAdvertiserList_( peer_address_type_t peerAddressType, @@ -3398,6 +3441,8 @@ uint8_t GenericGap class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler> void GenericGap::useVersionOneAPI_() const