Skip to content

BLE: Add setScanParams overload to the Gap API #7262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 22, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions features/FEATURE_BLE/ble/Gap.h
Original file line number Diff line number Diff line change
Expand Up @@ -2102,6 +2102,25 @@ class Gap {
return rc;
}

/**
* Set the parameters used during a scan procedure.
*
* @param[in] scanningParams Parameter struct containing the interval, period,
* timeout and active scanning toggle.
*
* @return BLE_ERROR_NONE if the scan parameters were correctly set.
*
* @note All restrictions from setScanParams(uint16_t, uint16_t, uint16_t, bool) apply.
*/
ble_error_t setScanParams(const GapScanningParams& scanningParams) {
return setScanParams(
scanningParams.getInterval(),
scanningParams.getWindow(),
scanningParams.getTimeout(),
scanningParams.getActiveScanning()
);
}

/**
* Set the interval parameter used during scanning procedures.
*
Expand Down