High level Bluetooth Low Energy API and radio abstraction layer

Dependencies:   nRF51822

Dependents:   LinkNode_LIS3DH

Fork of BLE_API by Bluetooth Low Energy

Files at this revision

API Documentation at this revision

Comitter:
rgrover1
Date:
Fri Jun 19 15:52:51 2015 +0100
Parent:
589:d3f7f22654e7
Child:
591:0545b8836f53
Commit message:
Synchronized with git rev cc30c92f
Author: Rohit Grover
pass in some useful connection paramters from connect()

Changed in this revision

public/BLEDevice.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
@@ -862,12 +862,24 @@
 
 inline ble_error_t
 BLEDevice::connect(const Gap::Address_t peerAddr, Gap::AddressType_t peerAddrType) {
-    Gap::ConnectionParams_t connectionParams;
+    Gap::ConnectionParams_t connectionParams = {
+        .minConnectionInterval = 30,
+        .maxConnectionInterval = 100,
+        .slaveLatency = 0,
+        .connectionSupervisionTimeout = 400
+    };
+
     return transport->getGap().connect(peerAddr, peerAddrType, scanningParams, connectionParams);
 }
 inline ble_error_t
 BLEDevice::connect(const Gap::Address_t peerAddr, Gap::AddressType_t peerAddrType, const GapScanningParams &scanParams) {
-    Gap::ConnectionParams_t connectionParams;
+    Gap::ConnectionParams_t connectionParams = {
+        .minConnectionInterval = 30,
+        .maxConnectionInterval = 100,
+        .slaveLatency = 0,
+        .connectionSupervisionTimeout = 400
+    };
+
     return transport->getGap().connect(peerAddr, peerAddrType, scanParams, connectionParams);
 }