diff --git a/features/FEATURE_BLE/ble/Gap.h b/features/FEATURE_BLE/ble/Gap.h index 1681de5494..23d5b9c028 100644 --- a/features/FEATURE_BLE/ble/Gap.h +++ b/features/FEATURE_BLE/ble/Gap.h @@ -1736,9 +1736,10 @@ public: virtual ble_error_t startAdvertising( AdvHandle_t handle, - uint8_t maxEvents = 0, - uint32_t maxDuration = 0 - ) { + uint32_t maxDuration = 0, + uint8_t maxEvents = 0 + ) + { (void) maxEvents; (void) maxDuration; /* Requesting action from porter(s): override this API if this capability is supported. */ diff --git a/features/FEATURE_BLE/ble/generic/GenericGap.h b/features/FEATURE_BLE/ble/generic/GenericGap.h index 054c0a3f24..f41f079ded 100644 --- a/features/FEATURE_BLE/ble/generic/GenericGap.h +++ b/features/FEATURE_BLE/ble/generic/GenericGap.h @@ -106,8 +106,8 @@ public: ble_error_t startAdvertising( AdvHandle_t handle, - uint8_t maxEvents = 0, - uint32_t maxDuration = 0 + uint32_t maxDuration, + uint8_t maxEvents ); ble_error_t stopAdvertising(AdvHandle_t handle); diff --git a/features/FEATURE_BLE/source/generic/GenericGap.cpp b/features/FEATURE_BLE/source/generic/GenericGap.cpp index fe44081e77..0dc1c650d9 100644 --- a/features/FEATURE_BLE/source/generic/GenericGap.cpp +++ b/features/FEATURE_BLE/source/generic/GenericGap.cpp @@ -1816,9 +1816,10 @@ ble_error_t GenericGap::setAdvertisingData( ble_error_t GenericGap::startAdvertising( AdvHandle_t handle, - uint8_t maxEvents, - uint32_t maxDuration -) { + uint32_t maxDuration, + uint8_t maxEvents +) +{ if (!_existing_sets.get(handle)) { return BLE_ERROR_INVALID_PARAM; }