Nordic Semiconductor / nRF51822

Dependents:   BLE_ANCS_SDAPI BLE_temperature BLE_HeartRate writable_gatt ... more

Files at this revision

API Documentation at this revision

Comitter:
rgrover1
Date:
Mon Nov 02 17:34:04 2015 +0000
Parent:
460:9ff3e688014b
Child:
462:ed195faa45b1
Commit message:
Synchronized with git rev f0d521f0
Author: Vincent Coubard
Ensure that the initialization flags is set to false if the BLE stack is
shutdown properly.

Changed in this revision

source/nRF5xn.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/source/nRF5xn.cpp	Mon Nov 02 09:05:11 2015 +0000
+++ b/source/nRF5xn.cpp	Mon Nov 02 17:34:04 2015 +0000
@@ -104,7 +104,12 @@
         return BLE_ERROR_INITIALIZATION_INCOMPLETE;
     }
 
-    return (softdevice_handler_sd_disable() == NRF_SUCCESS) ? BLE_ERROR_NONE : BLE_STACK_BUSY;
+    if(softdevice_handler_sd_disable() != NRF_SUCCESS) {
+        return BLE_STACK_BUSY;
+    }
+
+    initialized = false;
+    return BLE_ERROR_NONE;
 }
 
 void