Slight improvement in the rf modem management for BLE
This commit is contained in:
parent
08b1b8de90
commit
92a275dc1c
@ -31,15 +31,16 @@ bool ble_modem_on(bool bluetoothOnly, bool startService)
|
||||
{
|
||||
TLS_BT_APPL_TRACE_ERROR("%s, tls_bt_init ret:%s"NEW_LINE, __FUNCTION__, tls_bt_rc_2_str(status));
|
||||
}
|
||||
else if(bluetoothOnly) // If we successfully started the modem, we can set it's working mode.
|
||||
else
|
||||
{
|
||||
tls_rf_bt_mode(true);
|
||||
// If we successfully started the modem, we can set it's working mode.
|
||||
if(bluetoothOnly)
|
||||
tls_rf_bt_mode(true);
|
||||
// Start the ble service if it was asked and if it is not yet started
|
||||
if(startService && !ble_service_is_started())
|
||||
serviceStartSuccess = ble_service_start();
|
||||
}
|
||||
|
||||
// Start the ble service if it was asked and if it is not yet started
|
||||
if(startService && !ble_service_is_started())
|
||||
serviceStartSuccess = ble_service_start();
|
||||
|
||||
return ((status == BLE_HS_ENOERR || status == BLE_HS_EALREADY) && serviceStartSuccess) ? true : false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user