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: microbit_rubber_ducky microbit_mouse_BLE microbit_mouse_BLE_daybreak_version microbit_presenter
Fork of nRF51822 by
Diff: nRF51822n.cpp
- Revision:
- 80:cdcc094ab166
- Parent:
- 79:540d11f2764f
- Child:
- 96:f98c65780f4a
diff -r 540d11f2764f -r cdcc094ab166 nRF51822n.cpp
--- a/nRF51822n.cpp Wed Dec 03 14:33:28 2014 +0000
+++ b/nRF51822n.cpp Wed Dec 03 14:33:28 2014 +0000
@@ -21,6 +21,8 @@
#include "btle/btle.h"
#include "nrf_delay.h"
+#include "softdevice_handler.h"
+
/**
* The singleton which represents the nRF51822 transport for the BLEDevice.
*/
@@ -89,6 +91,11 @@
return BLE_ERROR_NONE;
}
+ble_error_t nRF51822n::shutdown(void)
+{
+ return (softdevice_handler_sd_disable() == NRF_SUCCESS) ? BLE_ERROR_NONE : BLE_STACK_BUSY;
+}
+
ble_error_t nRF51822n::reset(void)
{
nrf_delay_us(500000);
