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

FreeRTOS API fixes (#73)

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: hedger <hedger@nanode.su>
WillyJL 2 лет назад
Родитель
Сommit
5fa30ab466
3 измененных файлов с 7 добавлено и 5 удалено
  1. 4 0
      .catalog/changelog.md
  2. 1 1
      application.fam
  3. 2 4
      nfc_magic_app.c

+ 4 - 0
.catalog/changelog.md

@@ -1,4 +1,8 @@
+## 1.2
+ - Minimal changes for recent API updates
+
 ## 1.1
  - Rework application with new NFC API
+
 ## 1.0
  - Initial release

+ 1 - 1
application.fam

@@ -10,7 +10,7 @@ App(
     ],
     stack_size=4 * 1024,
     fap_description="Application for writing to NFC tags with modifiable sector 0",
-    fap_version="1.1",
+    fap_version="1.2",
     fap_icon="assets/125_10px.png",
     fap_category="NFC",
     fap_private_libs=[

+ 2 - 4
nfc_magic_app.c

@@ -23,15 +23,13 @@ void nfc_magic_app_tick_event_callback(void* context) {
 
 void nfc_magic_app_show_loading_popup(void* context, bool show) {
     NfcMagicApp* instance = context;
-    TaskHandle_t timer_task = xTaskGetHandle(configTIMER_SERVICE_TASK_NAME);
-
     if(show) {
         // Raise timer priority so that animations can play
-        vTaskPrioritySet(timer_task, configMAX_PRIORITIES - 1);
+        furi_timer_set_thread_priority(FuriTimerThreadPriorityElevated);
         view_dispatcher_switch_to_view(instance->view_dispatcher, NfcMagicAppViewLoading);
     } else {
         // Restore default timer priority
-        vTaskPrioritySet(timer_task, configTIMER_TASK_PRIORITY);
+        furi_timer_set_thread_priority(FuriTimerThreadPriorityNormal);
     }
 }