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

Workaround for furi_hal_gpio_add_int_callback conflict with expansion

Thanks @Willy-JL for all details about this issue
MX 1 год назад
Родитель
Сommit
3c162ab95d
1 измененных файлов с 7 добавлено и 0 удалено
  1. 7 0
      flipper_geiger.c

+ 7 - 0
flipper_geiger.c

@@ -16,6 +16,8 @@
 
 #include <locale/locale.h>
 
+#include <expansion/expansion.h>
+
 #define SCREEN_SIZE_X 128
 #define SCREEN_SIZE_Y 64
 
@@ -175,6 +177,8 @@ int32_t flipper_geiger_app()
     mutexVal.mutex= furi_mutex_alloc(FuriMutexTypeNormal);
     if(!mutexVal.mutex) {
         furi_message_queue_free(event_queue);
+        expansion_enable(expansion);
+        furi_record_close(RECORD_EXPANSION);
         return 255;
     }
 
@@ -379,5 +383,8 @@ int32_t flipper_geiger_app()
     furi_timer_free(timer);
     furi_record_close(RECORD_GUI);
 
+    expansion_enable(expansion);
+    furi_record_close(RECORD_EXPANSION);
+
     return 0;
 }