mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 02:58:36 -07:00
Merge branch 'dev' of https://github.com/flipperdevices/flipperzero-firmware into mntm-dev
This commit is contained in:
@@ -18,7 +18,7 @@ static void archive_tick_event_callback(void* context) {
|
||||
scene_manager_handle_tick_event(archive->scene_manager);
|
||||
}
|
||||
|
||||
static ArchiveApp* archive_alloc() {
|
||||
static ArchiveApp* archive_alloc(void) {
|
||||
ArchiveApp* archive = malloc(sizeof(ArchiveApp));
|
||||
|
||||
archive->fav_move_str = furi_string_alloc();
|
||||
|
||||
@@ -74,7 +74,7 @@ uint16_t archive_favorites_count() {
|
||||
return lines;
|
||||
}
|
||||
|
||||
static bool archive_favourites_rescan() {
|
||||
static bool archive_favourites_rescan(void) {
|
||||
FuriString* buffer;
|
||||
buffer = furi_string_alloc();
|
||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||
|
||||
@@ -578,7 +578,7 @@ static void browser_view_exit(void* context) {
|
||||
furi_timer_stop(browser->scroll_timer);
|
||||
}
|
||||
|
||||
ArchiveBrowserView* browser_alloc() {
|
||||
ArchiveBrowserView* browser_alloc(void) {
|
||||
ArchiveBrowserView* browser = malloc(sizeof(ArchiveBrowserView));
|
||||
browser->view = view_alloc();
|
||||
view_allocate_model(browser->view, ViewModelTypeLocking, sizeof(ArchiveBrowserViewModel));
|
||||
|
||||
@@ -128,6 +128,5 @@ void archive_browser_set_callback(
|
||||
|
||||
View* archive_browser_get_view(ArchiveBrowserView* browser);
|
||||
|
||||
ArchiveBrowserView* browser_alloc();
|
||||
|
||||
ArchiveBrowserView* browser_alloc(void);
|
||||
void browser_free(ArchiveBrowserView* browser);
|
||||
|
||||
@@ -211,7 +211,7 @@ static bool bad_kb_input_callback(InputEvent* event, void* context) {
|
||||
return consumed;
|
||||
}
|
||||
|
||||
BadKb* bad_kb_alloc() {
|
||||
BadKb* bad_kb_alloc(void) {
|
||||
BadKb* bad_kb = malloc(sizeof(BadKb));
|
||||
|
||||
bad_kb->view = view_alloc();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
typedef struct BadKb BadKb;
|
||||
typedef void (*BadKbButtonCallback)(InputKey key, void* context);
|
||||
|
||||
BadKb* bad_kb_alloc();
|
||||
BadKb* bad_kb_alloc(void);
|
||||
|
||||
void bad_kb_free(BadKb* bad_kb);
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ static void gpio_app_tick_event_callback(void* context) {
|
||||
scene_manager_handle_tick_event(app->scene_manager);
|
||||
}
|
||||
|
||||
GpioApp* gpio_app_alloc() {
|
||||
GpioApp* gpio_app_alloc(void) {
|
||||
GpioApp* app = malloc(sizeof(GpioApp));
|
||||
|
||||
app->expansion = furi_record_open(RECORD_EXPANSION);
|
||||
|
||||
@@ -7,7 +7,7 @@ struct GPIOItems {
|
||||
size_t count;
|
||||
};
|
||||
|
||||
GPIOItems* gpio_items_alloc() {
|
||||
GPIOItems* gpio_items_alloc(void) {
|
||||
GPIOItems* items = malloc(sizeof(GPIOItems));
|
||||
|
||||
items->count = 0;
|
||||
|
||||
@@ -8,7 +8,7 @@ extern "C" {
|
||||
|
||||
typedef struct GPIOItems GPIOItems;
|
||||
|
||||
GPIOItems* gpio_items_alloc();
|
||||
GPIOItems* gpio_items_alloc(void);
|
||||
|
||||
void gpio_items_free(GPIOItems* items);
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ static bool gpio_usb_uart_input_callback(InputEvent* event, void* context) {
|
||||
return consumed;
|
||||
}
|
||||
|
||||
GpioUsbUart* gpio_usb_uart_alloc() {
|
||||
GpioUsbUart* gpio_usb_uart_alloc(void) {
|
||||
GpioUsbUart* usb_uart = malloc(sizeof(GpioUsbUart));
|
||||
|
||||
usb_uart->view = view_alloc();
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
typedef struct GpioUsbUart GpioUsbUart;
|
||||
typedef void (*GpioUsbUartCallback)(GpioCustomEvent event, void* context);
|
||||
|
||||
GpioUsbUart* gpio_usb_uart_alloc();
|
||||
GpioUsbUart* gpio_usb_uart_alloc(void);
|
||||
|
||||
void gpio_usb_uart_free(GpioUsbUart* usb_uart);
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ void ibutton_tick_event_callback(void* context) {
|
||||
scene_manager_handle_tick_event(ibutton->scene_manager);
|
||||
}
|
||||
|
||||
iButton* ibutton_alloc() {
|
||||
iButton* ibutton_alloc(void) {
|
||||
iButton* ibutton = malloc(sizeof(iButton));
|
||||
|
||||
ibutton->file_path = furi_string_alloc();
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <ibutton/ibutton_worker.h>
|
||||
#include <ibutton/ibutton_protocols.h>
|
||||
|
||||
static void ibutton_cli_print_usage() {
|
||||
static void ibutton_cli_print_usage(void) {
|
||||
printf("Usage:\r\n");
|
||||
printf("ikey read\r\n");
|
||||
printf("ikey emulate <key_type> <key_data>\r\n");
|
||||
@@ -248,6 +248,6 @@ static const FlipperAppPluginDescriptor plugin_descriptor = {
|
||||
.entry_point = &ibutton_cli,
|
||||
};
|
||||
|
||||
const FlipperAppPluginDescriptor* ibutton_cli_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* ibutton_cli_plugin_ep(void) {
|
||||
return &plugin_descriptor;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ static void ibutton_cli_wrapper(Cli* cli, FuriString* args, void* context) {
|
||||
cli_plugin_wrapper("ibutton_cli", 1, cli, args, context);
|
||||
}
|
||||
|
||||
void ibutton_on_system_start() {
|
||||
void ibutton_on_system_start(void) {
|
||||
Cli* cli = furi_record_open(RECORD_CLI);
|
||||
cli_add_command(cli, "ikey", CliCommandFlagDefault, ibutton_cli_wrapper, cli);
|
||||
furi_record_close(RECORD_CLI);
|
||||
|
||||
@@ -126,7 +126,7 @@ static void infrared_find_vacant_remote_name(FuriString* name, const char* path)
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
}
|
||||
|
||||
static InfraredApp* infrared_alloc() {
|
||||
static InfraredApp* infrared_alloc(void) {
|
||||
InfraredApp* infrared = malloc(sizeof(InfraredApp));
|
||||
|
||||
infrared->task_thread =
|
||||
|
||||
@@ -27,7 +27,7 @@ struct InfraredBruteForce {
|
||||
bool is_started;
|
||||
};
|
||||
|
||||
InfraredBruteForce* infrared_brute_force_alloc() {
|
||||
InfraredBruteForce* infrared_brute_force_alloc(void) {
|
||||
InfraredBruteForce* brute_force = malloc(sizeof(InfraredBruteForce));
|
||||
brute_force->ff = NULL;
|
||||
brute_force->db_filename = NULL;
|
||||
|
||||
@@ -21,7 +21,7 @@ typedef struct InfraredBruteForce InfraredBruteForce;
|
||||
*
|
||||
* @returns pointer to the created instance.
|
||||
*/
|
||||
InfraredBruteForce* infrared_brute_force_alloc();
|
||||
InfraredBruteForce* infrared_brute_force_alloc(void);
|
||||
|
||||
/**
|
||||
* @brief Delete an InfraredBruteForce instance.
|
||||
|
||||
@@ -553,6 +553,6 @@ static const FlipperAppPluginDescriptor plugin_descriptor = {
|
||||
.entry_point = &infrared_cli_start_ir,
|
||||
};
|
||||
|
||||
const FlipperAppPluginDescriptor* infrared_cli_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* infrared_cli_plugin_ep(void) {
|
||||
return &plugin_descriptor;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ typedef struct {
|
||||
typedef bool (
|
||||
*InfraredBatchCallback)(const InfraredBatch* batch, const InfraredBatchTarget* target);
|
||||
|
||||
InfraredRemote* infrared_remote_alloc() {
|
||||
InfraredRemote* infrared_remote_alloc(void) {
|
||||
InfraredRemote* remote = malloc(sizeof(InfraredRemote));
|
||||
StringArray_init(remote->signal_names);
|
||||
remote->name = furi_string_alloc();
|
||||
|
||||
@@ -23,7 +23,7 @@ typedef struct InfraredRemote InfraredRemote;
|
||||
*
|
||||
* @returns pointer to the created instance.
|
||||
*/
|
||||
InfraredRemote* infrared_remote_alloc();
|
||||
InfraredRemote* infrared_remote_alloc(void);
|
||||
|
||||
/**
|
||||
* @brief Delete an InfraredRemote instance.
|
||||
|
||||
@@ -201,7 +201,7 @@ bool infrared_signal_read_body(InfraredSignal* signal, FlipperFormat* ff) {
|
||||
return success;
|
||||
}
|
||||
|
||||
InfraredSignal* infrared_signal_alloc() {
|
||||
InfraredSignal* infrared_signal_alloc(void) {
|
||||
InfraredSignal* signal = malloc(sizeof(InfraredSignal));
|
||||
|
||||
signal->is_raw = false;
|
||||
|
||||
@@ -36,7 +36,7 @@ typedef struct {
|
||||
*
|
||||
* @returns pointer to the instance created.
|
||||
*/
|
||||
InfraredSignal* infrared_signal_alloc();
|
||||
InfraredSignal* infrared_signal_alloc(void);
|
||||
|
||||
/**
|
||||
* @brief Delete an InfraredSignal instance.
|
||||
|
||||
@@ -4,7 +4,7 @@ static void infrared_cli_start_ir_wrapper(Cli* cli, FuriString* args, void* cont
|
||||
cli_plugin_wrapper("infrared_cli", 1, cli, args, context);
|
||||
}
|
||||
|
||||
void infrared_on_system_start() {
|
||||
void infrared_on_system_start(void) {
|
||||
Cli* cli = (Cli*)furi_record_open(RECORD_CLI);
|
||||
cli_add_command(cli, "ir", CliCommandFlagDefault, infrared_cli_start_ir_wrapper, NULL);
|
||||
furi_record_close(RECORD_CLI);
|
||||
|
||||
@@ -30,7 +30,7 @@ static void infrared_debug_view_draw_callback(Canvas* canvas, void* model) {
|
||||
}
|
||||
}
|
||||
|
||||
InfraredDebugView* infrared_debug_view_alloc() {
|
||||
InfraredDebugView* infrared_debug_view_alloc(void) {
|
||||
InfraredDebugView* debug_view = malloc(sizeof(InfraredDebugView));
|
||||
debug_view->view = view_alloc();
|
||||
view_allocate_model(debug_view->view, ViewModelTypeLocking, sizeof(InfraredDebugViewModel));
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
typedef struct InfraredDebugView InfraredDebugView;
|
||||
|
||||
InfraredDebugView* infrared_debug_view_alloc();
|
||||
InfraredDebugView* infrared_debug_view_alloc(void);
|
||||
void infrared_debug_view_free(InfraredDebugView* debug_view);
|
||||
|
||||
View* infrared_debug_view_get_view(InfraredDebugView* debug_view);
|
||||
|
||||
@@ -20,7 +20,7 @@ typedef void (*InfraredProgressViewBackCallback)(void*);
|
||||
*
|
||||
* @retval new allocated instance
|
||||
*/
|
||||
InfraredProgressView* infrared_progress_view_alloc();
|
||||
InfraredProgressView* infrared_progress_view_alloc(void);
|
||||
|
||||
/** Free previously allocated Progress view module instance
|
||||
*
|
||||
|
||||
@@ -58,7 +58,7 @@ static void rpc_command_callback(const RpcAppSystemEvent* event, void* context)
|
||||
}
|
||||
}
|
||||
|
||||
static LfRfid* lfrfid_alloc() {
|
||||
static LfRfid* lfrfid_alloc(void) {
|
||||
LfRfid* lfrfid = malloc(sizeof(LfRfid));
|
||||
|
||||
lfrfid->storage = furi_record_open(RECORD_STORAGE);
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <lfrfid/lfrfid_raw_file.h>
|
||||
#include <toolbox/pulse_protocols/pulse_glue.h>
|
||||
|
||||
static void lfrfid_cli_print_usage() {
|
||||
static void lfrfid_cli_print_usage(void) {
|
||||
printf("Usage:\r\n");
|
||||
printf("rfid read <optional: normal | indala> - read in ASK/PSK mode\r\n");
|
||||
printf("rfid <write | emulate> <key_type> <key_data> - write or emulate a card\r\n");
|
||||
@@ -577,6 +577,6 @@ static const FlipperAppPluginDescriptor plugin_descriptor = {
|
||||
.entry_point = &lfrfid_cli,
|
||||
};
|
||||
|
||||
const FlipperAppPluginDescriptor* lfrfid_cli_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* lfrfid_cli_plugin_ep(void) {
|
||||
return &plugin_descriptor;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ static void lfrfid_cli_wrapper(Cli* cli, FuriString* args, void* context) {
|
||||
cli_plugin_wrapper("lfrfid_cli", 1, cli, args, context);
|
||||
}
|
||||
|
||||
void lfrfid_on_system_start() {
|
||||
void lfrfid_on_system_start(void) {
|
||||
Cli* cli = furi_record_open(RECORD_CLI);
|
||||
cli_add_command(cli, "rfid", CliCommandFlagDefault, lfrfid_cli_wrapper, NULL);
|
||||
furi_record_close(RECORD_CLI);
|
||||
|
||||
@@ -66,7 +66,7 @@ void lfrfid_view_read_exit(void* context) {
|
||||
read_view->view, LfRfidReadViewModel * model, { icon_animation_stop(model->icon); }, false);
|
||||
}
|
||||
|
||||
LfRfidReadView* lfrfid_view_read_alloc() {
|
||||
LfRfidReadView* lfrfid_view_read_alloc(void) {
|
||||
LfRfidReadView* read_view = malloc(sizeof(LfRfidReadView));
|
||||
read_view->view = view_alloc();
|
||||
view_set_context(read_view->view, read_view);
|
||||
|
||||
@@ -10,7 +10,7 @@ typedef enum {
|
||||
|
||||
typedef struct LfRfidReadView LfRfidReadView;
|
||||
|
||||
LfRfidReadView* lfrfid_view_read_alloc();
|
||||
LfRfidReadView* lfrfid_view_read_alloc(void);
|
||||
|
||||
void lfrfid_view_read_free(LfRfidReadView* read_view);
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ static void nfc_get_key_cache_file_path(const uint8_t* uid, size_t uid_len, Furi
|
||||
furi_string_cat_printf(path, "%s", NFC_APP_KEYS_EXTENSION);
|
||||
}
|
||||
|
||||
MfClassicKeyCache* mf_classic_key_cache_alloc() {
|
||||
MfClassicKeyCache* mf_classic_key_cache_alloc(void) {
|
||||
MfClassicKeyCache* instance = malloc(sizeof(MfClassicKeyCache));
|
||||
|
||||
return instance;
|
||||
|
||||
@@ -8,7 +8,7 @@ extern "C" {
|
||||
|
||||
typedef struct MfClassicKeyCache MfClassicKeyCache;
|
||||
|
||||
MfClassicKeyCache* mf_classic_key_cache_alloc();
|
||||
MfClassicKeyCache* mf_classic_key_cache_alloc(void);
|
||||
|
||||
void mf_classic_key_cache_free(MfClassicKeyCache* instance);
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <furi.h>
|
||||
#include <mbedtls/sha1.h>
|
||||
|
||||
MfUltralightAuth* mf_ultralight_auth_alloc() {
|
||||
MfUltralightAuth* mf_ultralight_auth_alloc(void) {
|
||||
MfUltralightAuth* instance = malloc(sizeof(MfUltralightAuth));
|
||||
|
||||
return instance;
|
||||
|
||||
@@ -20,7 +20,7 @@ typedef struct {
|
||||
MfUltralightAuthPack pack;
|
||||
} MfUltralightAuth;
|
||||
|
||||
MfUltralightAuth* mf_ultralight_auth_alloc();
|
||||
MfUltralightAuth* mf_ultralight_auth_alloc(void);
|
||||
|
||||
void mf_ultralight_auth_free(MfUltralightAuth* instance);
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ struct NfcSupportedCards {
|
||||
NfcSupportedCardsLoadContext* load_context;
|
||||
};
|
||||
|
||||
NfcSupportedCards* nfc_supported_cards_alloc() {
|
||||
NfcSupportedCards* nfc_supported_cards_alloc(void) {
|
||||
NfcSupportedCards* instance = malloc(sizeof(NfcSupportedCards));
|
||||
|
||||
instance->api_resolver = composite_api_resolver_alloc();
|
||||
@@ -81,7 +81,7 @@ void nfc_supported_cards_free(NfcSupportedCards* instance) {
|
||||
free(instance);
|
||||
}
|
||||
|
||||
static NfcSupportedCardsLoadContext* nfc_supported_cards_load_context_alloc() {
|
||||
static NfcSupportedCardsLoadContext* nfc_supported_cards_load_context_alloc(void) {
|
||||
NfcSupportedCardsLoadContext* instance = malloc(sizeof(NfcSupportedCardsLoadContext));
|
||||
|
||||
instance->storage = furi_record_open(RECORD_STORAGE);
|
||||
|
||||
@@ -25,7 +25,7 @@ typedef struct NfcSupportedCards NfcSupportedCards;
|
||||
*
|
||||
* @return pointer to allocated NfcSupportedCards instance.
|
||||
*/
|
||||
NfcSupportedCards* nfc_supported_cards_alloc();
|
||||
NfcSupportedCards* nfc_supported_cards_alloc(void);
|
||||
|
||||
/**
|
||||
* @brief Delete an NfcSupportedCards instance
|
||||
|
||||
@@ -13,7 +13,7 @@ struct SlixUnlock {
|
||||
|
||||
static const SlixPassword tonie_box_pass_arr[] = {0x5B6EFD7F, 0x0F0F0F0F};
|
||||
|
||||
SlixUnlock* slix_unlock_alloc() {
|
||||
SlixUnlock* slix_unlock_alloc(void) {
|
||||
SlixUnlock* instance = malloc(sizeof(SlixUnlock));
|
||||
|
||||
return instance;
|
||||
|
||||
@@ -13,7 +13,7 @@ typedef enum {
|
||||
|
||||
typedef struct SlixUnlock SlixUnlock;
|
||||
|
||||
SlixUnlock* slix_unlock_alloc();
|
||||
SlixUnlock* slix_unlock_alloc(void);
|
||||
|
||||
void slix_unlock_free(SlixUnlock* instance);
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ static void nfc_app_rpc_command_callback(const RpcAppSystemEvent* event, void* c
|
||||
}
|
||||
}
|
||||
|
||||
NfcApp* nfc_app_alloc() {
|
||||
NfcApp* nfc_app_alloc(void) {
|
||||
NfcApp* instance = malloc(sizeof(NfcApp));
|
||||
|
||||
instance->view_dispatcher = view_dispatcher_alloc();
|
||||
@@ -458,7 +458,7 @@ void nfc_append_filename_string_when_present(NfcApp* instance, FuriString* strin
|
||||
}
|
||||
}
|
||||
|
||||
static bool nfc_is_hal_ready() {
|
||||
static bool nfc_is_hal_ready(void) {
|
||||
if(furi_hal_nfc_is_hal_ready() != FuriHalNfcErrorNone) {
|
||||
// No connection to the chip, show an error screen
|
||||
DialogsApp* dialogs = furi_record_open(RECORD_DIALOGS);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#define FLAG_EVENT (1 << 10)
|
||||
|
||||
static void nfc_cli_print_usage() {
|
||||
static void nfc_cli_print_usage(void) {
|
||||
printf("Usage:\r\n");
|
||||
printf("nfc <cmd>\r\n");
|
||||
printf("Cmd list:\r\n");
|
||||
@@ -71,6 +71,6 @@ static const FlipperAppPluginDescriptor plugin_descriptor = {
|
||||
.entry_point = &nfc_cli,
|
||||
};
|
||||
|
||||
const FlipperAppPluginDescriptor* nfc_cli_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* nfc_cli_plugin_ep(void) {
|
||||
return &plugin_descriptor;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ static void nfc_cli_wrapper(Cli* cli, FuriString* args, void* context) {
|
||||
cli_plugin_wrapper("nfc_cli", 1, cli, args, context);
|
||||
}
|
||||
|
||||
void nfc_on_system_start() {
|
||||
void nfc_on_system_start(void) {
|
||||
Cli* cli = furi_record_open(RECORD_CLI);
|
||||
cli_add_command(cli, "nfc", CliCommandFlagDefault, nfc_cli_wrapper, NULL);
|
||||
furi_record_close(RECORD_CLI);
|
||||
|
||||
@@ -163,6 +163,6 @@ static const FlipperAppPluginDescriptor aime_plugin_descriptor = {
|
||||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* aime_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* aime_plugin_ep(void) {
|
||||
return &aime_plugin_descriptor;
|
||||
}
|
||||
|
||||
@@ -102,6 +102,6 @@ static const FlipperAppPluginDescriptor all_in_one_plugin_descriptor = {
|
||||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* all_in_one_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* all_in_one_plugin_ep(void) {
|
||||
return &all_in_one_plugin_descriptor;
|
||||
}
|
||||
|
||||
@@ -342,6 +342,6 @@ static const FlipperAppPluginDescriptor bip_plugin_descriptor = {
|
||||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* bip_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* bip_plugin_ep(void) {
|
||||
return &bip_plugin_descriptor;
|
||||
}
|
||||
|
||||
@@ -565,6 +565,6 @@ static const FlipperAppPluginDescriptor clipper_plugin_descriptor = {
|
||||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* clipper_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* clipper_plugin_ep(void) {
|
||||
return &clipper_plugin_descriptor;
|
||||
}
|
||||
|
||||
@@ -199,6 +199,6 @@ static const FlipperAppPluginDescriptor emv_plugin_descriptor = {
|
||||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* emv_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* emv_plugin_ep(void) {
|
||||
return &emv_plugin_descriptor;
|
||||
}
|
||||
@@ -82,6 +82,6 @@ static const FlipperAppPluginDescriptor gallagher_plugin_descriptor = {
|
||||
};
|
||||
|
||||
/* Plugin entry point */
|
||||
const FlipperAppPluginDescriptor* gallagher_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* gallagher_plugin_ep(void) {
|
||||
return &gallagher_plugin_descriptor;
|
||||
}
|
||||
@@ -221,6 +221,6 @@ static const FlipperAppPluginDescriptor hi_plugin_descriptor = {
|
||||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* hi_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* hi_plugin_ep(void) {
|
||||
return &hi_plugin_descriptor;
|
||||
}
|
||||
|
||||
@@ -147,6 +147,6 @@ static const FlipperAppPluginDescriptor hid_plugin_descriptor = {
|
||||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* hid_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* hid_plugin_ep(void) {
|
||||
return &hid_plugin_descriptor;
|
||||
}
|
||||
|
||||
@@ -120,6 +120,6 @@ static const FlipperAppPluginDescriptor itso_plugin_descriptor = {
|
||||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* itso_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* itso_plugin_ep(void) {
|
||||
return &itso_plugin_descriptor;
|
||||
}
|
||||
|
||||
@@ -409,6 +409,6 @@ static const FlipperAppPluginDescriptor kazan_plugin_descriptor = {
|
||||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* kazan_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* kazan_plugin_ep(void) {
|
||||
return &kazan_plugin_descriptor;
|
||||
}
|
||||
@@ -185,6 +185,6 @@ static const FlipperAppPluginDescriptor metromoney_plugin_descriptor = {
|
||||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* metromoney_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* metromoney_plugin_ep(void) {
|
||||
return &metromoney_plugin_descriptor;
|
||||
}
|
||||
@@ -226,6 +226,6 @@ static const FlipperAppPluginDescriptor microel_plugin_descriptor = {
|
||||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* microel_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* microel_plugin_ep(void) {
|
||||
return µel_plugin_descriptor;
|
||||
}
|
||||
@@ -252,6 +252,6 @@ static const FlipperAppPluginDescriptor mizip_plugin_descriptor = {
|
||||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* mizip_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* mizip_plugin_ep(void) {
|
||||
return &mizip_plugin_descriptor;
|
||||
}
|
||||
|
||||
@@ -153,6 +153,6 @@ static const FlipperAppPluginDescriptor mykey_plugin_descriptor = {
|
||||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* mykey_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* mykey_plugin_ep(void) {
|
||||
return &mykey_plugin_descriptor;
|
||||
}
|
||||
@@ -111,6 +111,6 @@ static const FlipperAppPluginDescriptor myki_plugin_descriptor = {
|
||||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* myki_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* myki_plugin_ep(void) {
|
||||
return &myki_plugin_descriptor;
|
||||
}
|
||||
|
||||
@@ -477,6 +477,6 @@ static const FlipperAppPluginDescriptor ndef_plugin_descriptor = {
|
||||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* ndef_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* ndef_plugin_ep(void) {
|
||||
return &ndef_plugin_descriptor;
|
||||
}
|
||||
|
||||
@@ -228,6 +228,6 @@ static const FlipperAppPluginDescriptor opal_plugin_descriptor = {
|
||||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* opal_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* opal_plugin_ep(void) {
|
||||
return &opal_plugin_descriptor;
|
||||
}
|
||||
|
||||
@@ -214,6 +214,6 @@ static const FlipperAppPluginDescriptor plantain_plugin_descriptor = {
|
||||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* plantain_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* plantain_plugin_ep(void) {
|
||||
return &plantain_plugin_descriptor;
|
||||
}
|
||||
|
||||
@@ -169,6 +169,6 @@ static const FlipperAppPluginDescriptor saflok_plugin_descriptor = {
|
||||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* saflok_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* saflok_plugin_ep(void) {
|
||||
return &saflok_plugin_descriptor;
|
||||
}
|
||||
|
||||
@@ -1180,6 +1180,6 @@ static const FlipperAppPluginDescriptor social_moscow_plugin_descriptor = {
|
||||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* social_moscow_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* social_moscow_plugin_ep(void) {
|
||||
return &social_moscow_plugin_descriptor;
|
||||
}
|
||||
|
||||
@@ -106,6 +106,6 @@ static const FlipperAppPluginDescriptor sonicare_plugin_descriptor = {
|
||||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* sonicare_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* sonicare_plugin_ep(void) {
|
||||
return &sonicare_plugin_descriptor;
|
||||
}
|
||||
|
||||
@@ -244,6 +244,6 @@ static const FlipperAppPluginDescriptor troika_plugin_descriptor = {
|
||||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* troika_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* troika_plugin_ep(void) {
|
||||
return &troika_plugin_descriptor;
|
||||
}
|
||||
|
||||
@@ -185,6 +185,6 @@ static const FlipperAppPluginDescriptor two_cities_plugin_descriptor = {
|
||||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* two_cities_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* two_cities_plugin_ep(void) {
|
||||
return &two_cities_plugin_descriptor;
|
||||
}
|
||||
|
||||
@@ -151,6 +151,6 @@ static const FlipperAppPluginDescriptor umarsh_plugin_descriptor = {
|
||||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* umarsh_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* umarsh_plugin_ep(void) {
|
||||
return &umarsh_plugin_descriptor;
|
||||
}
|
||||
|
||||
@@ -190,6 +190,6 @@ static const FlipperAppPluginDescriptor washcity_plugin_descriptor = {
|
||||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* washcity_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* washcity_plugin_ep(void) {
|
||||
return &washcity_plugin_descriptor;
|
||||
}
|
||||
@@ -209,6 +209,6 @@ static const FlipperAppPluginDescriptor zolotaya_korona_plugin_descriptor = {
|
||||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* zolotaya_korona_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* zolotaya_korona_plugin_ep(void) {
|
||||
return &zolotaya_korona_plugin_descriptor;
|
||||
}
|
||||
@@ -139,6 +139,6 @@ static const FlipperAppPluginDescriptor zolotaya_korona_online_plugin_descriptor
|
||||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* zolotaya_korona_online_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* zolotaya_korona_online_plugin_ep(void) {
|
||||
return &zolotaya_korona_online_plugin_descriptor;
|
||||
}
|
||||
@@ -86,7 +86,7 @@ static bool detect_reader_input_callback(InputEvent* event, void* context) {
|
||||
return consumed;
|
||||
}
|
||||
|
||||
DetectReader* detect_reader_alloc() {
|
||||
DetectReader* detect_reader_alloc(void) {
|
||||
DetectReader* detect_reader = malloc(sizeof(DetectReader));
|
||||
detect_reader->view = view_alloc();
|
||||
view_allocate_model(detect_reader->view, ViewModelTypeLocking, sizeof(DetectReaderViewModel));
|
||||
|
||||
@@ -14,7 +14,7 @@ typedef enum {
|
||||
|
||||
typedef void (*DetectReaderDoneCallback)(void* context);
|
||||
|
||||
DetectReader* detect_reader_alloc();
|
||||
DetectReader* detect_reader_alloc(void);
|
||||
|
||||
void detect_reader_free(DetectReader* detect_reader);
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ static bool dict_attack_input_callback(InputEvent* event, void* context) {
|
||||
return consumed;
|
||||
}
|
||||
|
||||
DictAttack* dict_attack_alloc() {
|
||||
DictAttack* dict_attack_alloc(void) {
|
||||
DictAttack* instance = malloc(sizeof(DictAttack));
|
||||
instance->view = view_alloc();
|
||||
view_allocate_model(instance->view, ViewModelTypeLocking, sizeof(DictAttackViewModel));
|
||||
|
||||
@@ -15,7 +15,7 @@ typedef enum {
|
||||
|
||||
typedef void (*DictAttackCallback)(DictAttackEvent event, void* context);
|
||||
|
||||
DictAttack* dict_attack_alloc();
|
||||
DictAttack* dict_attack_alloc(void);
|
||||
|
||||
void dict_attack_free(DictAttack* instance);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include <one_wire/one_wire_host.h>
|
||||
|
||||
static void onewire_cli_print_usage() {
|
||||
static void onewire_cli_print_usage(void) {
|
||||
printf("Usage:\r\n");
|
||||
printf("onewire search\r\n");
|
||||
}
|
||||
@@ -67,6 +67,6 @@ static const FlipperAppPluginDescriptor plugin_descriptor = {
|
||||
.entry_point = &onewire_cli,
|
||||
};
|
||||
|
||||
const FlipperAppPluginDescriptor* onewire_cli_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* onewire_cli_plugin_ep(void) {
|
||||
return &plugin_descriptor;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ static void onewire_cli_wrapper(Cli* cli, FuriString* args, void* context) {
|
||||
cli_plugin_wrapper("onewire_cli", 1, cli, args, context);
|
||||
}
|
||||
|
||||
void onewire_on_system_start() {
|
||||
void onewire_on_system_start(void) {
|
||||
Cli* cli = furi_record_open(RECORD_CLI);
|
||||
cli_add_command(cli, "onewire", CliCommandFlagDefault, onewire_cli_wrapper, cli);
|
||||
furi_record_close(RECORD_CLI);
|
||||
|
||||
@@ -22,7 +22,7 @@ static void subghz_txrx_radio_device_power_off(SubGhzTxRx* instance) {
|
||||
if(furi_hal_power_is_otg_enabled()) furi_hal_power_disable_otg();
|
||||
}
|
||||
|
||||
SubGhzTxRx* subghz_txrx_alloc() {
|
||||
SubGhzTxRx* subghz_txrx_alloc(void) {
|
||||
SubGhzTxRx* instance = malloc(sizeof(SubGhzTxRx));
|
||||
instance->setting = subghz_setting_alloc();
|
||||
subghz_setting_load(instance->setting, EXT_PATH("subghz/assets/setting_user"));
|
||||
|
||||
@@ -24,7 +24,7 @@ typedef enum {
|
||||
*
|
||||
* @return SubGhzTxRx* pointer to SubGhzTxRx
|
||||
*/
|
||||
SubGhzTxRx* subghz_txrx_alloc();
|
||||
SubGhzTxRx* subghz_txrx_alloc(void);
|
||||
|
||||
/**
|
||||
* Free SubGhzTxRx
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#define TAG "SubGhzCli"
|
||||
|
||||
static void subghz_cli_radio_device_power_on() {
|
||||
static void subghz_cli_radio_device_power_on(void) {
|
||||
uint8_t attempts = 5;
|
||||
while(--attempts > 0) {
|
||||
if(furi_hal_power_enable_otg()) break;
|
||||
@@ -47,7 +47,7 @@ static void subghz_cli_radio_device_power_on() {
|
||||
}
|
||||
}
|
||||
|
||||
static void subghz_cli_radio_device_power_off() {
|
||||
static void subghz_cli_radio_device_power_off(void) {
|
||||
if(furi_hal_power_is_otg_enabled()) furi_hal_power_disable_otg();
|
||||
}
|
||||
|
||||
@@ -833,7 +833,7 @@ void subghz_cli_command_tx_from_file(Cli* cli, FuriString* args, void* context)
|
||||
subghz_environment_free(environment);
|
||||
}
|
||||
|
||||
static void subghz_cli_command_print_usage() {
|
||||
static void subghz_cli_command_print_usage(void) {
|
||||
printf("Usage:\r\n");
|
||||
printf("subghz <cmd> <args>\r\n");
|
||||
printf("Cmd list:\r\n");
|
||||
@@ -1205,6 +1205,6 @@ static const FlipperAppPluginDescriptor plugin_descriptor = {
|
||||
.entry_point = &subghz_cli_command,
|
||||
};
|
||||
|
||||
const FlipperAppPluginDescriptor* subghz_cli_plugin_ep() {
|
||||
const FlipperAppPluginDescriptor* subghz_cli_plugin_ep(void) {
|
||||
return &plugin_descriptor;
|
||||
}
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
#include <cli/cli.h>
|
||||
|
||||
void subghz_on_system_start();
|
||||
void subghz_on_system_start(void);
|
||||
|
||||
@@ -9,7 +9,7 @@ static void subghz_cli_command_chat_wrapper(Cli* cli, FuriString* args, void* co
|
||||
subghz_cli_command_wrapper(cli, args, context);
|
||||
}
|
||||
|
||||
void subghz_on_system_start() {
|
||||
void subghz_on_system_start(void) {
|
||||
Cli* cli = furi_record_open(RECORD_CLI);
|
||||
cli_add_command(cli, "subghz", CliCommandFlagDefault, subghz_cli_command_wrapper, NULL);
|
||||
cli_add_command(cli, "chat", CliCommandFlagDefault, subghz_cli_command_chat_wrapper, NULL);
|
||||
|
||||
@@ -625,7 +625,7 @@ void subghz_view_receiver_exit(void* context) {
|
||||
furi_timer_stop(subghz_receiver->flip_time_timer);
|
||||
}
|
||||
|
||||
SubGhzViewReceiver* subghz_view_receiver_alloc() {
|
||||
SubGhzViewReceiver* subghz_view_receiver_alloc(void) {
|
||||
SubGhzViewReceiver* subghz_receiver = malloc(sizeof(SubGhzViewReceiver));
|
||||
|
||||
// View allocation and configuration
|
||||
|
||||
@@ -21,7 +21,7 @@ void subghz_view_receiver_set_callback(
|
||||
SubGhzViewReceiverCallback callback,
|
||||
void* context);
|
||||
|
||||
SubGhzViewReceiver* subghz_view_receiver_alloc();
|
||||
SubGhzViewReceiver* subghz_view_receiver_alloc(void);
|
||||
|
||||
void subghz_view_receiver_free(SubGhzViewReceiver* subghz_receiver);
|
||||
|
||||
|
||||
@@ -227,7 +227,7 @@ void subghz_view_transmitter_exit(void* context) {
|
||||
furi_assert(context);
|
||||
}
|
||||
|
||||
SubGhzViewTransmitter* subghz_view_transmitter_alloc() {
|
||||
SubGhzViewTransmitter* subghz_view_transmitter_alloc(void) {
|
||||
SubGhzViewTransmitter* subghz_transmitter = malloc(sizeof(SubGhzViewTransmitter));
|
||||
|
||||
// View allocation and configuration
|
||||
|
||||
@@ -17,7 +17,7 @@ void subghz_view_transmitter_set_radio_device_type(
|
||||
SubGhzViewTransmitter* subghz_transmitter,
|
||||
SubGhzRadioDeviceType device_type);
|
||||
|
||||
SubGhzViewTransmitter* subghz_view_transmitter_alloc();
|
||||
SubGhzViewTransmitter* subghz_view_transmitter_alloc(void);
|
||||
|
||||
void subghz_view_transmitter_free(SubGhzViewTransmitter* subghz_transmitter);
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ static int u2f_uecc_random_cb(void* context, uint8_t* dest, unsigned size) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
U2fData* u2f_alloc() {
|
||||
U2fData* u2f_alloc(void) {
|
||||
return malloc(sizeof(U2fData));
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ typedef struct U2fData U2fData;
|
||||
|
||||
typedef void (*U2fEvtCallback)(U2fNotifyEvent evt, void* context);
|
||||
|
||||
U2fData* u2f_alloc();
|
||||
U2fData* u2f_alloc(void);
|
||||
|
||||
bool u2f_init(U2fData* instance);
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ static void u2f_app_tick_event_callback(void* context) {
|
||||
scene_manager_handle_tick_event(app->scene_manager);
|
||||
}
|
||||
|
||||
U2fApp* u2f_app_alloc() {
|
||||
U2fApp* u2f_app_alloc(void) {
|
||||
U2fApp* app = malloc(sizeof(U2fApp));
|
||||
|
||||
app->gui = furi_record_open(RECORD_GUI);
|
||||
|
||||
@@ -61,7 +61,7 @@ bool u2f_data_check(bool cert_only) {
|
||||
return state;
|
||||
}
|
||||
|
||||
bool u2f_data_cert_check() {
|
||||
bool u2f_data_cert_check(void) {
|
||||
bool state = false;
|
||||
Storage* fs_api = furi_record_open(RECORD_STORAGE);
|
||||
File* file = storage_file_alloc(fs_api);
|
||||
|
||||
@@ -14,7 +14,7 @@ extern "C" {
|
||||
|
||||
bool u2f_data_check(bool cert_only);
|
||||
|
||||
bool u2f_data_cert_check();
|
||||
bool u2f_data_cert_check(void);
|
||||
|
||||
uint32_t u2f_data_cert_load(uint8_t* cert);
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ static bool u2f_view_input_callback(InputEvent* event, void* context) {
|
||||
return consumed;
|
||||
}
|
||||
|
||||
U2fView* u2f_view_alloc() {
|
||||
U2fView* u2f_view_alloc(void) {
|
||||
U2fView* u2f = malloc(sizeof(U2fView));
|
||||
|
||||
u2f->view = view_alloc();
|
||||
|
||||
@@ -14,7 +14,7 @@ typedef enum {
|
||||
U2fMsgError,
|
||||
} U2fViewMsg;
|
||||
|
||||
U2fView* u2f_view_alloc();
|
||||
U2fView* u2f_view_alloc(void);
|
||||
|
||||
void u2f_view_free(U2fView* u2f);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user