BLE: now calling tls_rf_bt_mode to set it back to its default value, this fixes the 1 mA current leak when disabling BLE
This commit is contained in:
parent
f04b461acb
commit
e9f50ca30b
@ -75,6 +75,9 @@ bool ble_modem_off(void)
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Don't forget to set the rf bt mode to it's default config
|
||||||
|
tls_rf_bt_mode(false);
|
||||||
|
|
||||||
status = tls_bt_deinit();
|
status = tls_bt_deinit();
|
||||||
|
|
||||||
if((status != BLE_HS_ENOERR) && (status != BLE_HS_EALREADY)) {
|
if((status != BLE_HS_ENOERR) && (status != BLE_HS_EALREADY)) {
|
||||||
@ -83,8 +86,8 @@ bool ble_modem_off(void)
|
|||||||
|
|
||||||
if(status != BLE_HS_EALREADY)
|
if(status != BLE_HS_EALREADY)
|
||||||
{
|
{
|
||||||
//Starting a wifi scan really stops the BT modem ?? Why ? I don't know
|
// Starting a wifi scan really stops the BT modem ?? Why ? I don't know
|
||||||
tls_wifi_scan();
|
tls_wifi_passive_scan();
|
||||||
}
|
}
|
||||||
|
|
||||||
return ((status == BLE_HS_ENOERR || status == BLE_HS_EALREADY) && serviceStopSuccess) ? true : false;
|
return ((status == BLE_HS_ENOERR || status == BLE_HS_EALREADY) && serviceStopSuccess) ? true : false;
|
||||||
|
Loading…
Reference in New Issue
Block a user