diff --git a/applications/archive/scenes/archive_scene_browser.c b/applications/archive/scenes/archive_scene_browser.c index ed6204ff..000408c3 100644 --- a/applications/archive/scenes/archive_scene_browser.c +++ b/applications/archive/scenes/archive_scene_browser.c @@ -6,7 +6,7 @@ void archive_scene_browser_callback(ArchiveBrowserEvent event, void* context) { view_dispatcher_send_custom_event(archive->view_dispatcher, event); } -const void archive_scene_browser_on_enter(void* context) { +void archive_scene_browser_on_enter(void* context) { ArchiveApp* archive = (ArchiveApp*)context; ArchiveMainView* main_view = archive->main_view; @@ -15,9 +15,9 @@ const void archive_scene_browser_on_enter(void* context) { view_dispatcher_switch_to_view(archive->view_dispatcher, ArchiveViewBrowser); } -const bool archive_scene_browser_on_event(void* context, SceneManagerEvent event) { +bool archive_scene_browser_on_event(void* context, SceneManagerEvent event) { ArchiveApp* archive = (ArchiveApp*)context; - bool consumed; + bool consumed = false; if(event.type == SceneManagerEventTypeCustom) { switch(event.event) { @@ -37,6 +37,6 @@ const bool archive_scene_browser_on_event(void* context, SceneManagerEvent event return consumed; } -const void archive_scene_browser_on_exit(void* context) { +void archive_scene_browser_on_exit(void* context) { // ArchiveApp* archive = (ArchiveApp*)context; } diff --git a/applications/archive/scenes/archive_scene_rename.c b/applications/archive/scenes/archive_scene_rename.c index 51918e5a..478eaf71 100644 --- a/applications/archive/scenes/archive_scene_rename.c +++ b/applications/archive/scenes/archive_scene_rename.c @@ -9,7 +9,7 @@ void archive_scene_rename_text_input_callback(void* context) { view_dispatcher_send_custom_event(archive->view_dispatcher, SCENE_RENAME_CUSTOM_EVENT); } -const void archive_scene_rename_on_enter(void* context) { +void archive_scene_rename_on_enter(void* context) { ArchiveApp* archive = (ArchiveApp*)context; TextInput* text_input = archive->text_input; @@ -31,7 +31,7 @@ const void archive_scene_rename_on_enter(void* context) { view_dispatcher_switch_to_view(archive->view_dispatcher, ArchiveViewTextInput); } -const bool archive_scene_rename_on_event(void* context, SceneManagerEvent event) { +bool archive_scene_rename_on_event(void* context, SceneManagerEvent event) { ArchiveApp* archive = (ArchiveApp*)context; bool consumed = false; @@ -72,7 +72,7 @@ const bool archive_scene_rename_on_event(void* context, SceneManagerEvent event) return consumed; } -const void archive_scene_rename_on_exit(void* context) { +void archive_scene_rename_on_exit(void* context) { ArchiveApp* archive = (ArchiveApp*)context; // Clear view text_input_set_header_text(archive->text_input, NULL); diff --git a/applications/bt/bt_cli.c b/applications/bt/bt_cli.c index 47a05d06..3232e526 100644 --- a/applications/bt/bt_cli.c +++ b/applications/bt/bt_cli.c @@ -18,7 +18,7 @@ void bt_cli_command_info(Cli* cli, string_t args, void* context) { string_t buffer; string_init(buffer); furi_hal_bt_dump_state(buffer); - printf(string_get_cstr(buffer)); + printf("%s", string_get_cstr(buffer)); string_clear(buffer); } diff --git a/applications/cli/cli.c b/applications/cli/cli.c index 9a3ae259..d9fde866 100644 --- a/applications/cli/cli.c +++ b/applications/cli/cli.c @@ -276,7 +276,7 @@ static void cli_handle_escape(Cli* cli, char c) { string_set(cli->line, cli->last_line); cli->cursor_position = string_size(cli->line); // Show new line to user - printf(string_get_cstr(cli->line)); + printf("%s", string_get_cstr(cli->line)); } } else if(c == 'B') { } else if(c == 'C') { diff --git a/applications/cli/cli_commands.c b/applications/cli/cli_commands.c index f03c12e7..e43f81a0 100644 --- a/applications/cli/cli_commands.c +++ b/applications/cli/cli_commands.c @@ -138,7 +138,7 @@ void cli_command_help(Cli* cli, string_t args, void* context) { } // Right Column if(!CliCommandTree_end_p(it_right)) { - printf(string_get_cstr(*CliCommandTree_ref(it_right)->key_ptr)); + printf("%s", string_get_cstr(*CliCommandTree_ref(it_right)->key_ptr)); CliCommandTree_next(it_right); } }; @@ -146,7 +146,7 @@ void cli_command_help(Cli* cli, string_t args, void* context) { if(string_size(args) > 0) { cli_nl(); printf("Also I have no clue what '"); - printf(string_get_cstr(args)); + printf("%s", string_get_cstr(args)); printf("' is."); } } diff --git a/applications/gui/modules/file_select.c b/applications/gui/modules/file_select.c index f41b95c9..4007fd95 100644 --- a/applications/gui/modules/file_select.c +++ b/applications/gui/modules/file_select.c @@ -1,7 +1,6 @@ #include "file_select.h" #include #include -#include #include #define FILENAME_COUNT 4 diff --git a/applications/menu/menu_item.c b/applications/menu/menu_item.c index c87505f0..b79cdabd 100644 --- a/applications/menu/menu_item.c +++ b/applications/menu/menu_item.c @@ -77,7 +77,7 @@ void menu_item_subitem_add(MenuItem* menu_item, MenuItem* sub_item) { MenuItemArray_push_back(*items, sub_item); } -uint8_t menu_item_get_type(MenuItem* menu_item) { +MenuItemType menu_item_get_type(MenuItem* menu_item) { furi_assert(menu_item); return menu_item->type; } diff --git a/applications/nfc/nfc_cli.c b/applications/nfc/nfc_cli.c index 0326048a..22325103 100755 --- a/applications/nfc/nfc_cli.c +++ b/applications/nfc/nfc_cli.c @@ -27,7 +27,7 @@ void nfc_cli_detect(Cli* cli, string_t args, void* context) { if(dev_cnt > 0) { printf("Found %d devices\r\n", dev_cnt); for(uint8_t i = 0; i < dev_cnt; i++) { - printf("%d found: %s ", i + 1, nfc_get_dev_type(dev_list[i].type)); + printf("%d found: %s ", i + 1, nfc_get_rfal_type(dev_list[i].type)); if(dev_list[i].type == RFAL_NFC_LISTEN_TYPE_NFCA) { printf("type: %s, ", nfc_get_nfca_type(dev_list[i].dev.nfca.type)); } diff --git a/applications/nfc/nfc_types.h b/applications/nfc/nfc_types.h index 46899b6d..6c37076a 100644 --- a/applications/nfc/nfc_types.h +++ b/applications/nfc/nfc_types.h @@ -6,19 +6,33 @@ #include #include "nfc_worker.h" -static inline const char* nfc_get_dev_type(rfalNfcDevType type) { +static inline const char* nfc_get_rfal_type(rfalNfcDevType type) { if(type == RFAL_NFC_LISTEN_TYPE_NFCA) { - return "NFC-A may be:"; + return "NFC-A"; } else if(type == RFAL_NFC_LISTEN_TYPE_NFCB) { - return "NFC-B may be:"; + return "NFC-B"; } else if(type == RFAL_NFC_LISTEN_TYPE_NFCF) { - return "NFC-F may be:"; + return "NFC-F"; } else if(type == RFAL_NFC_LISTEN_TYPE_NFCV) { - return "NFC-V may be:"; + return "NFC-V"; } else if(type == RFAL_NFC_LISTEN_TYPE_ST25TB) { - return "NFC-ST25TB may be:"; + return "NFC-ST25TB"; } else if(type == RFAL_NFC_LISTEN_TYPE_AP2P) { - return "NFC-AP2P may be:"; + return "NFC-AP2P"; + } else { + return "Unknown"; + } +} + +static inline const char* nfc_get_dev_type(NfcDeviceType type) { + if(type == NfcDeviceNfca) { + return "NFC-A may be:"; + } else if(type == NfcDeviceNfcb) { + return "NFC-B may be:"; + } else if(type == NfcDeviceNfcf) { + return "NFC-F may be:"; + } else if(type == NfcDeviceNfcv) { + return "NFC-V may be:"; } else { return "Unknown"; } diff --git a/applications/nfc/scenes/nfc_scene_card_menu.c b/applications/nfc/scenes/nfc_scene_card_menu.c index f58c212e..dbaefe4f 100755 --- a/applications/nfc/scenes/nfc_scene_card_menu.c +++ b/applications/nfc/scenes/nfc_scene_card_menu.c @@ -13,7 +13,7 @@ void nfc_scene_card_menu_submenu_callback(void* context, uint32_t index) { view_dispatcher_send_custom_event(nfc->view_dispatcher, index); } -const void nfc_scene_card_menu_on_enter(void* context) { +void nfc_scene_card_menu_on_enter(void* context) { Nfc* nfc = (Nfc*)context; Submenu* submenu = nfc->submenu; @@ -41,7 +41,7 @@ const void nfc_scene_card_menu_on_enter(void* context) { view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewMenu); } -const bool nfc_scene_card_menu_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_card_menu_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = (Nfc*)context; if(event.type == SceneManagerEventTypeCustom) { @@ -78,7 +78,7 @@ const bool nfc_scene_card_menu_on_event(void* context, SceneManagerEvent event) return false; } -const void nfc_scene_card_menu_on_exit(void* context) { +void nfc_scene_card_menu_on_exit(void* context) { Nfc* nfc = (Nfc*)context; submenu_clean(nfc->submenu); diff --git a/applications/nfc/scenes/nfc_scene_delete.c b/applications/nfc/scenes/nfc_scene_delete.c index 5c6fe254..993e1e37 100755 --- a/applications/nfc/scenes/nfc_scene_delete.c +++ b/applications/nfc/scenes/nfc_scene_delete.c @@ -66,7 +66,7 @@ void nfc_scene_delete_on_enter(void* context) { view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewWidget); } -const bool nfc_scene_delete_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_delete_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = (Nfc*)context; if(event.type == SceneManagerEventTypeCustom) { @@ -85,7 +85,7 @@ const bool nfc_scene_delete_on_event(void* context, SceneManagerEvent event) { return false; } -const void nfc_scene_delete_on_exit(void* context) { +void nfc_scene_delete_on_exit(void* context) { Nfc* nfc = (Nfc*)context; widget_clear(nfc->widget); diff --git a/applications/nfc/scenes/nfc_scene_delete_success.c b/applications/nfc/scenes/nfc_scene_delete_success.c index 51328a0a..96e70693 100755 --- a/applications/nfc/scenes/nfc_scene_delete_success.c +++ b/applications/nfc/scenes/nfc_scene_delete_success.c @@ -7,7 +7,7 @@ void nfc_scene_delete_success_popup_callback(void* context) { view_dispatcher_send_custom_event(nfc->view_dispatcher, SCENE_SAVE_SUCCESS_CUSTOM_EVENT); } -const void nfc_scene_delete_success_on_enter(void* context) { +void nfc_scene_delete_success_on_enter(void* context) { Nfc* nfc = (Nfc*)context; // Setup view @@ -21,7 +21,7 @@ const void nfc_scene_delete_success_on_enter(void* context) { view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewPopup); } -const bool nfc_scene_delete_success_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_delete_success_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = (Nfc*)context; if(event.type == SceneManagerEventTypeCustom) { @@ -33,7 +33,7 @@ const bool nfc_scene_delete_success_on_event(void* context, SceneManagerEvent ev return false; } -const void nfc_scene_delete_success_on_exit(void* context) { +void nfc_scene_delete_success_on_exit(void* context) { Nfc* nfc = (Nfc*)context; // Clear view diff --git a/applications/nfc/scenes/nfc_scene_device_info.c b/applications/nfc/scenes/nfc_scene_device_info.c index 43082dcf..0b0067c0 100755 --- a/applications/nfc/scenes/nfc_scene_device_info.c +++ b/applications/nfc/scenes/nfc_scene_device_info.c @@ -127,7 +127,7 @@ void nfc_scene_device_info_on_enter(void* context) { view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewWidget); } -const bool nfc_scene_device_info_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_device_info_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = context; bool consumed = false; uint32_t state = scene_manager_get_scene_state(nfc->scene_manager, NfcSceneDeviceInfo); @@ -162,7 +162,7 @@ const bool nfc_scene_device_info_on_event(void* context, SceneManagerEvent event return consumed; } -const void nfc_scene_device_info_on_exit(void* context) { +void nfc_scene_device_info_on_exit(void* context) { Nfc* nfc = (Nfc*)context; // Clear Custom Widget diff --git a/applications/nfc/scenes/nfc_scene_emulate_apdu_sequence.c b/applications/nfc/scenes/nfc_scene_emulate_apdu_sequence.c index 70288054..b08660b3 100644 --- a/applications/nfc/scenes/nfc_scene_emulate_apdu_sequence.c +++ b/applications/nfc/scenes/nfc_scene_emulate_apdu_sequence.c @@ -1,6 +1,6 @@ #include "../nfc_i.h" -const void nfc_scene_emulate_apdu_sequence_on_enter(void* context) { +void nfc_scene_emulate_apdu_sequence_on_enter(void* context) { Nfc* nfc = (Nfc*)context; // Setup view @@ -14,7 +14,7 @@ const void nfc_scene_emulate_apdu_sequence_on_enter(void* context) { nfc_worker_start(nfc->worker, NfcWorkerStateEmulateApdu, &nfc->dev.dev_data, NULL, nfc); } -const bool nfc_scene_emulate_apdu_sequence_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_emulate_apdu_sequence_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = (Nfc*)context; if(event.type == SceneManagerEventTypeTick) { @@ -24,7 +24,7 @@ const bool nfc_scene_emulate_apdu_sequence_on_event(void* context, SceneManagerE return false; } -const void nfc_scene_emulate_apdu_sequence_on_exit(void* context) { +void nfc_scene_emulate_apdu_sequence_on_exit(void* context) { Nfc* nfc = (Nfc*)context; // Stop worker diff --git a/applications/nfc/scenes/nfc_scene_emulate_mifare_ul.c b/applications/nfc/scenes/nfc_scene_emulate_mifare_ul.c index d1d52bef..cba09437 100755 --- a/applications/nfc/scenes/nfc_scene_emulate_mifare_ul.c +++ b/applications/nfc/scenes/nfc_scene_emulate_mifare_ul.c @@ -9,7 +9,7 @@ void nfc_emulate_mifare_ul_worker_callback(void* context) { nfc->scene_manager, NfcSceneEmulateMifareUl, NFC_MF_UL_DATA_CHANGED); } -const void nfc_scene_emulate_mifare_ul_on_enter(void* context) { +void nfc_scene_emulate_mifare_ul_on_enter(void* context) { Nfc* nfc = (Nfc*)context; // Setup view @@ -30,7 +30,7 @@ const void nfc_scene_emulate_mifare_ul_on_enter(void* context) { nfc); } -const bool nfc_scene_emulate_mifare_ul_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_emulate_mifare_ul_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = (Nfc*)context; bool consumed = false; @@ -52,7 +52,7 @@ const bool nfc_scene_emulate_mifare_ul_on_event(void* context, SceneManagerEvent return consumed; } -const void nfc_scene_emulate_mifare_ul_on_exit(void* context) { +void nfc_scene_emulate_mifare_ul_on_exit(void* context) { Nfc* nfc = (Nfc*)context; // Clear view diff --git a/applications/nfc/scenes/nfc_scene_emulate_uid.c b/applications/nfc/scenes/nfc_scene_emulate_uid.c index 3810bec4..ccd27de5 100755 --- a/applications/nfc/scenes/nfc_scene_emulate_uid.c +++ b/applications/nfc/scenes/nfc_scene_emulate_uid.c @@ -1,6 +1,6 @@ #include "../nfc_i.h" -const void nfc_scene_emulate_uid_on_enter(void* context) { +void nfc_scene_emulate_uid_on_enter(void* context) { Nfc* nfc = (Nfc*)context; // Setup view @@ -35,7 +35,7 @@ const void nfc_scene_emulate_uid_on_enter(void* context) { nfc_worker_start(nfc->worker, NfcWorkerStateEmulate, &nfc->dev.dev_data, NULL, nfc); } -const bool nfc_scene_emulate_uid_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_emulate_uid_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = (Nfc*)context; if(event.type == SceneManagerEventTypeTick) { @@ -45,7 +45,7 @@ const bool nfc_scene_emulate_uid_on_event(void* context, SceneManagerEvent event return false; } -const void nfc_scene_emulate_uid_on_exit(void* context) { +void nfc_scene_emulate_uid_on_exit(void* context) { Nfc* nfc = (Nfc*)context; // Stop worker diff --git a/applications/nfc/scenes/nfc_scene_file_select.c b/applications/nfc/scenes/nfc_scene_file_select.c index e75872a3..67894fbf 100755 --- a/applications/nfc/scenes/nfc_scene_file_select.c +++ b/applications/nfc/scenes/nfc_scene_file_select.c @@ -1,6 +1,6 @@ #include "../nfc_i.h" -const void nfc_scene_file_select_on_enter(void* context) { +void nfc_scene_file_select_on_enter(void* context) { Nfc* nfc = (Nfc*)context; // Process file_select return if(nfc_file_select(&nfc->dev)) { @@ -10,9 +10,9 @@ const void nfc_scene_file_select_on_enter(void* context) { } } -const bool nfc_scene_file_select_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_file_select_on_event(void* context, SceneManagerEvent event) { return false; } -const void nfc_scene_file_select_on_exit(void* context) { +void nfc_scene_file_select_on_exit(void* context) { } diff --git a/applications/nfc/scenes/nfc_scene_mifare_ul_menu.c b/applications/nfc/scenes/nfc_scene_mifare_ul_menu.c index 70716618..5c31ab2c 100755 --- a/applications/nfc/scenes/nfc_scene_mifare_ul_menu.c +++ b/applications/nfc/scenes/nfc_scene_mifare_ul_menu.c @@ -11,7 +11,7 @@ void nfc_scene_mifare_ul_menu_submenu_callback(void* context, uint32_t index) { view_dispatcher_send_custom_event(nfc->view_dispatcher, index); } -const void nfc_scene_mifare_ul_menu_on_enter(void* context) { +void nfc_scene_mifare_ul_menu_on_enter(void* context) { Nfc* nfc = (Nfc*)context; Submenu* submenu = nfc->submenu; @@ -25,7 +25,7 @@ const void nfc_scene_mifare_ul_menu_on_enter(void* context) { view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewMenu); } -const bool nfc_scene_mifare_ul_menu_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_mifare_ul_menu_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = (Nfc*)context; if(event.type == SceneManagerEventTypeCustom) { @@ -49,7 +49,7 @@ const bool nfc_scene_mifare_ul_menu_on_event(void* context, SceneManagerEvent ev return false; } -const void nfc_scene_mifare_ul_menu_on_exit(void* context) { +void nfc_scene_mifare_ul_menu_on_exit(void* context) { Nfc* nfc = (Nfc*)context; submenu_clean(nfc->submenu); diff --git a/applications/nfc/scenes/nfc_scene_not_implemented.c b/applications/nfc/scenes/nfc_scene_not_implemented.c index f23bbe4a..3167f9c0 100644 --- a/applications/nfc/scenes/nfc_scene_not_implemented.c +++ b/applications/nfc/scenes/nfc_scene_not_implemented.c @@ -6,7 +6,7 @@ void nfc_scene_not_implemented_dialog_callback(DialogExResult result, void* cont view_dispatcher_send_custom_event(nfc->view_dispatcher, result); } -const void nfc_scene_not_implemented_on_enter(void* context) { +void nfc_scene_not_implemented_on_enter(void* context) { Nfc* nfc = (Nfc*)context; // TODO Set data from worker @@ -19,7 +19,7 @@ const void nfc_scene_not_implemented_on_enter(void* context) { view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewDialogEx); } -const bool nfc_scene_not_implemented_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_not_implemented_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = (Nfc*)context; if(event.type == SceneManagerEventTypeCustom) { @@ -30,7 +30,7 @@ const bool nfc_scene_not_implemented_on_event(void* context, SceneManagerEvent e return false; } -const void nfc_scene_not_implemented_on_exit(void* context) { +void nfc_scene_not_implemented_on_exit(void* context) { Nfc* nfc = (Nfc*)context; DialogEx* dialog_ex = nfc->dialog_ex; diff --git a/applications/nfc/scenes/nfc_scene_read_card.c b/applications/nfc/scenes/nfc_scene_read_card.c index 4b32c36d..fda69b05 100755 --- a/applications/nfc/scenes/nfc_scene_read_card.c +++ b/applications/nfc/scenes/nfc_scene_read_card.c @@ -7,7 +7,7 @@ void nfc_read_card_worker_callback(void* context) { view_dispatcher_send_custom_event(nfc->view_dispatcher, NFC_READ_CARD_CUSTOM_EVENT); } -const void nfc_scene_read_card_on_enter(void* context) { +void nfc_scene_read_card_on_enter(void* context) { Nfc* nfc = (Nfc*)context; // Setup view @@ -21,7 +21,7 @@ const void nfc_scene_read_card_on_enter(void* context) { nfc->worker, NfcWorkerStateDetect, &nfc->dev.dev_data, nfc_read_card_worker_callback, nfc); } -const bool nfc_scene_read_card_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_read_card_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = (Nfc*)context; if(event.type == SceneManagerEventTypeCustom) { @@ -36,7 +36,7 @@ const bool nfc_scene_read_card_on_event(void* context, SceneManagerEvent event) return false; } -const void nfc_scene_read_card_on_exit(void* context) { +void nfc_scene_read_card_on_exit(void* context) { Nfc* nfc = (Nfc*)context; // Stop worker diff --git a/applications/nfc/scenes/nfc_scene_read_card_success.c b/applications/nfc/scenes/nfc_scene_read_card_success.c index 93223a70..b745eae3 100755 --- a/applications/nfc/scenes/nfc_scene_read_card_success.c +++ b/applications/nfc/scenes/nfc_scene_read_card_success.c @@ -63,7 +63,7 @@ void nfc_scene_read_card_success_on_enter(void* context) { view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewDialogEx); } -const bool nfc_scene_read_card_success_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_read_card_success_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = (Nfc*)context; if(event.type == SceneManagerEventTypeCustom) { @@ -77,7 +77,7 @@ const bool nfc_scene_read_card_success_on_event(void* context, SceneManagerEvent return false; } -const void nfc_scene_read_card_success_on_exit(void* context) { +void nfc_scene_read_card_success_on_exit(void* context) { Nfc* nfc = (Nfc*)context; DialogEx* dialog_ex = nfc->dialog_ex; diff --git a/applications/nfc/scenes/nfc_scene_read_emv_app.c b/applications/nfc/scenes/nfc_scene_read_emv_app.c index ae00431b..d0198791 100755 --- a/applications/nfc/scenes/nfc_scene_read_emv_app.c +++ b/applications/nfc/scenes/nfc_scene_read_emv_app.c @@ -7,7 +7,7 @@ void nfc_read_emv_app_worker_callback(void* context) { view_dispatcher_send_custom_event(nfc->view_dispatcher, NFC_READ_EMV_APP_CUSTOM_EVENT); } -const void nfc_scene_read_emv_app_on_enter(void* context) { +void nfc_scene_read_emv_app_on_enter(void* context) { Nfc* nfc = (Nfc*)context; // Setup view @@ -25,7 +25,7 @@ const void nfc_scene_read_emv_app_on_enter(void* context) { nfc); } -const bool nfc_scene_read_emv_app_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_read_emv_app_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = (Nfc*)context; if(event.type == SceneManagerEventTypeCustom) { @@ -40,7 +40,7 @@ const bool nfc_scene_read_emv_app_on_event(void* context, SceneManagerEvent even return false; } -const void nfc_scene_read_emv_app_on_exit(void* context) { +void nfc_scene_read_emv_app_on_exit(void* context) { Nfc* nfc = (Nfc*)context; // Stop worker diff --git a/applications/nfc/scenes/nfc_scene_read_emv_app_success.c b/applications/nfc/scenes/nfc_scene_read_emv_app_success.c index dc95bfe6..a3371086 100755 --- a/applications/nfc/scenes/nfc_scene_read_emv_app_success.c +++ b/applications/nfc/scenes/nfc_scene_read_emv_app_success.c @@ -45,7 +45,7 @@ void nfc_scene_read_emv_app_success_on_enter(void* context) { view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewDialogEx); } -const bool nfc_scene_read_emv_app_success_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_read_emv_app_success_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = (Nfc*)context; if(event.type == SceneManagerEventTypeCustom) { @@ -59,7 +59,7 @@ const bool nfc_scene_read_emv_app_success_on_event(void* context, SceneManagerEv return false; } -const void nfc_scene_read_emv_app_success_on_exit(void* context) { +void nfc_scene_read_emv_app_success_on_exit(void* context) { Nfc* nfc = (Nfc*)context; DialogEx* dialog_ex = nfc->dialog_ex; diff --git a/applications/nfc/scenes/nfc_scene_read_emv_data.c b/applications/nfc/scenes/nfc_scene_read_emv_data.c index 0aeb6fe0..44389e5a 100644 --- a/applications/nfc/scenes/nfc_scene_read_emv_data.c +++ b/applications/nfc/scenes/nfc_scene_read_emv_data.c @@ -7,7 +7,7 @@ void nfc_read_emv_data_worker_callback(void* context) { view_dispatcher_send_custom_event(nfc->view_dispatcher, NFC_READ_EMV_DATA_CUSTOM_EVENT); } -const void nfc_scene_read_emv_data_on_enter(void* context) { +void nfc_scene_read_emv_data_on_enter(void* context) { Nfc* nfc = (Nfc*)context; // Setup view @@ -27,7 +27,7 @@ const void nfc_scene_read_emv_data_on_enter(void* context) { nfc); } -const bool nfc_scene_read_emv_data_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_read_emv_data_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = (Nfc*)context; if(event.type == SceneManagerEventTypeCustom) { @@ -42,7 +42,7 @@ const bool nfc_scene_read_emv_data_on_event(void* context, SceneManagerEvent eve return false; } -const void nfc_scene_read_emv_data_on_exit(void* context) { +void nfc_scene_read_emv_data_on_exit(void* context) { Nfc* nfc = (Nfc*)context; // Stop worker diff --git a/applications/nfc/scenes/nfc_scene_read_emv_data_success.c b/applications/nfc/scenes/nfc_scene_read_emv_data_success.c index c0b61111..8a98f5ae 100755 --- a/applications/nfc/scenes/nfc_scene_read_emv_data_success.c +++ b/applications/nfc/scenes/nfc_scene_read_emv_data_success.c @@ -113,7 +113,7 @@ void nfc_scene_read_emv_data_success_on_enter(void* context) { view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewWidget); } -const bool nfc_scene_read_emv_data_success_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_read_emv_data_success_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = (Nfc*)context; if(event.type == SceneManagerEventTypeCustom) { @@ -132,7 +132,7 @@ const bool nfc_scene_read_emv_data_success_on_event(void* context, SceneManagerE return false; } -const void nfc_scene_read_emv_data_success_on_exit(void* context) { +void nfc_scene_read_emv_data_success_on_exit(void* context) { Nfc* nfc = (Nfc*)context; widget_clear(nfc->widget); diff --git a/applications/nfc/scenes/nfc_scene_read_mifare_ul.c b/applications/nfc/scenes/nfc_scene_read_mifare_ul.c index d1997d51..95e890b5 100755 --- a/applications/nfc/scenes/nfc_scene_read_mifare_ul.c +++ b/applications/nfc/scenes/nfc_scene_read_mifare_ul.c @@ -7,7 +7,7 @@ void nfc_read_mifare_ul_worker_callback(void* context) { view_dispatcher_send_custom_event(nfc->view_dispatcher, NFC_READ_MIFARE_UL_CUSTOM_EVENT); } -const void nfc_scene_read_mifare_ul_on_enter(void* context) { +void nfc_scene_read_mifare_ul_on_enter(void* context) { Nfc* nfc = (Nfc*)context; // Setup view @@ -25,7 +25,7 @@ const void nfc_scene_read_mifare_ul_on_enter(void* context) { nfc); } -const bool nfc_scene_read_mifare_ul_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_read_mifare_ul_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = (Nfc*)context; if(event.type == SceneManagerEventTypeCustom) { @@ -40,7 +40,7 @@ const bool nfc_scene_read_mifare_ul_on_event(void* context, SceneManagerEvent ev return false; } -const void nfc_scene_read_mifare_ul_on_exit(void* context) { +void nfc_scene_read_mifare_ul_on_exit(void* context) { Nfc* nfc = (Nfc*)context; // Stop worker diff --git a/applications/nfc/scenes/nfc_scene_read_mifare_ul_success.c b/applications/nfc/scenes/nfc_scene_read_mifare_ul_success.c index c0a2a9f3..f1324dfa 100755 --- a/applications/nfc/scenes/nfc_scene_read_mifare_ul_success.c +++ b/applications/nfc/scenes/nfc_scene_read_mifare_ul_success.c @@ -20,7 +20,7 @@ void nfc_scene_read_mifare_ul_success_text_box_callback(void* context) { view_dispatcher_send_custom_event(nfc->view_dispatcher, NFC_SCENE_READ_MF_UL_CUSTOM_EVENT); } -const void nfc_scene_read_mifare_ul_success_on_enter(void* context) { +void nfc_scene_read_mifare_ul_success_on_enter(void* context) { Nfc* nfc = (Nfc*)context; // Clear device name @@ -76,7 +76,7 @@ const void nfc_scene_read_mifare_ul_success_on_enter(void* context) { view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewDialogEx); } -const bool nfc_scene_read_mifare_ul_success_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_read_mifare_ul_success_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = (Nfc*)context; if(event.type == SceneManagerEventTypeCustom) { @@ -112,7 +112,7 @@ const bool nfc_scene_read_mifare_ul_success_on_event(void* context, SceneManager return false; } -const void nfc_scene_read_mifare_ul_success_on_exit(void* context) { +void nfc_scene_read_mifare_ul_success_on_exit(void* context) { Nfc* nfc = (Nfc*)context; // Clean dialog diff --git a/applications/nfc/scenes/nfc_scene_restore_original.c b/applications/nfc/scenes/nfc_scene_restore_original.c index 3229d023..12481592 100644 --- a/applications/nfc/scenes/nfc_scene_restore_original.c +++ b/applications/nfc/scenes/nfc_scene_restore_original.c @@ -7,7 +7,7 @@ void nfc_scene_restore_original_popup_callback(void* context) { view_dispatcher_send_custom_event(nfc->view_dispatcher, SCENE_RESTORE_ORIGINAL_CUSTOM_EVENT); } -const void nfc_scene_restore_original_on_enter(void* context) { +void nfc_scene_restore_original_on_enter(void* context) { Nfc* nfc = (Nfc*)context; // Setup view @@ -21,7 +21,7 @@ const void nfc_scene_restore_original_on_enter(void* context) { view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewPopup); } -const bool nfc_scene_restore_original_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_restore_original_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = (Nfc*)context; bool consumed = false; @@ -33,7 +33,7 @@ const bool nfc_scene_restore_original_on_event(void* context, SceneManagerEvent return consumed; } -const void nfc_scene_restore_original_on_exit(void* context) { +void nfc_scene_restore_original_on_exit(void* context) { Nfc* nfc = (Nfc*)context; // Clear view diff --git a/applications/nfc/scenes/nfc_scene_run_emv_app_confirm.c b/applications/nfc/scenes/nfc_scene_run_emv_app_confirm.c index 609ccfc5..7d12aa4b 100755 --- a/applications/nfc/scenes/nfc_scene_run_emv_app_confirm.c +++ b/applications/nfc/scenes/nfc_scene_run_emv_app_confirm.c @@ -28,7 +28,7 @@ void nfc_scene_run_emv_app_confirm_on_enter(void* context) { view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewDialogEx); } -const bool nfc_scene_run_emv_app_confirm_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_run_emv_app_confirm_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = (Nfc*)context; if(event.type == SceneManagerEventTypeCustom) { @@ -42,7 +42,7 @@ const bool nfc_scene_run_emv_app_confirm_on_event(void* context, SceneManagerEve return false; } -const void nfc_scene_run_emv_app_confirm_on_exit(void* context) { +void nfc_scene_run_emv_app_confirm_on_exit(void* context) { Nfc* nfc = (Nfc*)context; DialogEx* dialog_ex = nfc->dialog_ex; diff --git a/applications/nfc/scenes/nfc_scene_save_name.c b/applications/nfc/scenes/nfc_scene_save_name.c index ca239f68..dc0c48cd 100755 --- a/applications/nfc/scenes/nfc_scene_save_name.c +++ b/applications/nfc/scenes/nfc_scene_save_name.c @@ -9,7 +9,7 @@ void nfc_scene_save_name_text_input_callback(void* context) { view_dispatcher_send_custom_event(nfc->view_dispatcher, SCENE_SAVE_NAME_CUSTOM_EVENT); } -const void nfc_scene_save_name_on_enter(void* context) { +void nfc_scene_save_name_on_enter(void* context) { Nfc* nfc = (Nfc*)context; // Setup view @@ -32,12 +32,12 @@ const void nfc_scene_save_name_on_enter(void* context) { view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewTextInput); } -const bool nfc_scene_save_name_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_save_name_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = (Nfc*)context; if(event.type == SceneManagerEventTypeCustom) { if(event.event == SCENE_SAVE_NAME_CUSTOM_EVENT) { - if(nfc->dev.dev_name) { + if(strcmp(nfc->dev.dev_name, "")) { nfc_device_delete(&nfc->dev); } if(scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneSetUid)) { @@ -56,7 +56,7 @@ const bool nfc_scene_save_name_on_event(void* context, SceneManagerEvent event) return false; } -const void nfc_scene_save_name_on_exit(void* context) { +void nfc_scene_save_name_on_exit(void* context) { Nfc* nfc = (Nfc*)context; // Clear view diff --git a/applications/nfc/scenes/nfc_scene_save_success.c b/applications/nfc/scenes/nfc_scene_save_success.c index 058388b6..57b08b07 100755 --- a/applications/nfc/scenes/nfc_scene_save_success.c +++ b/applications/nfc/scenes/nfc_scene_save_success.c @@ -7,7 +7,7 @@ void nfc_scene_save_success_popup_callback(void* context) { view_dispatcher_send_custom_event(nfc->view_dispatcher, SCENE_SAVE_SUCCESS_CUSTOM_EVENT); } -const void nfc_scene_save_success_on_enter(void* context) { +void nfc_scene_save_success_on_enter(void* context) { Nfc* nfc = (Nfc*)context; // Setup view @@ -21,7 +21,7 @@ const void nfc_scene_save_success_on_enter(void* context) { view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewPopup); } -const bool nfc_scene_save_success_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_save_success_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = (Nfc*)context; bool consumed = false; @@ -42,7 +42,7 @@ const bool nfc_scene_save_success_on_event(void* context, SceneManagerEvent even return consumed; } -const void nfc_scene_save_success_on_exit(void* context) { +void nfc_scene_save_success_on_exit(void* context) { Nfc* nfc = (Nfc*)context; // Clear view diff --git a/applications/nfc/scenes/nfc_scene_saved_menu.c b/applications/nfc/scenes/nfc_scene_saved_menu.c index cd682783..a8e2ce7f 100755 --- a/applications/nfc/scenes/nfc_scene_saved_menu.c +++ b/applications/nfc/scenes/nfc_scene_saved_menu.c @@ -14,7 +14,7 @@ void nfc_scene_saved_menu_submenu_callback(void* context, uint32_t index) { view_dispatcher_send_custom_event(nfc->view_dispatcher, index); } -const void nfc_scene_saved_menu_on_enter(void* context) { +void nfc_scene_saved_menu_on_enter(void* context) { Nfc* nfc = (Nfc*)context; Submenu* submenu = nfc->submenu; @@ -42,7 +42,7 @@ const void nfc_scene_saved_menu_on_enter(void* context) { view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewMenu); } -const bool nfc_scene_saved_menu_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_saved_menu_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = (Nfc*)context; bool consumed = false; @@ -78,7 +78,7 @@ const bool nfc_scene_saved_menu_on_event(void* context, SceneManagerEvent event) return consumed; } -const void nfc_scene_saved_menu_on_exit(void* context) { +void nfc_scene_saved_menu_on_exit(void* context) { Nfc* nfc = (Nfc*)context; submenu_clean(nfc->submenu); diff --git a/applications/nfc/scenes/nfc_scene_scripts_menu.c b/applications/nfc/scenes/nfc_scene_scripts_menu.c index 327d32c6..c82c4564 100755 --- a/applications/nfc/scenes/nfc_scene_scripts_menu.c +++ b/applications/nfc/scenes/nfc_scene_scripts_menu.c @@ -11,7 +11,7 @@ void nfc_scene_scripts_menu_submenu_callback(void* context, uint32_t index) { view_dispatcher_send_custom_event(nfc->view_dispatcher, index); } -const void nfc_scene_scripts_menu_on_enter(void* context) { +void nfc_scene_scripts_menu_on_enter(void* context) { Nfc* nfc = (Nfc*)context; Submenu* submenu = nfc->submenu; @@ -32,7 +32,7 @@ const void nfc_scene_scripts_menu_on_enter(void* context) { view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewMenu); } -const bool nfc_scene_scripts_menu_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_scripts_menu_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = (Nfc*)context; if(event.type == SceneManagerEventTypeCustom) { @@ -52,7 +52,7 @@ const bool nfc_scene_scripts_menu_on_event(void* context, SceneManagerEvent even return false; } -const void nfc_scene_scripts_menu_on_exit(void* context) { +void nfc_scene_scripts_menu_on_exit(void* context) { Nfc* nfc = (Nfc*)context; submenu_clean(nfc->submenu); diff --git a/applications/nfc/scenes/nfc_scene_set_atqa.c b/applications/nfc/scenes/nfc_scene_set_atqa.c index 80ceea17..7936880c 100755 --- a/applications/nfc/scenes/nfc_scene_set_atqa.c +++ b/applications/nfc/scenes/nfc_scene_set_atqa.c @@ -8,7 +8,7 @@ void nfc_scene_set_atqa_byte_input_callback(void* context) { view_dispatcher_send_custom_event(nfc->view_dispatcher, SCENE_SET_ATQA_CUSTOM_EVENT); } -const void nfc_scene_set_atqa_on_enter(void* context) { +void nfc_scene_set_atqa_on_enter(void* context) { Nfc* nfc = (Nfc*)context; // Setup view @@ -24,7 +24,7 @@ const void nfc_scene_set_atqa_on_enter(void* context) { view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewByteInput); } -const bool nfc_scene_set_atqa_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_set_atqa_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = (Nfc*)context; if(event.type == SceneManagerEventTypeCustom) { @@ -36,7 +36,7 @@ const bool nfc_scene_set_atqa_on_event(void* context, SceneManagerEvent event) { return false; } -const void nfc_scene_set_atqa_on_exit(void* context) { +void nfc_scene_set_atqa_on_exit(void* context) { Nfc* nfc = (Nfc*)context; // Clear view diff --git a/applications/nfc/scenes/nfc_scene_set_sak.c b/applications/nfc/scenes/nfc_scene_set_sak.c index 27646cc6..5df999d0 100755 --- a/applications/nfc/scenes/nfc_scene_set_sak.c +++ b/applications/nfc/scenes/nfc_scene_set_sak.c @@ -8,7 +8,7 @@ void nfc_scene_set_sak_byte_input_callback(void* context) { view_dispatcher_send_custom_event(nfc->view_dispatcher, SCENE_SET_SAK_CUSTOM_EVENT); } -const void nfc_scene_set_sak_on_enter(void* context) { +void nfc_scene_set_sak_on_enter(void* context) { Nfc* nfc = (Nfc*)context; // Setup view @@ -24,7 +24,7 @@ const void nfc_scene_set_sak_on_enter(void* context) { view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewByteInput); } -const bool nfc_scene_set_sak_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_set_sak_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = (Nfc*)context; if(event.type == SceneManagerEventTypeCustom) { @@ -36,7 +36,7 @@ const bool nfc_scene_set_sak_on_event(void* context, SceneManagerEvent event) { return false; } -const void nfc_scene_set_sak_on_exit(void* context) { +void nfc_scene_set_sak_on_exit(void* context) { Nfc* nfc = (Nfc*)context; // Clear view diff --git a/applications/nfc/scenes/nfc_scene_set_type.c b/applications/nfc/scenes/nfc_scene_set_type.c index 9798b8f7..7574123f 100755 --- a/applications/nfc/scenes/nfc_scene_set_type.c +++ b/applications/nfc/scenes/nfc_scene_set_type.c @@ -11,7 +11,7 @@ void nfc_scene_set_type_submenu_callback(void* context, uint32_t index) { view_dispatcher_send_custom_event(nfc->view_dispatcher, index); } -const void nfc_scene_set_type_on_enter(void* context) { +void nfc_scene_set_type_on_enter(void* context) { Nfc* nfc = (Nfc*)context; Submenu* submenu = nfc->submenu; @@ -22,7 +22,7 @@ const void nfc_scene_set_type_on_enter(void* context) { view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewMenu); } -const bool nfc_scene_set_type_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_set_type_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = (Nfc*)context; if(event.type == SceneManagerEventTypeCustom) { @@ -41,7 +41,7 @@ const bool nfc_scene_set_type_on_event(void* context, SceneManagerEvent event) { return false; } -const void nfc_scene_set_type_on_exit(void* context) { +void nfc_scene_set_type_on_exit(void* context) { Nfc* nfc = (Nfc*)context; submenu_clean(nfc->submenu); diff --git a/applications/nfc/scenes/nfc_scene_set_uid.c b/applications/nfc/scenes/nfc_scene_set_uid.c index dd448a78..7ecfbf32 100755 --- a/applications/nfc/scenes/nfc_scene_set_uid.c +++ b/applications/nfc/scenes/nfc_scene_set_uid.c @@ -8,7 +8,7 @@ void nfc_scene_set_uid_byte_input_callback(void* context) { view_dispatcher_send_custom_event(nfc->view_dispatcher, SCENE_SET_UID_CUSTOM_EVENT); } -const void nfc_scene_set_uid_on_enter(void* context) { +void nfc_scene_set_uid_on_enter(void* context) { Nfc* nfc = (Nfc*)context; // Setup view @@ -25,7 +25,7 @@ const void nfc_scene_set_uid_on_enter(void* context) { view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewByteInput); } -const bool nfc_scene_set_uid_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_set_uid_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = (Nfc*)context; if(event.type == SceneManagerEventTypeCustom) { @@ -37,7 +37,7 @@ const bool nfc_scene_set_uid_on_event(void* context, SceneManagerEvent event) { return false; } -const void nfc_scene_set_uid_on_exit(void* context) { +void nfc_scene_set_uid_on_exit(void* context) { Nfc* nfc = (Nfc*)context; // Clear view diff --git a/applications/nfc/scenes/nfc_scene_start.c b/applications/nfc/scenes/nfc_scene_start.c index 3b560c07..cdf7dbe2 100755 --- a/applications/nfc/scenes/nfc_scene_start.c +++ b/applications/nfc/scenes/nfc_scene_start.c @@ -14,7 +14,7 @@ void nfc_scene_start_submenu_callback(void* context, uint32_t index) { view_dispatcher_send_custom_event(nfc->view_dispatcher, index); } -const void nfc_scene_start_on_enter(void* context) { +void nfc_scene_start_on_enter(void* context) { Nfc* nfc = (Nfc*)context; Submenu* submenu = nfc->submenu; @@ -38,7 +38,7 @@ const void nfc_scene_start_on_enter(void* context) { view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewMenu); } -const bool nfc_scene_start_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_start_on_event(void* context, SceneManagerEvent event) { Nfc* nfc = (Nfc*)context; bool consumed = false; @@ -70,7 +70,7 @@ const bool nfc_scene_start_on_event(void* context, SceneManagerEvent event) { return consumed; } -const void nfc_scene_start_on_exit(void* context) { +void nfc_scene_start_on_exit(void* context) { Nfc* nfc = (Nfc*)context; submenu_clean(nfc->submenu); diff --git a/applications/storage/storages/storage-ext.c b/applications/storage/storages/storage-ext.c index b29fdf7a..a434c2d8 100644 --- a/applications/storage/storages/storage-ext.c +++ b/applications/storage/storages/storage-ext.c @@ -99,7 +99,8 @@ FS_Error sd_unmount_card(StorageData* storage) { SDError error; storage_data_lock(storage); - error = storage->status = StorageStatusNotReady; + storage->status = StorageStatusNotReady; + error = FR_DISK_ERR; // TODO do i need to close the files? diff --git a/applications/storage/storages/storage-int.c b/applications/storage/storages/storage-int.c index 473ac4f5..87c02786 100644 --- a/applications/storage/storages/storage-int.c +++ b/applications/storage/storages/storage-int.c @@ -286,7 +286,7 @@ static bool storage_int_file_open( if(access_mode & FSAM_READ) flags |= LFS_O_RDONLY; if(access_mode & FSAM_WRITE) flags |= LFS_O_WRONLY; - if(open_mode & FSOM_OPEN_EXISTING) flags = flags; + if(open_mode & FSOM_OPEN_EXISTING) flags |= 0; if(open_mode & FSOM_OPEN_ALWAYS) flags |= LFS_O_CREAT; if(open_mode & FSOM_OPEN_APPEND) flags |= LFS_O_CREAT | LFS_O_APPEND; if(open_mode & FSOM_CREATE_NEW) flags |= LFS_O_CREAT | LFS_O_EXCL; diff --git a/applications/subghz/scenes/subghz_scene_receiver.c b/applications/subghz/scenes/subghz_scene_receiver.c index ffe510aa..f2d66e6b 100644 --- a/applications/subghz/scenes/subghz_scene_receiver.c +++ b/applications/subghz/scenes/subghz_scene_receiver.c @@ -60,7 +60,7 @@ void subghz_scene_add_to_history_callback(SubGhzProtocolCommon* parser, void* co string_clear(str_buff); } -const void subghz_scene_receiver_on_enter(void* context) { +void subghz_scene_receiver_on_enter(void* context) { SubGhz* subghz = context; string_t str_buff; @@ -95,7 +95,7 @@ const void subghz_scene_receiver_on_enter(void* context) { view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewReceiver); } -const bool subghz_scene_receiver_on_event(void* context, SceneManagerEvent event) { +bool subghz_scene_receiver_on_event(void* context, SceneManagerEvent event) { SubGhz* subghz = context; if(event.type == SceneManagerEventTypeCustom) { @@ -147,6 +147,6 @@ const bool subghz_scene_receiver_on_event(void* context, SceneManagerEvent event return false; } -const void subghz_scene_receiver_on_exit(void* context) { +void subghz_scene_receiver_on_exit(void* context) { // SubGhz* subghz = context; } diff --git a/applications/subghz/scenes/subghz_scene_receiver_config.c b/applications/subghz/scenes/subghz_scene_receiver_config.c index 276fc4b9..9586c8f3 100644 --- a/applications/subghz/scenes/subghz_scene_receiver_config.c +++ b/applications/subghz/scenes/subghz_scene_receiver_config.c @@ -102,7 +102,7 @@ void subghz_scene_receiver_config_callback(SubghzReceverEvent event, void* conte view_dispatcher_send_custom_event(subghz->view_dispatcher, event); } -const void subghz_scene_receiver_config_on_enter(void* context) { +void subghz_scene_receiver_config_on_enter(void* context) { SubGhz* subghz = context; VariableItem* item; uint8_t value_index; @@ -145,12 +145,12 @@ const void subghz_scene_receiver_config_on_enter(void* context) { view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewVariableItemList); } -const bool subghz_scene_receiver_config_on_event(void* context, SceneManagerEvent event) { +bool subghz_scene_receiver_config_on_event(void* context, SceneManagerEvent event) { //SubGhz* subghz = context; return false; } -const void subghz_scene_receiver_config_on_exit(void* context) { +void subghz_scene_receiver_config_on_exit(void* context) { SubGhz* subghz = context; variable_item_list_clean(subghz->variable_item_list); } diff --git a/applications/subghz/scenes/subghz_scene_receiver_info.c b/applications/subghz/scenes/subghz_scene_receiver_info.c index 8f266337..7cea22b1 100644 --- a/applications/subghz/scenes/subghz_scene_receiver_info.c +++ b/applications/subghz/scenes/subghz_scene_receiver_info.c @@ -41,7 +41,7 @@ static bool subghz_scene_receiver_info_update_parser(void* context) { return false; } -const void subghz_scene_receiver_info_on_enter(void* context) { +void subghz_scene_receiver_info_on_enter(void* context) { SubGhz* subghz = context; if(subghz_scene_receiver_info_update_parser(subghz)) { @@ -96,7 +96,7 @@ const void subghz_scene_receiver_info_on_enter(void* context) { view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewWidget); } -const bool subghz_scene_receiver_info_on_event(void* context, SceneManagerEvent event) { +bool subghz_scene_receiver_info_on_event(void* context, SceneManagerEvent event) { SubGhz* subghz = context; if(event.type == SceneManagerEventTypeCustom) { if(event.event == SubGhzSceneReceiverInfoCustomEventTxStart) { @@ -167,7 +167,7 @@ const bool subghz_scene_receiver_info_on_event(void* context, SceneManagerEvent return false; } -const void subghz_scene_receiver_info_on_exit(void* context) { +void subghz_scene_receiver_info_on_exit(void* context) { SubGhz* subghz = context; widget_clear(subghz->widget); } diff --git a/applications/subghz/scenes/subghz_scene_save_name.c b/applications/subghz/scenes/subghz_scene_save_name.c index b73f31b9..1ebb5d3b 100644 --- a/applications/subghz/scenes/subghz_scene_save_name.c +++ b/applications/subghz/scenes/subghz_scene_save_name.c @@ -9,7 +9,7 @@ void subghz_scene_save_name_text_input_callback(void* context) { view_dispatcher_send_custom_event(subghz->view_dispatcher, SCENE_SAVE_NAME_CUSTOM_EVENT); } -const void subghz_scene_save_name_on_enter(void* context) { +void subghz_scene_save_name_on_enter(void* context) { SubGhz* subghz = context; // Setup view @@ -30,7 +30,7 @@ const void subghz_scene_save_name_on_enter(void* context) { view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewTextInput); } -const bool subghz_scene_save_name_on_event(void* context, SceneManagerEvent event) { +bool subghz_scene_save_name_on_event(void* context, SceneManagerEvent event) { SubGhz* subghz = context; if(event.type == SceneManagerEventTypeCustom) { @@ -49,7 +49,7 @@ const bool subghz_scene_save_name_on_event(void* context, SceneManagerEvent even return false; } -const void subghz_scene_save_name_on_exit(void* context) { +void subghz_scene_save_name_on_exit(void* context) { SubGhz* subghz = context; // Clear view diff --git a/applications/subghz/scenes/subghz_scene_save_success.c b/applications/subghz/scenes/subghz_scene_save_success.c index 4d26ff54..dc267486 100644 --- a/applications/subghz/scenes/subghz_scene_save_success.c +++ b/applications/subghz/scenes/subghz_scene_save_success.c @@ -7,7 +7,7 @@ void subghz_scene_save_success_popup_callback(void* context) { view_dispatcher_send_custom_event(subghz->view_dispatcher, SCENE_SAVE_SUCCESS_CUSTOM_EVENT); } -const void subghz_scene_save_success_on_enter(void* context) { +void subghz_scene_save_success_on_enter(void* context) { SubGhz* subghz = context; // Setup view @@ -21,7 +21,7 @@ const void subghz_scene_save_success_on_enter(void* context) { view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewPopup); } -const bool subghz_scene_save_success_on_event(void* context, SceneManagerEvent event) { +bool subghz_scene_save_success_on_event(void* context, SceneManagerEvent event) { SubGhz* subghz = context; if(event.type == SceneManagerEventTypeCustom) { if(event.event == SCENE_SAVE_SUCCESS_CUSTOM_EVENT) { @@ -36,7 +36,7 @@ const bool subghz_scene_save_success_on_event(void* context, SceneManagerEvent e return false; } -const void subghz_scene_save_success_on_exit(void* context) { +void subghz_scene_save_success_on_exit(void* context) { SubGhz* subghz = context; // Clear view diff --git a/applications/subghz/scenes/subghz_scene_saved.c b/applications/subghz/scenes/subghz_scene_saved.c index 3bfec82a..4ec75b5a 100644 --- a/applications/subghz/scenes/subghz_scene_saved.c +++ b/applications/subghz/scenes/subghz_scene_saved.c @@ -1,6 +1,6 @@ #include "../subghz_i.h" -const void subghz_scene_saved_on_enter(void* context) { +void subghz_scene_saved_on_enter(void* context) { SubGhz* subghz = context; if(subghz_load_protocol_from_file(subghz)) { @@ -10,11 +10,11 @@ const void subghz_scene_saved_on_enter(void* context) { } } -const bool subghz_scene_saved_on_event(void* context, SceneManagerEvent event) { +bool subghz_scene_saved_on_event(void* context, SceneManagerEvent event) { // SubGhz* subghz = context; return false; } -const void subghz_scene_saved_on_exit(void* context) { +void subghz_scene_saved_on_exit(void* context) { // SubGhz* subghz = context; } diff --git a/applications/subghz/scenes/subghz_scene_set_type.c b/applications/subghz/scenes/subghz_scene_set_type.c index 5993512b..7beb8a27 100644 --- a/applications/subghz/scenes/subghz_scene_set_type.c +++ b/applications/subghz/scenes/subghz_scene_set_type.c @@ -29,7 +29,7 @@ void subghz_scene_set_type_submenu_callback(void* context, uint32_t index) { view_dispatcher_send_custom_event(subghz->view_dispatcher, index); } -const void subghz_scene_set_type_on_enter(void* context) { +void subghz_scene_set_type_on_enter(void* context) { SubGhz* subghz = context; submenu_add_item( @@ -85,7 +85,7 @@ const void subghz_scene_set_type_on_enter(void* context) { view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewMenu); } -const bool subghz_scene_set_type_on_event(void* context, SceneManagerEvent event) { +bool subghz_scene_set_type_on_event(void* context, SceneManagerEvent event) { SubGhz* subghz = context; bool generated_protocol = false; @@ -182,7 +182,7 @@ const bool subghz_scene_set_type_on_event(void* context, SceneManagerEvent event return false; } -const void subghz_scene_set_type_on_exit(void* context) { +void subghz_scene_set_type_on_exit(void* context) { SubGhz* subghz = context; submenu_clean(subghz->submenu); } diff --git a/applications/subghz/scenes/subghz_scene_show_error.c b/applications/subghz/scenes/subghz_scene_show_error.c index 08c487a7..2599f24e 100644 --- a/applications/subghz/scenes/subghz_scene_show_error.c +++ b/applications/subghz/scenes/subghz_scene_show_error.c @@ -7,7 +7,7 @@ void subghz_scene_show_error_popup_callback(void* context) { view_dispatcher_send_custom_event(subghz->view_dispatcher, SCENE_NO_MAN_CUSTOM_EVENT); } -const void subghz_scene_show_error_on_enter(void* context) { +void subghz_scene_show_error_on_enter(void* context) { SubGhz* subghz = context; // Setup view @@ -21,7 +21,7 @@ const void subghz_scene_show_error_on_enter(void* context) { view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewPopup); } -const bool subghz_scene_show_error_on_event(void* context, SceneManagerEvent event) { +bool subghz_scene_show_error_on_event(void* context, SceneManagerEvent event) { SubGhz* subghz = context; if(event.type == SceneManagerEventTypeCustom) { if(event.event == SCENE_NO_MAN_CUSTOM_EVENT) { @@ -33,7 +33,7 @@ const bool subghz_scene_show_error_on_event(void* context, SceneManagerEvent eve return false; } -const void subghz_scene_show_error_on_exit(void* context) { +void subghz_scene_show_error_on_exit(void* context) { SubGhz* subghz = context; // Clear view diff --git a/applications/subghz/scenes/subghz_scene_start.c b/applications/subghz/scenes/subghz_scene_start.c index 2baac87a..b3713873 100644 --- a/applications/subghz/scenes/subghz_scene_start.c +++ b/applications/subghz/scenes/subghz_scene_start.c @@ -12,7 +12,7 @@ void subghz_scene_start_submenu_callback(void* context, uint32_t index) { view_dispatcher_send_custom_event(subghz->view_dispatcher, index); } -const void subghz_scene_start_on_enter(void* context) { +void subghz_scene_start_on_enter(void* context) { SubGhz* subghz = context; if(subghz->state_notifications == NOTIFICATION_STARTING_STATE) { subghz->state_notifications = NOTIFICATION_IDLE_STATE; @@ -36,7 +36,7 @@ const void subghz_scene_start_on_enter(void* context) { view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewMenu); } -const bool subghz_scene_start_on_event(void* context, SceneManagerEvent event) { +bool subghz_scene_start_on_event(void* context, SceneManagerEvent event) { SubGhz* subghz = context; if(event.type == SceneManagerEventTypeCustom) { @@ -65,7 +65,7 @@ const bool subghz_scene_start_on_event(void* context, SceneManagerEvent event) { return false; } -const void subghz_scene_start_on_exit(void* context) { +void subghz_scene_start_on_exit(void* context) { SubGhz* subghz = context; submenu_clean(subghz->submenu); } diff --git a/applications/subghz/scenes/subghz_scene_test.c b/applications/subghz/scenes/subghz_scene_test.c index 03f0b595..bef7e1e4 100644 --- a/applications/subghz/scenes/subghz_scene_test.c +++ b/applications/subghz/scenes/subghz_scene_test.c @@ -11,7 +11,7 @@ void subghz_scene_test_submenu_callback(void* context, uint32_t index) { view_dispatcher_send_custom_event(subghz->view_dispatcher, index); } -const void subghz_scene_test_on_enter(void* context) { +void subghz_scene_test_on_enter(void* context) { SubGhz* subghz = context; submenu_add_item( @@ -31,7 +31,7 @@ const void subghz_scene_test_on_enter(void* context) { view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewMenu); } -const bool subghz_scene_test_on_event(void* context, SceneManagerEvent event) { +bool subghz_scene_test_on_event(void* context, SceneManagerEvent event) { SubGhz* subghz = context; if(event.type == SceneManagerEventTypeCustom) { @@ -55,7 +55,7 @@ const bool subghz_scene_test_on_event(void* context, SceneManagerEvent event) { return false; } -const void subghz_scene_test_on_exit(void* context) { +void subghz_scene_test_on_exit(void* context) { SubGhz* subghz = context; submenu_clean(subghz->submenu); } diff --git a/applications/subghz/scenes/subghz_scene_test_carrier.c b/applications/subghz/scenes/subghz_scene_test_carrier.c index ef1fa1fc..ecc42260 100644 --- a/applications/subghz/scenes/subghz_scene_test_carrier.c +++ b/applications/subghz/scenes/subghz_scene_test_carrier.c @@ -1,15 +1,15 @@ #include "../subghz_i.h" -const void subghz_scene_test_carrier_on_enter(void* context) { +void subghz_scene_test_carrier_on_enter(void* context) { SubGhz* subghz = context; view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewTestCarrier); } -const bool subghz_scene_test_carrier_on_event(void* context, SceneManagerEvent event) { +bool subghz_scene_test_carrier_on_event(void* context, SceneManagerEvent event) { // SubGhz* subghz = context; return false; } -const void subghz_scene_test_carrier_on_exit(void* context) { +void subghz_scene_test_carrier_on_exit(void* context) { // SubGhz* subghz = context; } diff --git a/applications/subghz/scenes/subghz_scene_test_packet.c b/applications/subghz/scenes/subghz_scene_test_packet.c index 7c275814..e4933bab 100644 --- a/applications/subghz/scenes/subghz_scene_test_packet.c +++ b/applications/subghz/scenes/subghz_scene_test_packet.c @@ -1,15 +1,15 @@ #include "../subghz_i.h" -const void subghz_scene_test_packet_on_enter(void* context) { +void subghz_scene_test_packet_on_enter(void* context) { SubGhz* subghz = context; view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewTestPacket); } -const bool subghz_scene_test_packet_on_event(void* context, SceneManagerEvent event) { +bool subghz_scene_test_packet_on_event(void* context, SceneManagerEvent event) { // SubGhz* subghz = context; return false; } -const void subghz_scene_test_packet_on_exit(void* context) { +void subghz_scene_test_packet_on_exit(void* context) { // SubGhz* subghz = context; } diff --git a/applications/subghz/scenes/subghz_scene_test_static.c b/applications/subghz/scenes/subghz_scene_test_static.c index 6d1403f5..f663c7fd 100644 --- a/applications/subghz/scenes/subghz_scene_test_static.c +++ b/applications/subghz/scenes/subghz_scene_test_static.c @@ -1,15 +1,15 @@ #include "../subghz_i.h" -const void subghz_scene_test_static_on_enter(void* context) { +void subghz_scene_test_static_on_enter(void* context) { SubGhz* subghz = context; view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewStatic); } -const bool subghz_scene_test_static_on_event(void* context, SceneManagerEvent event) { +bool subghz_scene_test_static_on_event(void* context, SceneManagerEvent event) { // SubGhz* subghz = context; return false; } -const void subghz_scene_test_static_on_exit(void* context) { +void subghz_scene_test_static_on_exit(void* context) { // SubGhz* subghz = context; } diff --git a/applications/subghz/scenes/subghz_scene_transmitter.c b/applications/subghz/scenes/subghz_scene_transmitter.c index 8e743250..dd1f3030 100644 --- a/applications/subghz/scenes/subghz_scene_transmitter.c +++ b/applications/subghz/scenes/subghz_scene_transmitter.c @@ -55,7 +55,7 @@ static void subghz_scene_transmitter_update_data_show(void* context) { } } -const void subghz_scene_transmitter_on_enter(void* context) { +void subghz_scene_transmitter_on_enter(void* context) { SubGhz* subghz = context; subghz_transmitter_set_callback( subghz->subghz_transmitter, subghz_scene_transmitter_callback, subghz); @@ -64,7 +64,7 @@ const void subghz_scene_transmitter_on_enter(void* context) { view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewTransmitter); } -const bool subghz_scene_transmitter_on_event(void* context, SceneManagerEvent event) { +bool subghz_scene_transmitter_on_event(void* context, SceneManagerEvent event) { SubGhz* subghz = context; if(event.type == SceneManagerEventTypeCustom) { if(event.event == SubghzTransmitterEventSendStart) { @@ -100,7 +100,7 @@ const bool subghz_scene_transmitter_on_event(void* context, SceneManagerEvent ev return false; } -const void subghz_scene_transmitter_on_exit(void* context) { +void subghz_scene_transmitter_on_exit(void* context) { SubGhz* subghz = context; subghz->state_notifications = NOTIFICATION_IDLE_STATE; diff --git a/applications/subghz/subghz_cli.c b/applications/subghz/subghz_cli.c index 46149d4e..52e6b6d3 100644 --- a/applications/subghz/subghz_cli.c +++ b/applications/subghz/subghz_cli.c @@ -179,7 +179,7 @@ static void subghz_cli_command_rx_callback(bool level, uint32_t duration, void* static void subghz_cli_command_rx_text_callback(string_t text, void* context) { SubGhzCliCommandRx* instance = context; instance->packet_count++; - printf(string_get_cstr(text)); + printf("%s", string_get_cstr(text)); } void subghz_cli_command_rx(Cli* cli, string_t args, void* context) { diff --git a/firmware/targets/f6/furi-hal/furi-hal-bt.c b/firmware/targets/f6/furi-hal/furi-hal-bt.c index 7fab63ed..0e3d2331 100644 --- a/firmware/targets/f6/furi-hal/furi-hal-bt.c +++ b/firmware/targets/f6/furi-hal/furi-hal-bt.c @@ -61,7 +61,7 @@ bool furi_hal_bt_is_active() { } bool furi_hal_bt_wait_startup() { - uint8_t counter = 0; + uint16_t counter = 0; while (!(APPE_Status() == BleGlueStatusStarted || APPE_Status() == BleGlueStatusBroken)) { osDelay(10); counter++; diff --git a/firmware/targets/f6/furi-hal/furi-hal-ibutton.c b/firmware/targets/f6/furi-hal/furi-hal-ibutton.c index 6e3c8bee..8a0af9f9 100644 --- a/firmware/targets/f6/furi-hal/furi-hal-ibutton.c +++ b/firmware/targets/f6/furi-hal/furi-hal-ibutton.c @@ -3,12 +3,12 @@ void furi_hal_ibutton_start() { furi_hal_ibutton_pin_high(); - hal_gpio_init(&ibutton_gpio, GpioModeOutputOpenDrain, GpioSpeedLow, GpioPullNo); + hal_gpio_init(&ibutton_gpio, GpioModeOutputOpenDrain, GpioPullNo, GpioSpeedLow); } void furi_hal_ibutton_stop() { furi_hal_ibutton_pin_high(); - hal_gpio_init(&ibutton_gpio, GpioModeAnalog, GpioSpeedLow, GpioPullNo); + hal_gpio_init(&ibutton_gpio, GpioModeAnalog, GpioPullNo, GpioSpeedLow); } void furi_hal_ibutton_pin_low() { diff --git a/firmware/targets/f6/furi-hal/furi-hal-rfid.c b/firmware/targets/f6/furi-hal/furi-hal-rfid.c index 8b5266c3..a9bbc32c 100644 --- a/firmware/targets/f6/furi-hal/furi-hal-rfid.c +++ b/firmware/targets/f6/furi-hal/furi-hal-rfid.c @@ -18,11 +18,11 @@ void furi_hal_rfid_pins_reset() { furi_hal_ibutton_stop(); // pulldown rfid antenna - hal_gpio_init(&gpio_rfid_carrier_out, GpioModeOutputPushPull, GpioSpeedLow, GpioPullNo); + hal_gpio_init(&gpio_rfid_carrier_out, GpioModeOutputPushPull, GpioPullNo, GpioSpeedLow); hal_gpio_write(&gpio_rfid_carrier_out, false); // from both sides - hal_gpio_init(&gpio_rfid_pull, GpioModeOutputPushPull, GpioSpeedLow, GpioPullNo); + hal_gpio_init(&gpio_rfid_pull, GpioModeOutputPushPull, GpioPullNo, GpioSpeedLow); hal_gpio_write(&gpio_rfid_pull, true); } @@ -36,7 +36,7 @@ void furi_hal_rfid_pins_emulate() { &gpio_rfid_pull, GpioModeAltFunctionPushPull, GpioPullNo, GpioSpeedLow, GpioAltFn1TIM2); // pull rfid antenna from carrier side - hal_gpio_init(&gpio_rfid_carrier_out, GpioModeOutputPushPull, GpioSpeedLow, GpioPullNo); + hal_gpio_init(&gpio_rfid_carrier_out, GpioModeOutputPushPull, GpioPullNo, GpioSpeedLow); hal_gpio_write(&gpio_rfid_carrier_out, false); } @@ -46,7 +46,7 @@ void furi_hal_rfid_pins_read() { furi_hal_ibutton_pin_low(); // dont pull rfid antenna - hal_gpio_init(&gpio_rfid_pull, GpioModeOutputPushPull, GpioSpeedLow, GpioPullNo); + hal_gpio_init(&gpio_rfid_pull, GpioModeOutputPushPull, GpioPullNo, GpioSpeedLow); hal_gpio_write(&gpio_rfid_pull, false); // carrier pin to timer out @@ -58,7 +58,7 @@ void furi_hal_rfid_pins_read() { GpioAltFn1TIM1); // comparator in - hal_gpio_init(&gpio_rfid_data_in, GpioModeAnalog, GpioSpeedLow, GpioPullNo); + hal_gpio_init(&gpio_rfid_data_in, GpioModeAnalog, GpioPullNo, GpioSpeedLow); } void furi_hal_rfid_tim_read(float freq, float duty_cycle) { diff --git a/firmware/targets/f7/furi-hal/furi-hal-bt.c b/firmware/targets/f7/furi-hal/furi-hal-bt.c index 7fab63ed..0e3d2331 100644 --- a/firmware/targets/f7/furi-hal/furi-hal-bt.c +++ b/firmware/targets/f7/furi-hal/furi-hal-bt.c @@ -61,7 +61,7 @@ bool furi_hal_bt_is_active() { } bool furi_hal_bt_wait_startup() { - uint8_t counter = 0; + uint16_t counter = 0; while (!(APPE_Status() == BleGlueStatusStarted || APPE_Status() == BleGlueStatusBroken)) { osDelay(10); counter++; diff --git a/firmware/targets/f7/furi-hal/furi-hal-ibutton.c b/firmware/targets/f7/furi-hal/furi-hal-ibutton.c index 6e3c8bee..8a0af9f9 100644 --- a/firmware/targets/f7/furi-hal/furi-hal-ibutton.c +++ b/firmware/targets/f7/furi-hal/furi-hal-ibutton.c @@ -3,12 +3,12 @@ void furi_hal_ibutton_start() { furi_hal_ibutton_pin_high(); - hal_gpio_init(&ibutton_gpio, GpioModeOutputOpenDrain, GpioSpeedLow, GpioPullNo); + hal_gpio_init(&ibutton_gpio, GpioModeOutputOpenDrain, GpioPullNo, GpioSpeedLow); } void furi_hal_ibutton_stop() { furi_hal_ibutton_pin_high(); - hal_gpio_init(&ibutton_gpio, GpioModeAnalog, GpioSpeedLow, GpioPullNo); + hal_gpio_init(&ibutton_gpio, GpioModeAnalog, GpioPullNo, GpioSpeedLow); } void furi_hal_ibutton_pin_low() { diff --git a/firmware/targets/f7/furi-hal/furi-hal-rfid.c b/firmware/targets/f7/furi-hal/furi-hal-rfid.c index 2a968b7a..d0772231 100644 --- a/firmware/targets/f7/furi-hal/furi-hal-rfid.c +++ b/firmware/targets/f7/furi-hal/furi-hal-rfid.c @@ -18,11 +18,11 @@ void furi_hal_rfid_pins_reset() { furi_hal_ibutton_stop(); // pulldown rfid antenna - hal_gpio_init(&gpio_rfid_carrier_out, GpioModeOutputPushPull, GpioSpeedLow, GpioPullNo); + hal_gpio_init(&gpio_rfid_carrier_out, GpioModeOutputPushPull, GpioPullNo, GpioSpeedLow); hal_gpio_write(&gpio_rfid_carrier_out, false); // from both sides - hal_gpio_init(&gpio_rfid_pull, GpioModeOutputPushPull, GpioSpeedLow, GpioPullNo); + hal_gpio_init(&gpio_rfid_pull, GpioModeOutputPushPull, GpioPullNo, GpioSpeedLow); hal_gpio_write(&gpio_rfid_pull, true); hal_gpio_init_simple(&gpio_rfid_carrier, GpioModeAnalog); @@ -38,7 +38,7 @@ void furi_hal_rfid_pins_emulate() { &gpio_rfid_pull, GpioModeAltFunctionPushPull, GpioPullNo, GpioSpeedLow, GpioAltFn1TIM2); // pull rfid antenna from carrier side - hal_gpio_init(&gpio_rfid_carrier_out, GpioModeOutputPushPull, GpioSpeedLow, GpioPullNo); + hal_gpio_init(&gpio_rfid_carrier_out, GpioModeOutputPushPull, GpioPullNo, GpioSpeedLow); hal_gpio_write(&gpio_rfid_carrier_out, false); hal_gpio_init_ex( @@ -51,7 +51,7 @@ void furi_hal_rfid_pins_read() { furi_hal_ibutton_pin_low(); // dont pull rfid antenna - hal_gpio_init(&gpio_rfid_pull, GpioModeOutputPushPull, GpioSpeedLow, GpioPullNo); + hal_gpio_init(&gpio_rfid_pull, GpioModeOutputPushPull, GpioPullNo, GpioSpeedLow); hal_gpio_write(&gpio_rfid_pull, false); // carrier pin to timer out @@ -63,7 +63,7 @@ void furi_hal_rfid_pins_read() { GpioAltFn1TIM1); // comparator in - hal_gpio_init(&gpio_rfid_data_in, GpioModeAnalog, GpioSpeedLow, GpioPullNo); + hal_gpio_init(&gpio_rfid_data_in, GpioModeAnalog, GpioPullNo, GpioSpeedLow); } void furi_hal_rfid_tim_read(float freq, float duty_cycle) { diff --git a/lib/drivers/cc1101.c b/lib/drivers/cc1101.c index 4e020b70..0d5a23df 100644 --- a/lib/drivers/cc1101.c +++ b/lib/drivers/cc1101.c @@ -174,7 +174,7 @@ uint8_t cc1101_read_fifo(const FuriHalSpiDevice* device, uint8_t* data, uint8_t* // First byte - packet length furi_hal_spi_bus_trx(device->bus, buff_tx, buff_rx, 2, CC1101_TIMEOUT); - *size = buff_rx[2]; + *size = buff_rx[1]; furi_hal_spi_bus_trx(device->bus, &buff_tx[1], data, *size, CC1101_TIMEOUT); cc1101_flush_rx(device); diff --git a/lib/subghz/subghz_parser.c b/lib/subghz/subghz_parser.c index 6fc8f1f4..490d728e 100644 --- a/lib/subghz/subghz_parser.c +++ b/lib/subghz/subghz_parser.c @@ -54,7 +54,7 @@ static void subghz_parser_text_rx_callback(SubGhzProtocolCommon* parser, void* c if(instance->text_callback) { instance->text_callback(output, instance->text_callback_context); } else { - printf(string_get_cstr(output)); + printf("%s", string_get_cstr(output)); } string_clear(output); }