Prechádzať zdrojové kódy

Workaround for furi_hal_gpio_add_int_callback conflict with expansion

Thanks @Willy-JL for all details about this issue
MX 1 rok pred
rodič
commit
f6b603e8b1
1 zmenil súbory, kde vykonal 9 pridanie a 0 odobranie
  1. 9 0
      pokemon_app.c

+ 9 - 0
pokemon_app.c

@@ -8,6 +8,8 @@
 #include "pokemon_app.h"
 #include "pokemon_char_encode.h"
 
+#include <expansion/expansion.h>
+
 const PokemonTable pokemon_table[] = {
     /* Values for base_*, moves, etc., pulled directly from a copy of Pokemon Blue */
     {"Bulbasaur",
@@ -2250,6 +2252,10 @@ void free_app(PokemonFap* pokemon_fap) {
 
 int32_t pokemon_app(void* p) {
     UNUSED(p);
+
+    Expansion* expansion = furi_record_open(RECORD_EXPANSION);
+    expansion_disable(expansion);
+
     PokemonFap* pokemon_fap = pokemon_alloc();
 
     furi_hal_light_set(LightRed, 0x00);
@@ -2262,5 +2268,8 @@ int32_t pokemon_app(void* p) {
     // Free resources
     free_app(pokemon_fap);
 
+    expansion_enable(expansion);
+    furi_record_close(RECORD_EXPANSION);
+
     return 0;
 }