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 587:b53dd328822d, committed 2015-06-19
- Comitter:
- rgrover1
- Date:
- Fri Jun 19 15:52:51 2015 +0100
- Parent:
- 586:56b55dad625c
- Child:
- 588:8f6e14308c9a
- Commit message:
- Synchronized with git rev 25bef2bd
Author: Rohit Grover
add ScanParams to connect()
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 Fri Jun 19 15:52:51 2015 +0100
+++ b/public/BLEDevice.h Fri Jun 19 15:52:51 2015 +0100
@@ -320,6 +320,7 @@
ble_error_t stopScan(void);
ble_error_t connect(const Gap::Address_t peerAddr, Gap::AddressType_t peerAddrType = Gap::ADDR_TYPE_RANDOM_STATIC);
+ ble_error_t connect(const Gap::Address_t peerAddr, Gap::AddressType_t peerAddrType, const GapScanningParams &scanParams);
/**
* This call initiates the disconnection procedure, and its completion will
@@ -861,7 +862,11 @@
inline ble_error_t
BLEDevice::connect(const Gap::Address_t peerAddr, Gap::AddressType_t peerAddrType) {
- return transport->getGap().connect(peerAddr, peerAddrType);
+ return transport->getGap().connect(peerAddr, peerAddrType, scanningParams);
+}
+inline ble_error_t
+BLEDevice::connect(const Gap::Address_t peerAddr, Gap::AddressType_t peerAddrType, const GapScanningParams &scanParams) {
+ return transport->getGap().connect(peerAddr, peerAddrType, scanParams);
}
inline ble_error_t
--- a/public/Gap.h Fri Jun 19 15:52:51 2015 +0100
+++ b/public/Gap.h Fri Jun 19 15:52:51 2015 +0100
@@ -177,7 +177,7 @@
virtual uint16_t getMinAdvertisingInterval(void) const = 0;
virtual uint16_t getMinNonConnectableAdvertisingInterval(void) const = 0;
virtual uint16_t getMaxAdvertisingInterval(void) const = 0;
- virtual ble_error_t connect(const Address_t peerAddr, Gap::AddressType_t peerAddrType) = 0;
+ virtual ble_error_t connect(const Address_t peerAddr, Gap::AddressType_t peerAddrType, const GapScanningParams &scanParams) = 0;
virtual ble_error_t disconnect(DisconnectionReason_t reason) = 0;
virtual ble_error_t getPreferredConnectionParams(ConnectionParams_t *params) = 0;
virtual ble_error_t setPreferredConnectionParams(const ConnectionParams_t *params) = 0;
