diff --git a/features/FEATURE_BLE/ble/Gap.h b/features/FEATURE_BLE/ble/Gap.h index ca48d3d644..6da1f6f20f 100644 --- a/features/FEATURE_BLE/ble/Gap.h +++ b/features/FEATURE_BLE/ble/Gap.h @@ -1735,7 +1735,7 @@ public: */ virtual ble_error_t createAdvertisingSet( AdvHandle_t *handle, - const GapAdvertisingParameters ¶meters + const ble::AdvertisingParameters ¶meters ) { (void) handle; @@ -1765,7 +1765,7 @@ public: */ virtual ble_error_t setAdvertisingParams( AdvHandle_t handle, - const GapAdvertisingParameters ¶ms + const ble::AdvertisingParameters ¶ms ) { (void) handle; (void) params; diff --git a/features/FEATURE_BLE/ble/gap/AdvertisingParameters.h b/features/FEATURE_BLE/ble/gap/AdvertisingParameters.h index 95f3229a6e..4e256b5133 100644 --- a/features/FEATURE_BLE/ble/gap/AdvertisingParameters.h +++ b/features/FEATURE_BLE/ble/gap/AdvertisingParameters.h @@ -29,6 +29,8 @@ * @{ */ +namespace ble { + /** * Parameters defining the advertising process. * @@ -42,7 +44,7 @@ * - Duration of the advertising process. As others, it can be set at * construction time, modified by setTimeout() and retrieved by getTimeout(). */ -class GapAdvertisingParameters { +class AdvertisingParameters { public: /** @@ -99,7 +101,7 @@ public: * * @note If value in input are out of range, they will be normalized. */ - GapAdvertisingParameters( + AdvertisingParameters( ble::advertising_type_t advType = ble::ADV_CONNECTABLE_UNDIRECTED, uint32_t minInterval = GAP_ADV_PARAMS_INTERVAL_MIN_NONCON, uint32_t maxInterval = GAP_ADV_PARAMS_INTERVAL_MAX, @@ -691,6 +693,8 @@ private: uint8_t _includeHeaderTxPower:1; }; +} // namespace ble + /** * @} * @} diff --git a/features/FEATURE_BLE/ble/generic/GenericGap.h b/features/FEATURE_BLE/ble/generic/GenericGap.h index 664f73ebfc..ff6ec94997 100644 --- a/features/FEATURE_BLE/ble/generic/GenericGap.h +++ b/features/FEATURE_BLE/ble/generic/GenericGap.h @@ -82,14 +82,14 @@ public: ble_error_t createAdvertisingSet( AdvHandle_t *handle, - const GapAdvertisingParameters ¶meters + const AdvertisingParameters ¶meters ); ble_error_t destroyAdvertisingSet(AdvHandle_t handle); ble_error_t setAdvertisingParams( AdvHandle_t handle, - const GapAdvertisingParameters ¶ms + const AdvertisingParameters ¶ms ); ble_error_t setAdvertisingPayload( @@ -670,7 +670,7 @@ private: private: ble_error_t setExtendedAdvertisingParameters( AdvHandle_t handle, - const GapAdvertisingParameters ¶meters + const AdvertisingParameters ¶meters ); bool is_extended_advertising_available(); diff --git a/features/FEATURE_BLE/source/generic/GenericGap.cpp b/features/FEATURE_BLE/source/generic/GenericGap.cpp index 9569121a55..496af15110 100644 --- a/features/FEATURE_BLE/source/generic/GenericGap.cpp +++ b/features/FEATURE_BLE/source/generic/GenericGap.cpp @@ -435,7 +435,7 @@ GenericGap::GenericGap( if (is_extended_advertising_available()) { setExtendedAdvertisingParameters( LEGACY_ADVERTISING_HANDLE, - GapAdvertisingParameters() + AdvertisingParameters() ); } } @@ -1658,7 +1658,7 @@ uint8_t GenericGap::getMaxAdvertisingDataLength() ble_error_t GenericGap::createAdvertisingSet( AdvHandle_t *handle, - const GapAdvertisingParameters ¶meters + const AdvertisingParameters ¶meters ) { if (is_extended_advertising_available()) { @@ -1724,7 +1724,7 @@ ble_error_t GenericGap::destroyAdvertisingSet(AdvHandle_t handle) { ble_error_t GenericGap::setAdvertisingParams( AdvHandle_t handle, - const GapAdvertisingParameters ¶ms + const AdvertisingParameters ¶ms ) { if (handle >= getMaxAdvertisingSetNumber()) { return BLE_ERROR_INVALID_PARAM; @@ -1762,7 +1762,7 @@ ble_error_t GenericGap::setAdvertisingParams( ble_error_t GenericGap::setExtendedAdvertisingParameters( AdvHandle_t handle, - const GapAdvertisingParameters ¶ms + const AdvertisingParameters ¶ms ) { if (handle >= getMaxAdvertisingSetNumber()) {