Merge pull request #58 from pan-/fix-initialization

Ensure that the initialization flags is set to false if the BLE stack is shutdown properly.
This commit is contained in:
Rohit Grover 2015-11-02 17:21:55 +00:00
commit e7cc192834
1 changed files with 6 additions and 1 deletions

View File

@ -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