diff --git a/module.json b/module.json index b525337..6052117 100644 --- a/module.json +++ b/module.json @@ -1,6 +1,6 @@ { "name": "ble-nrf51822", - "version": "2.0.0", + "version": "2.0.1", "description": "Nordic stack and drivers for the mbed BLE API.", "keywords": [ "Bluetooth", diff --git a/source/nRF5xn.cpp b/source/nRF5xn.cpp index de7e707..d505753 100644 --- a/source/nRF5xn.cpp +++ b/source/nRF5xn.cpp @@ -104,7 +104,12 @@ ble_error_t nRF5xn::shutdown(void) 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