Skip to content

Commit 4835a1a

Browse files
committed
BLE: Add non legacy scan API.
1 parent 28ead51 commit 4835a1a

File tree

1 file changed

+7
-5
lines changed
  • features/FEATURE_BLE/ble

1 file changed

+7
-5
lines changed

features/FEATURE_BLE/ble/Gap.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "GapAdvertisingParams.h"
2424
#include "GapScanningParams.h"
2525
#include "GapEvents.h"
26+
#include "ble/GapScanParameters.h"
2627
#include "CallChainOfFunctionPointersWithContext.h"
2728
#include "FunctionPointerWithContext.h"
2829
#include "platform/mbed_toolchain.h"
@@ -1281,17 +1282,18 @@ class Gap {
12811282

12821283
/* scanning */
12831284

1284-
ble_error_t setScanParameters(
1285-
const GapScanningParams* params
1285+
virtual ble_error_t setScanParameters(
1286+
const GapScanParameters& params
12861287
) {
1288+
use_non_deprecated_scan_api();
12871289
/* Requesting action from porter(s): override this API if this capability is supported. */
12881290
return BLE_ERROR_NOT_IMPLEMENTED;
12891291
};
12901292

1291-
ble_error_t startScan(
1293+
virtual ble_error_t startScan(
12921294
ble::scanning_filter_duplicates_t filtering = ble::SCAN_FILTER_DUPLICATES_DISABLED,
1293-
uint32_t duration = 0,
1294-
uint32_t period = 0
1295+
uint16_t duration = 0,
1296+
uint16_t period = 0
12951297
) {
12961298
use_non_deprecated_scan_api();
12971299
return BLE_ERROR_NOT_IMPLEMENTED;

0 commit comments

Comments
 (0)