Merge pull request #7262 from paul-szczepanek-arm/gap-params

BLE: Add setScanParams overload to the Gap API
pull/7303/head
Cruz Monrreal 2018-06-22 10:15:14 -05:00 committed by GitHub
commit d18aa9072f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 0 deletions

View File

@ -2102,6 +2102,25 @@ public:
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.
*