Просмотр исходного кода

Call power enable and disable for external module

Fixes issues with external module working on 5v line
MX 2 лет назад
Родитель
Сommit
552bd12d0f
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      subbrute.c

+ 6 - 0
subbrute.c

@@ -179,9 +179,15 @@ int32_t subbrute_app(void* p) {
     scene_manager_next_scene(instance->scene_manager, SubBruteSceneStart);
     scene_manager_next_scene(instance->scene_manager, SubBruteSceneStart);
 
 
     furi_hal_power_suppress_charge_enter();
     furi_hal_power_suppress_charge_enter();
+    // Enable power for External CC1101 if it is connected
+    furi_hal_subghz_enable_ext_power();
+
     notification_message(instance->notifications, &sequence_display_backlight_on);
     notification_message(instance->notifications, &sequence_display_backlight_on);
     view_dispatcher_run(instance->view_dispatcher);
     view_dispatcher_run(instance->view_dispatcher);
     furi_hal_power_suppress_charge_exit();
     furi_hal_power_suppress_charge_exit();
+    // Disable power for External CC1101 if it was enabled and module is connected
+    furi_hal_subghz_disable_ext_power();
+
     subbrute_free(instance);
     subbrute_free(instance);
 
 
     return 0;
     return 0;