From a0f118dcf3bcaa13e9c701f66ac61473371ce483 Mon Sep 17 00:00:00 2001 From: WillyJL <49810075+Willy-JL@users.noreply.github.com> Date: Wed, 15 Nov 2023 17:58:21 +0000 Subject: [PATCH] FreeRTOS API fixes (#73) Co-authored-by: hedger Co-authored-by: hedger --- mass_storage/.catalog/CHANGELOG.md | 6 +++++- mass_storage/application.fam | 2 +- mass_storage/mass_storage_app.c | 6 ++---- nfc_magic/.catalog/changelog.md | 4 ++++ nfc_magic/application.fam | 2 +- nfc_magic/nfc_magic_app.c | 6 ++---- picopass/.catalog/changelog.md | 2 ++ picopass/application.fam | 2 +- picopass/picopass.c | 6 ++---- weather_station/.catalog/changelog.md | 2 +- 10 files changed, 21 insertions(+), 17 deletions(-) diff --git a/mass_storage/.catalog/CHANGELOG.md b/mass_storage/.catalog/CHANGELOG.md index c24abcee466..4b7d6d3be1e 100644 --- a/mass_storage/.catalog/CHANGELOG.md +++ b/mass_storage/.catalog/CHANGELOG.md @@ -1,3 +1,7 @@ +## v.1.3 + +Minimal changes for recent API updates + ## v.1.2 * Fix deadlock on disk eject @@ -10,4 +14,4 @@ ## v.1.0 -Initial release. \ No newline at end of file +Initial release. diff --git a/mass_storage/application.fam b/mass_storage/application.fam index 66d18422c16..62ea83f6eac 100644 --- a/mass_storage/application.fam +++ b/mass_storage/application.fam @@ -9,7 +9,7 @@ App( ], stack_size=2 * 1024, fap_description="Implements a mass storage device over USB for disk images", - fap_version="1.2", + fap_version="1.3", fap_icon="assets/mass_storage_10px.png", fap_icon_assets="assets", fap_category="USB", diff --git a/mass_storage/mass_storage_app.c b/mass_storage/mass_storage_app.c index ffb4cc3a1a1..32533a12caf 100644 --- a/mass_storage/mass_storage_app.c +++ b/mass_storage/mass_storage_app.c @@ -22,15 +22,13 @@ static void mass_storage_app_tick_event_callback(void* context) { } void mass_storage_app_show_loading_popup(MassStorageApp* app, bool show) { - 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(app->view_dispatcher, MassStorageAppViewLoading); } else { // Restore default timer priority - vTaskPrioritySet(timer_task, configTIMER_TASK_PRIORITY); + furi_timer_set_thread_priority(FuriTimerThreadPriorityNormal); } } diff --git a/nfc_magic/.catalog/changelog.md b/nfc_magic/.catalog/changelog.md index 4eec48174bd..92398900176 100644 --- a/nfc_magic/.catalog/changelog.md +++ b/nfc_magic/.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 diff --git a/nfc_magic/application.fam b/nfc_magic/application.fam index 64d3cbc8ab7..5fca76bdcf0 100644 --- a/nfc_magic/application.fam +++ b/nfc_magic/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=[ diff --git a/nfc_magic/nfc_magic_app.c b/nfc_magic/nfc_magic_app.c index 1a0d9ae9564..36ad38b4de8 100644 --- a/nfc_magic/nfc_magic_app.c +++ b/nfc_magic/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); } } diff --git a/picopass/.catalog/changelog.md b/picopass/.catalog/changelog.md index b4391f6eea9..22e0da95508 100644 --- a/picopass/.catalog/changelog.md +++ b/picopass/.catalog/changelog.md @@ -1,3 +1,5 @@ +## 1.8 + - Minimal changes for recent API updates ## 1.7 - Rework application with new NFC API ## 1.6 diff --git a/picopass/application.fam b/picopass/application.fam index 6f51f30c889..a4def0c71ab 100644 --- a/picopass/application.fam +++ b/picopass/application.fam @@ -10,7 +10,7 @@ App( ], stack_size=4 * 1024, fap_description="App to communicate with NFC tags using the PicoPass(iClass) format", - fap_version="1.7", + fap_version="1.8", fap_icon="125_10px.png", fap_category="NFC", fap_libs=["mbedtls"], diff --git a/picopass/picopass.c b/picopass/picopass.c index 73b77943974..14855870e65 100644 --- a/picopass/picopass.c +++ b/picopass/picopass.c @@ -196,15 +196,13 @@ void picopass_blink_stop(Picopass* picopass) { void picopass_show_loading_popup(void* context, bool show) { Picopass* picopass = 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(picopass->view_dispatcher, PicopassViewLoading); } else { // Restore default timer priority - vTaskPrioritySet(timer_task, configTIMER_TASK_PRIORITY); + furi_timer_set_thread_priority(FuriTimerThreadPriorityNormal); } } diff --git a/weather_station/.catalog/changelog.md b/weather_station/.catalog/changelog.md index 3b5acedfe5f..cc2ef090a9a 100644 --- a/weather_station/.catalog/changelog.md +++ b/weather_station/.catalog/changelog.md @@ -1,6 +1,6 @@ ## 1.2 - Add protocol Acurite-986 - - Functions for working with delays have been changed + - Minimal changes for recent API updates ## 1.1 - Add protocol Auriol_AHFL ## 1.0