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 385:6e66d1c6de00, committed 2015-05-13
- Comitter:
- rgrover1
- Date:
- Wed May 13 08:51:08 2015 +0100
- Parent:
- 384:48412313df56
- Child:
- 386:d30591c3d39c
- Commit message:
- Synchronized with git rev c2e9d871
Author: Rohit Grover
add API for startScanning()
Changed in this revision
| public/BLEDevice.h | Show annotated file Show diff for this revision Revisions of this file |
| public/Gap.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:08 2015 +0100
@@ -761,6 +761,11 @@
}
inline ble_error_t
+BLEDevice::startScanning(Gap::AdvertisementReportCallback_t callback) {
+ return transport->getGap().startScanning(scanningParams, callback);
+}
+
+inline ble_error_t
BLEDevice::disconnect(Gap::DisconnectionReason_t reason)
{
return transport->getGap().disconnect(reason);
--- a/public/Gap.h Wed May 13 08:51:07 2015 +0100
+++ b/public/Gap.h Wed May 13 08:51:08 2015 +0100
@@ -19,6 +19,7 @@
#include "GapAdvertisingData.h"
#include "GapAdvertisingParams.h"
+#include "GapScanningParams.h"
#include "GapEvents.h"
#include "CallChain.h"
@@ -166,6 +167,7 @@
virtual ble_error_t setAdvertisingData(const GapAdvertisingData &, const GapAdvertisingData &) = 0;
virtual ble_error_t startAdvertising(const GapAdvertisingParams &) = 0;
virtual ble_error_t stopAdvertising(void) = 0;
+ virtual ble_error_t startScanning(const GapScanningParams &scanningParams, AdvertisementReportCallback_t callback) = 0;
virtual uint16_t getMinAdvertisingInterval(void) const = 0;
virtual uint16_t getMinNonConnectableAdvertisingInterval(void) const = 0;
virtual uint16_t getMaxAdvertisingInterval(void) const = 0;
@@ -349,6 +351,7 @@
LinkSecuredCallback_t onLinkSecured;
HandleSpecificEvent_t onSecurityContextStored;
PasskeyDisplayCallback_t onPasskeyDisplay;
+ AdvertisementReportCallback_t onAdvertisementReport;
CallChain disconnectionCallChain;
private:
