mirror of https://github.com/ARMmbed/mbed-os.git
cancel connection
parent
365a6c8c4d
commit
2cdff44f2a
|
@ -1530,11 +1530,7 @@ public:
|
|||
* Once the connection is established, a ConnectionCallbackParams_t event is
|
||||
* emitted to handlers that have been registered with onConnection().
|
||||
*
|
||||
* @param[in] peerAddr MAC address of the peer. It must be in LSB format.
|
||||
* @param[in] peerAddrType Address type of the peer. It is usually obtained
|
||||
* from advertising frames.
|
||||
* @param[in] connectionParams Connection parameters to use.
|
||||
* @param[in] scanParams Scan parameters used to find the peer.
|
||||
* FIXME
|
||||
*
|
||||
* @return BLE_ERROR_NONE if connection establishment procedure is started
|
||||
* successfully. The connectionCallChain (if set) is invoked upon
|
||||
|
@ -1553,6 +1549,17 @@ public:
|
|||
return BLE_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/** Cancel the connection attempt. This is not guaranteed to succeed. As a result
|
||||
* onConnectionComplete in the event handler will be called. Check the success parameter
|
||||
* to see if the connection was created.
|
||||
*
|
||||
* @return BLE_ERROR_NONE if the connection attempt has been requested to be cancelled.
|
||||
*/
|
||||
virtual ble_error_t cancelConnect() {
|
||||
/* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
return BLE_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiate a connection to a peer.
|
||||
*
|
||||
|
|
|
@ -240,6 +240,11 @@ public:
|
|||
const GapExtendedConnectParameters_t &connectionParams
|
||||
);
|
||||
|
||||
/**
|
||||
* @see Gap::cancelConnect
|
||||
*/
|
||||
virtual ble_error_t cancelConnect();
|
||||
|
||||
/**
|
||||
* @see Gap::readPhy
|
||||
*/
|
||||
|
|
|
@ -628,6 +628,11 @@ ble_error_t GenericGap::connect(
|
|||
);
|
||||
}
|
||||
|
||||
ble_error_t GenericGap::cancelConnect()
|
||||
{
|
||||
return _pal_gap.cancel_connection_creation();
|
||||
}
|
||||
|
||||
ble_error_t GenericGap::readPhy(Handle_t connection) {
|
||||
return _pal_gap.read_phy(connection);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue