BleGlue: reorder initialization sequence, move core2 start to early stage. (#816)

This commit is contained in:
あく
2021-11-13 05:41:54 +03:00
committed by GitHub
parent 70d0519178
commit b2356c7318
11 changed files with 235 additions and 123 deletions

View File

@@ -127,8 +127,7 @@ static void furi_hal_flash_begin(bool erase_flag) {
furi_hal_bt_lock_core2();
// If Core2 is running use IPC locking
BleGlueStatus status = ble_glue_get_status();
if(status == BleGlueStatusStarted || status == BleGlueStatusBleStackMissing) {
if(furi_hal_bt_is_alive()) {
furi_hal_flash_begin_with_core2(erase_flag);
} else {
furi_hal_flash_unlock();
@@ -159,8 +158,7 @@ static void furi_hal_flash_end_with_core2(bool erase_flag) {
static void furi_hal_flash_end(bool erase_flag) {
// If Core2 is running use IPC locking
BleGlueStatus status = ble_glue_get_status();
if(status == BleGlueStatusStarted || status == BleGlueStatusBleStackMissing) {
if(furi_hal_bt_is_alive()) {
furi_hal_flash_end_with_core2(erase_flag);
} else {
furi_hal_flash_lock();