FuriHal,BleGlue: prevent sleep while HCI command executed, proper bt api rpc locking. Fixes random system lockups. (#3107)

This commit is contained in:
あく
2023-09-25 14:12:12 +09:00
committed by GitHub
parent e1030e7999
commit 63d7d46bd3
6 changed files with 20 additions and 16 deletions
+2 -6
View File
@@ -422,9 +422,7 @@ int32_t hid_ble_app(void* p) {
furi_record_close(RECORD_STORAGE);
if(!bt_set_profile(app->bt, BtProfileHidKeyboard)) {
FURI_LOG_E(TAG, "Failed to switch to HID profile");
}
furi_check(bt_set_profile(app->bt, BtProfileHidKeyboard));
furi_hal_bt_start_advertising();
bt_set_status_changed_callback(app->bt, bt_hid_connection_status_changed_callback, app);
@@ -442,9 +440,7 @@ int32_t hid_ble_app(void* p) {
bt_keys_storage_set_default_path(app->bt);
if(!bt_set_profile(app->bt, BtProfileSerial)) {
FURI_LOG_E(TAG, "Failed to switch to Serial profile");
}
furi_check(bt_set_profile(app->bt, BtProfileSerial));
hid_free(app);