Skip to content

Commit d18aa90

Browse files
author
Cruz Monrreal
authored
Merge pull request #7262 from paul-szczepanek-arm/gap-params
BLE: Add setScanParams overload to the Gap API
2 parents 85f66ca + 399191f commit d18aa90

File tree

1 file changed

+19
-0
lines changed
  • features/FEATURE_BLE/ble

1 file changed

+19
-0
lines changed

features/FEATURE_BLE/ble/Gap.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2102,6 +2102,25 @@ class Gap {
21022102
return rc;
21032103
}
21042104

2105+
/**
2106+
* Set the parameters used during a scan procedure.
2107+
*
2108+
* @param[in] scanningParams Parameter struct containing the interval, period,
2109+
* timeout and active scanning toggle.
2110+
*
2111+
* @return BLE_ERROR_NONE if the scan parameters were correctly set.
2112+
*
2113+
* @note All restrictions from setScanParams(uint16_t, uint16_t, uint16_t, bool) apply.
2114+
*/
2115+
ble_error_t setScanParams(const GapScanningParams& scanningParams) {
2116+
return setScanParams(
2117+
scanningParams.getInterval(),
2118+
scanningParams.getWindow(),
2119+
scanningParams.getTimeout(),
2120+
scanningParams.getActiveScanning()
2121+
);
2122+
}
2123+
21052124
/**
21062125
* Set the interval parameter used during scanning procedures.
21072126
*

0 commit comments

Comments
 (0)