Device fix for BLE: call uBleInit/uBleDeinit().
When the device layer was introduced in commit the calls to the BLE init/deinit functions, which used to be in uNetworkInitBle()/UNetworkDeinitBle(), were lost.  Oops.  They are now added in uDevicePrivateShortRangeInit()/uDevicePrivateShortRangeDeinit().
#include "u_short_range_edm_stream.h"
#include "u_ble_module_type.h"
+#include "u_ble.h"
#include "u_device_shared_short_range.h"
#include "u_device_private_short_range.h"
@@ -71,6 +72,9 @@ int32_t uDevicePrivateShortRangeInit()
if (errorCode == 0) {
errorCode = uAtClientInit();
}
+ if (errorCode == 0) {
+ errorCode = uBleInit();
+ }
if (errorCode == 0) {
errorCode = uShortRangeInit();
}
@@ -81,6 +85,7 @@ int32_t uDevicePrivateShortRangeInit()
void uDevicePrivateShortRangeDeinit()
{
uShortRangeDeinit();
+ uBleDeinit();
uShortRangeEdmStreamDeinit();
uAtClientDeinit();
}
