Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BLE_API by
Revision 384:48412313df56, committed 2015-05-13
- Comitter:
- rgrover1
- Date:
- Wed May 13 08:51:07 2015 +0100
- Parent:
- 383:7bd527ea7280
- Child:
- 385:6e66d1c6de00
- Commit message:
- Synchronized with git rev 23a16e05
Author: Rohit Grover
fill in APIs around setScanningParams
Changed in this revision
| public/BLEDevice.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/public/BLEDevice.h Wed May 13 08:51:07 2015 +0100
+++ b/public/BLEDevice.h Wed May 13 08:51:07 2015 +0100
@@ -733,6 +733,34 @@
}
inline ble_error_t
+BLEDevice::setScanningParams(uint16_t interval, uint16_t window, uint16_t timeout) {
+ ble_error_t rc;
+ if (((rc = scanningParams.setInterval(interval)) == BLE_ERROR_NONE) &&
+ ((rc = scanningParams.setWindow(window)) == BLE_ERROR_NONE) &&
+ ((rc = scanningParams.setTimeout(timeout)) == BLE_ERROR_NONE)) {
+ return BLE_ERROR_NONE;
+ }
+
+ return rc;
+}
+
+inline ble_error_t
+BLEDevice::setScanningInterval(uint16_t interval) {
+ return scanningParams.setInterval(interval);
+}
+
+inline ble_error_t
+BLEDevice::setScanningWindow(uint16_t window) {
+
+ return scanningParams.setWindow(window);
+}
+
+inline ble_error_t
+BLEDevice::setScanningTimeout(uint16_t timeout) {
+ return scanningParams.setTimeout(timeout);
+}
+
+inline ble_error_t
BLEDevice::disconnect(Gap::DisconnectionReason_t reason)
{
return transport->getGap().disconnect(reason);
