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.
Dependents: BLE_ANCS_SDAPI BLE_temperature BLE_HeartRate writable_gatt ... more
Diff: nRF51Gap.cpp
- Revision:
- 358:0feab33fde20
- Parent:
- 348:922c8b211979
- Child:
- 361:d2405f5a4853
diff -r 68c0de4426f1 -r 0feab33fde20 nRF51Gap.cpp
--- a/nRF51Gap.cpp Fri Jun 19 15:55:37 2015 +0100
+++ b/nRF51Gap.cpp Fri Jun 19 15:55:37 2015 +0100
@@ -265,24 +265,7 @@
}
}
-
-/**************************************************************************/
-/*!
- @brief Disconnects if we are connected to a central device
-
- @returns ble_error_t
-
- @retval BLE_ERROR_NONE
- Everything executed properly
-
- @section EXAMPLE
-
- @code
-
- @endcode
-*/
-/**************************************************************************/
-ble_error_t nRF51Gap::disconnect(DisconnectionReason_t reason)
+ble_error_t nRF51Gap::disconnect(Handle_t connectionHandle, DisconnectionReason_t reason)
{
state.advertising = 0;
state.connected = 0;
@@ -300,11 +283,24 @@
}
/* Disconnect if we are connected to a central device */
- ASSERT_INT(ERROR_NONE, sd_ble_gap_disconnect(m_connectionHandle, code), BLE_ERROR_PARAM_OUT_OF_RANGE);
+ ASSERT_INT(ERROR_NONE, sd_ble_gap_disconnect(connectionHandle, code), BLE_ERROR_PARAM_OUT_OF_RANGE);
return BLE_ERROR_NONE;
}
+/*!
+ @brief Disconnects if we are connected to a central device
+
+ @returns ble_error_t
+
+ @retval BLE_ERROR_NONE
+ Everything executed properly
+*/
+ble_error_t nRF51Gap::disconnect(DisconnectionReason_t reason)
+{
+ return disconnect(m_connectionHandle, reason);
+}
+
ble_error_t nRF51Gap::getPreferredConnectionParams(ConnectionParams_t *params)
{
ASSERT_INT(NRF_SUCCESS,

