pass in some useful connection paramters from connect()
This commit is contained in:
parent
6a88d2af37
commit
cc30c92fa5
1 changed files with 14 additions and 2 deletions
|
@ -862,12 +862,24 @@ BLEDevice::stopScan(void) {
|
|||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue