Nfc: fix incorrect type castings. Global: fix printf usage, types casting, overall cleanup. Drivers: incorrect array index in cc1101 driver. (#713)

* fix 'function cannot return qualified void/bool type'
* Fix variable 'consumed' is used uninitialized
* Fix format string is not a string literal (potentially insecure)
* Fix conflicting types for 'menu_item_get_type'
* Fix implicit conversion from enumeration type 'NfcDeviceType' to different enumeration type 'rfalNfcDevType'
* Fix hal_gpio_init incorrect arguments order
* Fix nfc->dev.dev_name condition will always evaluate to 'true'
* Fix explicitly assigning value of variable to itself
* Fix furi_hal_bt_wait_startup counter overflow
* Fix implicit conversion from 'StorageStatus' to 'SDError'
* Remove #include <sys/param.h>
* Add FIXME
* Fix syntax
* Fixup for 'furi_hal_bt_wait_startup counter overflow'
* nfc: fix different nfc device types
* Drivers: fix incorrect offset in cc1101_read_fifo
* Remove obsolete comment

Co-authored-by: Tony Freeman <tonyfreeman@users.noreply.github.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
tonyfreeman
2021-09-21 12:34:16 +03:00
committed by GitHub
parent 9b0aa0d6dc
commit 69f54973cc
63 changed files with 180 additions and 166 deletions

View File

@@ -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);

View File

@@ -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);

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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) {
}

View File

@@ -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);

View File

@@ -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;

View File

@@ -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

View File

@@ -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;

View File

@@ -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

View File

@@ -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;

View File

@@ -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

View File

@@ -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);

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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;

View File

@@ -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

View File

@@ -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

View File

@@ -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);

View File

@@ -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);

View File

@@ -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

View File

@@ -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

View File

@@ -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);

View File

@@ -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

View File

@@ -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);