mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-10 06:54:19 +00:00
Api Symbols: replace asserts with checks (#3507)
* Api Symbols: replace asserts with checks * Api Symbols: replace asserts with checks part 2 * Update no args function signatures with void, to help compiler to track incorrect usage * More unavoidable void * Update PVS config and code to make it happy * Format sources * nfc: fix checks * dead code cleanup & include fixes Co-authored-by: gornekich <n.gorbadey@gmail.com> Co-authored-by: hedger <hedger@users.noreply.github.com> Co-authored-by: hedger <hedger@nanode.su>
This commit is contained in:
parent
a09ec4d976
commit
acc39a4bc0
571 changed files with 3565 additions and 2704 deletions
|
@ -1,10 +1,10 @@
|
|||
# MLib macros we can't do much about.
|
||||
//-V:M_LET:1048,1044
|
||||
//-V:M_EACH:1048,1044
|
||||
//-V:ARRAY_DEF:760,747,568,776,729,712,654
|
||||
//-V:LIST_DEF:760,747,568,712,729,654,776
|
||||
//-V:ARRAY_DEF:760,747,568,776,729,712,654,1103
|
||||
//-V:LIST_DEF:760,747,568,712,729,654,776,1103
|
||||
//-V:BPTREE_DEF2:779,1086,557,773,512
|
||||
//-V:DICT_DEF2:779,524,776,760,1044,1001,729,590,568,747,685
|
||||
//-V:DICT_DEF2:779,524,776,760,1044,1001,729,590,568,747,685,1103
|
||||
//-V:ALGO_DEF:1048,747,1044
|
||||
//-V:TUPLE_DEF2:524,590,1001,760
|
||||
|
||||
|
@ -42,8 +42,5 @@
|
|||
# Model-related warnings
|
||||
//-V:with_view_model:1044,1048
|
||||
|
||||
# Functions that always return the same error code
|
||||
//-V:picopass_device_decrypt:1048
|
||||
|
||||
# Examples
|
||||
//V_EXCLUDE_PATH applications/examples/
|
|
@ -11,29 +11,29 @@ class AccessorApp {
|
|||
public:
|
||||
void run(void);
|
||||
|
||||
AccessorApp();
|
||||
~AccessorApp();
|
||||
AccessorApp(void);
|
||||
~AccessorApp(void);
|
||||
|
||||
enum class Scene : uint8_t {
|
||||
Exit,
|
||||
Start,
|
||||
};
|
||||
|
||||
AccessorAppViewManager* get_view_manager();
|
||||
AccessorAppViewManager* get_view_manager(void);
|
||||
void switch_to_next_scene(Scene index);
|
||||
void search_and_switch_to_previous_scene(std::initializer_list<Scene> scenes_list);
|
||||
bool switch_to_previous_scene(uint8_t count = 1);
|
||||
Scene get_previous_scene();
|
||||
Scene get_previous_scene(void);
|
||||
|
||||
void notify_green_blink();
|
||||
void notify_success();
|
||||
void notify_green_blink(void);
|
||||
void notify_success(void);
|
||||
|
||||
char* get_text_store();
|
||||
uint8_t get_text_store_size();
|
||||
char* get_text_store(void);
|
||||
uint8_t get_text_store_size(void);
|
||||
void set_text_store(const char* text...);
|
||||
|
||||
WIEGAND* get_wiegand();
|
||||
OneWireHost* get_one_wire();
|
||||
WIEGAND* get_wiegand(void);
|
||||
OneWireHost* get_one_wire(void);
|
||||
|
||||
private:
|
||||
std::list<Scene> previous_scenes_list = {Scene::Exit};
|
||||
|
|
|
@ -15,16 +15,16 @@ public:
|
|||
|
||||
FuriMessageQueue* event_queue;
|
||||
|
||||
AccessorAppViewManager();
|
||||
~AccessorAppViewManager();
|
||||
AccessorAppViewManager(void);
|
||||
~AccessorAppViewManager(void);
|
||||
|
||||
void switch_to(ViewType type);
|
||||
|
||||
void receive_event(AccessorEvent* event);
|
||||
void send_event(AccessorEvent* event);
|
||||
|
||||
Submenu* get_submenu();
|
||||
Popup* get_popup();
|
||||
Submenu* get_submenu(void);
|
||||
Popup* get_popup(void);
|
||||
|
||||
private:
|
||||
ViewDispatcher* view_dispatcher;
|
||||
|
|
|
@ -2,19 +2,19 @@
|
|||
|
||||
class WIEGAND {
|
||||
public:
|
||||
WIEGAND();
|
||||
void begin();
|
||||
void end();
|
||||
bool available();
|
||||
unsigned long getCode();
|
||||
unsigned long getCodeHigh();
|
||||
int getWiegandType();
|
||||
WIEGAND(void);
|
||||
void begin(void);
|
||||
void end(void);
|
||||
bool available(void);
|
||||
unsigned long getCode(void);
|
||||
unsigned long getCodeHigh(void);
|
||||
int getWiegandType(void);
|
||||
|
||||
static void ReadD0();
|
||||
static void ReadD1();
|
||||
static void ReadD0(void);
|
||||
static void ReadD1(void);
|
||||
|
||||
private:
|
||||
static bool DoWiegandConversion();
|
||||
static bool DoWiegandConversion(void);
|
||||
static unsigned long
|
||||
GetCardId(unsigned long* codehigh, unsigned long* codelow, char bitlength);
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ static void battery_test_battery_info_update_model(void* context) {
|
|||
notification_message(app->notifications, &sequence_display_backlight_on);
|
||||
}
|
||||
|
||||
BatteryTestApp* battery_test_alloc() {
|
||||
BatteryTestApp* battery_test_alloc(void) {
|
||||
BatteryTestApp* app = malloc(sizeof(BatteryTestApp));
|
||||
|
||||
// Records
|
||||
|
|
|
@ -116,7 +116,7 @@ static void battery_info_draw_callback(Canvas* canvas, void* context) {
|
|||
draw_stat(canvas, 104, 42, &I_Health_16x16, health);
|
||||
}
|
||||
|
||||
BatteryInfo* battery_info_alloc() {
|
||||
BatteryInfo* battery_info_alloc(void) {
|
||||
BatteryInfo* battery_info = malloc(sizeof(BatteryInfo));
|
||||
battery_info->view = view_alloc();
|
||||
view_set_context(battery_info->view, battery_info);
|
||||
|
|
|
@ -14,7 +14,7 @@ typedef struct {
|
|||
uint8_t health;
|
||||
} BatteryInfoModel;
|
||||
|
||||
BatteryInfo* battery_info_alloc();
|
||||
BatteryInfo* battery_info_alloc(void);
|
||||
|
||||
void battery_info_free(BatteryInfo* battery_info);
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ uint32_t bt_debug_start_view(void* context) {
|
|||
return BtDebugAppViewSubmenu;
|
||||
}
|
||||
|
||||
BtDebugApp* bt_debug_app_alloc() {
|
||||
BtDebugApp* bt_debug_app_alloc(void) {
|
||||
BtDebugApp* app = malloc(sizeof(BtDebugApp));
|
||||
|
||||
// Gui
|
||||
|
|
|
@ -129,7 +129,7 @@ static void bt_test_carrier_timer_callback(void* context) {
|
|||
}
|
||||
}
|
||||
|
||||
BtCarrierTest* bt_carrier_test_alloc() {
|
||||
BtCarrierTest* bt_carrier_test_alloc(void) {
|
||||
BtCarrierTest* bt_carrier_test = malloc(sizeof(BtCarrierTest));
|
||||
bt_carrier_test->bt_test = bt_test_alloc();
|
||||
bt_test_set_context(bt_carrier_test->bt_test, bt_carrier_test);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
typedef struct BtCarrierTest BtCarrierTest;
|
||||
|
||||
BtCarrierTest* bt_carrier_test_alloc();
|
||||
BtCarrierTest* bt_carrier_test_alloc(void);
|
||||
|
||||
void bt_carrier_test_free(BtCarrierTest* bt_carrier_test);
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ static void bt_test_packet_timer_callback(void* context) {
|
|||
}
|
||||
}
|
||||
|
||||
BtPacketTest* bt_packet_test_alloc() {
|
||||
BtPacketTest* bt_packet_test_alloc(void) {
|
||||
BtPacketTest* bt_packet_test = malloc(sizeof(BtPacketTest));
|
||||
bt_packet_test->bt_test = bt_test_alloc();
|
||||
bt_test_set_context(bt_packet_test->bt_test, bt_packet_test);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
typedef struct BtPacketTest BtPacketTest;
|
||||
|
||||
BtPacketTest* bt_packet_test_alloc();
|
||||
BtPacketTest* bt_packet_test_alloc(void);
|
||||
|
||||
void bt_packet_test_free(BtPacketTest* bt_packet_test);
|
||||
|
||||
|
|
|
@ -305,7 +305,7 @@ void bt_test_process_back(BtTest* bt_test) {
|
|||
}
|
||||
}
|
||||
|
||||
BtTest* bt_test_alloc() {
|
||||
BtTest* bt_test_alloc(void) {
|
||||
BtTest* bt_test = malloc(sizeof(BtTest));
|
||||
bt_test->view = view_alloc();
|
||||
view_set_context(bt_test->view, bt_test);
|
||||
|
|
|
@ -12,7 +12,7 @@ typedef void (*BtTestBackCallback)(void* context);
|
|||
typedef struct BtTestParam BtTestParam;
|
||||
typedef void (*BtTestParamChangeCallback)(BtTestParam* param);
|
||||
|
||||
BtTest* bt_test_alloc();
|
||||
BtTest* bt_test_alloc(void);
|
||||
|
||||
void bt_test_free(BtTest* bt_test);
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ uint32_t ccid_test_exit(void* context) {
|
|||
return VIEW_NONE;
|
||||
}
|
||||
|
||||
CcidTestApp* ccid_test_app_alloc() {
|
||||
CcidTestApp* ccid_test_app_alloc(void) {
|
||||
CcidTestApp* app = malloc(sizeof(CcidTestApp));
|
||||
|
||||
// Gui
|
||||
|
|
|
@ -50,7 +50,7 @@ static void crash_test_submenu_callback(void* context, uint32_t index) {
|
|||
furi_halt("Crash test: furi_halt");
|
||||
break;
|
||||
default:
|
||||
furi_crash("Programming error");
|
||||
furi_crash();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ static uint32_t crash_test_exit_callback(void* context) {
|
|||
return VIEW_NONE;
|
||||
}
|
||||
|
||||
CrashTest* crash_test_alloc() {
|
||||
CrashTest* crash_test_alloc(void) {
|
||||
CrashTest* instance = malloc(sizeof(CrashTest));
|
||||
|
||||
View* view = NULL;
|
||||
|
|
|
@ -26,7 +26,7 @@ static void gui_input_events_callback(const void* value, void* ctx) {
|
|||
}
|
||||
}
|
||||
|
||||
static DirectDraw* direct_draw_alloc() {
|
||||
static DirectDraw* direct_draw_alloc(void) {
|
||||
DirectDraw* instance = malloc(sizeof(DirectDraw));
|
||||
|
||||
instance->input = furi_record_open(RECORD_INPUT_EVENTS);
|
||||
|
|
|
@ -121,7 +121,7 @@ static void display_config_set_contrast(VariableItem* item) {
|
|||
display_test_reload_config(instance);
|
||||
}
|
||||
|
||||
DisplayTest* display_test_alloc() {
|
||||
DisplayTest* display_test_alloc(void) {
|
||||
DisplayTest* instance = malloc(sizeof(DisplayTest));
|
||||
|
||||
View* view = NULL;
|
||||
|
|
|
@ -154,7 +154,7 @@ static void view_display_test_timer_callback(void* context) {
|
|||
instance->view, ViewDisplayTestModel * model, { model->counter++; }, true);
|
||||
}
|
||||
|
||||
ViewDisplayTest* view_display_test_alloc() {
|
||||
ViewDisplayTest* view_display_test_alloc(void) {
|
||||
ViewDisplayTest* instance = malloc(sizeof(ViewDisplayTest));
|
||||
|
||||
instance->view = view_alloc();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
typedef struct ViewDisplayTest ViewDisplayTest;
|
||||
|
||||
ViewDisplayTest* view_display_test_alloc();
|
||||
ViewDisplayTest* view_display_test_alloc(void);
|
||||
|
||||
void view_display_test_free(ViewDisplayTest* instance);
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ static void expansion_test_app_serial_rx_callback(
|
|||
}
|
||||
}
|
||||
|
||||
static ExpansionTestApp* expansion_test_app_alloc() {
|
||||
static ExpansionTestApp* expansion_test_app_alloc(void) {
|
||||
ExpansionTestApp* instance = malloc(sizeof(ExpansionTestApp));
|
||||
instance->buf = furi_stream_buffer_alloc(RECEIVE_BUFFER_SIZE, 1);
|
||||
return instance;
|
||||
|
|
|
@ -12,7 +12,7 @@ static bool lfrfid_debug_back_event_callback(void* context) {
|
|||
return scene_manager_handle_back_event(app->scene_manager);
|
||||
}
|
||||
|
||||
static LfRfidDebug* lfrfid_debug_alloc() {
|
||||
static LfRfidDebug* lfrfid_debug_alloc(void) {
|
||||
LfRfidDebug* app = malloc(sizeof(LfRfidDebug));
|
||||
|
||||
app->view_dispatcher = view_dispatcher_alloc();
|
||||
|
|
|
@ -170,7 +170,7 @@ static bool lfrfid_debug_view_tune_input_callback(InputEvent* event, void* conte
|
|||
return consumed;
|
||||
}
|
||||
|
||||
LfRfidTuneView* lfrfid_debug_view_tune_alloc() {
|
||||
LfRfidTuneView* lfrfid_debug_view_tune_alloc(void) {
|
||||
LfRfidTuneView* tune_view = malloc(sizeof(LfRfidTuneView));
|
||||
tune_view->view = view_alloc();
|
||||
view_set_context(tune_view->view, tune_view);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
typedef struct LfRfidTuneView LfRfidTuneView;
|
||||
|
||||
LfRfidTuneView* lfrfid_debug_view_tune_alloc();
|
||||
LfRfidTuneView* lfrfid_debug_view_tune_alloc(void);
|
||||
|
||||
void lfrfid_debug_view_tune_free(LfRfidTuneView* tune_view);
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ static uint32_t locale_test_exit(void* context) {
|
|||
return VIEW_NONE;
|
||||
}
|
||||
|
||||
static LocaleTestApp* locale_test_alloc() {
|
||||
static LocaleTestApp* locale_test_alloc(void) {
|
||||
LocaleTestApp* app = malloc(sizeof(LocaleTestApp));
|
||||
|
||||
// Gui
|
||||
|
|
|
@ -83,7 +83,7 @@ static bool rpc_debug_app_rpc_init_rpc(RpcDebugApp* app, const char* args) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
static RpcDebugApp* rpc_debug_app_alloc() {
|
||||
static RpcDebugApp* rpc_debug_app_alloc(void) {
|
||||
RpcDebugApp* app = malloc(sizeof(RpcDebugApp));
|
||||
|
||||
app->gui = furi_record_open(RECORD_GUI);
|
||||
|
|
|
@ -21,7 +21,7 @@ typedef struct {
|
|||
Cli* cli;
|
||||
} SpeakerDebugApp;
|
||||
|
||||
static SpeakerDebugApp* speaker_app_alloc() {
|
||||
static SpeakerDebugApp* speaker_app_alloc(void) {
|
||||
SpeakerDebugApp* app = (SpeakerDebugApp*)malloc(sizeof(SpeakerDebugApp));
|
||||
app->music_worker = music_worker_alloc();
|
||||
app->message_queue = furi_message_queue_alloc(8, sizeof(SpeakerDebugAppMessage));
|
||||
|
|
|
@ -38,7 +38,7 @@ typedef enum {
|
|||
PrincetonDecoderStepCheckDuration,
|
||||
} PrincetonDecoderStep;
|
||||
|
||||
SubGhzEncoderPrinceton* subghz_encoder_princeton_for_testing_alloc() {
|
||||
SubGhzEncoderPrinceton* subghz_encoder_princeton_for_testing_alloc(void) {
|
||||
SubGhzEncoderPrinceton* instance = malloc(sizeof(SubGhzEncoderPrinceton));
|
||||
return instance;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ typedef void (*SubGhzDecoderPrincetonCallback)(SubGhzDecoderPrinceton* parser, v
|
|||
* Allocate SubGhzEncoderPrinceton
|
||||
* @return pointer to SubGhzEncoderPrinceton instance
|
||||
*/
|
||||
SubGhzEncoderPrinceton* subghz_encoder_princeton_for_testing_alloc();
|
||||
SubGhzEncoderPrinceton* subghz_encoder_princeton_for_testing_alloc(void);
|
||||
|
||||
/**
|
||||
* Free SubGhzEncoderPrinceton instance
|
||||
|
@ -69,7 +69,7 @@ LevelDuration subghz_encoder_princeton_for_testing_yield(void* context);
|
|||
* Allocate SubGhzDecoderPrinceton
|
||||
* @return SubGhzDecoderPrinceton*
|
||||
*/
|
||||
SubGhzDecoderPrinceton* subghz_decoder_princeton_for_testing_alloc();
|
||||
SubGhzDecoderPrinceton* subghz_decoder_princeton_for_testing_alloc(void);
|
||||
|
||||
/**
|
||||
* Free SubGhzDecoderPrinceton
|
||||
|
|
|
@ -21,7 +21,7 @@ static void subghz_test_app_tick_event_callback(void* context) {
|
|||
scene_manager_handle_tick_event(app->scene_manager);
|
||||
}
|
||||
|
||||
SubGhzTestApp* subghz_test_app_alloc() {
|
||||
SubGhzTestApp* subghz_test_app_alloc(void) {
|
||||
SubGhzTestApp* app = malloc(sizeof(SubGhzTestApp));
|
||||
|
||||
// GUI
|
||||
|
|
|
@ -186,7 +186,7 @@ void subghz_test_carrier_rssi_timer_callback(void* context) {
|
|||
false);
|
||||
}
|
||||
|
||||
SubGhzTestCarrier* subghz_test_carrier_alloc() {
|
||||
SubGhzTestCarrier* subghz_test_carrier_alloc(void) {
|
||||
SubGhzTestCarrier* subghz_test_carrier = malloc(sizeof(SubGhzTestCarrier));
|
||||
|
||||
// View allocation and configuration
|
||||
|
|
|
@ -15,7 +15,7 @@ void subghz_test_carrier_set_callback(
|
|||
SubGhzTestCarrierCallback callback,
|
||||
void* context);
|
||||
|
||||
SubGhzTestCarrier* subghz_test_carrier_alloc();
|
||||
SubGhzTestCarrier* subghz_test_carrier_alloc(void);
|
||||
|
||||
void subghz_test_carrier_free(SubGhzTestCarrier* subghz_test_carrier);
|
||||
|
||||
|
|
|
@ -236,7 +236,7 @@ void subghz_test_packet_exit(void* context) {
|
|||
furi_hal_subghz_sleep();
|
||||
}
|
||||
|
||||
SubGhzTestPacket* subghz_test_packet_alloc() {
|
||||
SubGhzTestPacket* subghz_test_packet_alloc(void) {
|
||||
SubGhzTestPacket* instance = malloc(sizeof(SubGhzTestPacket));
|
||||
|
||||
// View allocation and configuration
|
||||
|
|
|
@ -15,7 +15,7 @@ void subghz_test_packet_set_callback(
|
|||
SubGhzTestPacketCallback callback,
|
||||
void* context);
|
||||
|
||||
SubGhzTestPacket* subghz_test_packet_alloc();
|
||||
SubGhzTestPacket* subghz_test_packet_alloc(void);
|
||||
|
||||
void subghz_test_packet_free(SubGhzTestPacket* subghz_test_packet);
|
||||
|
||||
|
|
|
@ -164,7 +164,7 @@ void subghz_test_static_exit(void* context) {
|
|||
furi_hal_subghz_sleep();
|
||||
}
|
||||
|
||||
SubGhzTestStatic* subghz_test_static_alloc() {
|
||||
SubGhzTestStatic* subghz_test_static_alloc(void) {
|
||||
SubGhzTestStatic* instance = malloc(sizeof(SubGhzTestStatic));
|
||||
|
||||
// View allocation and configuration
|
||||
|
|
|
@ -15,7 +15,7 @@ void subghz_test_static_set_callback(
|
|||
SubGhzTestStaticCallback callback,
|
||||
void* context);
|
||||
|
||||
SubGhzTestStatic* subghz_test_static_alloc();
|
||||
SubGhzTestStatic* subghz_test_static_alloc(void);
|
||||
|
||||
void subghz_test_static_free(SubGhzTestStatic* subghz_static);
|
||||
|
||||
|
|
|
@ -734,7 +734,7 @@ MU_TEST_SUITE(test_bit_lib) {
|
|||
MU_RUN_TEST(test_bit_lib_bytes_to_num_bcd);
|
||||
}
|
||||
|
||||
int run_minunit_test_bit_lib() {
|
||||
int run_minunit_test_bit_lib(void) {
|
||||
MU_RUN_SUITE(test_bit_lib);
|
||||
return MU_EXIT_CODE;
|
||||
}
|
|
@ -17,7 +17,7 @@ typedef struct {
|
|||
|
||||
BtTest* bt_test = NULL;
|
||||
|
||||
void bt_test_alloc() {
|
||||
void bt_test_alloc(void) {
|
||||
bt_test = malloc(sizeof(BtTest));
|
||||
bt_test->storage = furi_record_open(RECORD_STORAGE);
|
||||
bt_test->nvm_ram_buff_dut = malloc(BT_TEST_NVM_RAM_BUFF_SIZE);
|
||||
|
@ -27,7 +27,7 @@ void bt_test_alloc() {
|
|||
bt_test->bt_keys_storage, bt_test->nvm_ram_buff_dut, BT_TEST_NVM_RAM_BUFF_SIZE);
|
||||
}
|
||||
|
||||
void bt_test_free() {
|
||||
void bt_test_free(void) {
|
||||
furi_check(bt_test);
|
||||
free(bt_test->nvm_ram_buff_ref);
|
||||
free(bt_test->nvm_ram_buff_dut);
|
||||
|
@ -37,7 +37,7 @@ void bt_test_free() {
|
|||
bt_test = NULL;
|
||||
}
|
||||
|
||||
static void bt_test_keys_storage_profile() {
|
||||
static void bt_test_keys_storage_profile(void) {
|
||||
// Emulate nvm change on initial connection
|
||||
const int nvm_change_size_on_connection = 88;
|
||||
for(size_t i = 0; i < nvm_change_size_on_connection; i++) {
|
||||
|
@ -82,7 +82,7 @@ static void bt_test_keys_storage_profile() {
|
|||
"Wrong buffer loaded");
|
||||
}
|
||||
|
||||
static void bt_test_keys_remove_test_file() {
|
||||
static void bt_test_keys_remove_test_file(void) {
|
||||
mu_assert(
|
||||
storage_simply_remove(bt_test->storage, BT_TEST_KEY_STORAGE_FILE_PATH),
|
||||
"Can't remove test file");
|
||||
|
@ -104,7 +104,7 @@ MU_TEST_SUITE(test_bt) {
|
|||
bt_test_free();
|
||||
}
|
||||
|
||||
int run_minunit_test_bt() {
|
||||
int run_minunit_test_bt(void) {
|
||||
MU_RUN_SUITE(test_bt);
|
||||
return MU_EXIT_CODE;
|
||||
}
|
||||
|
|
|
@ -182,7 +182,7 @@ MU_TEST_SUITE(test_datetime_datetime_to_timestamp_suite) {
|
|||
MU_RUN_TEST(test_datetime_datetime_to_timestamp_max);
|
||||
}
|
||||
|
||||
int run_minunit_test_datetime() {
|
||||
int run_minunit_test_datetime(void) {
|
||||
MU_RUN_SUITE(test_datetime_timestamp_to_datetime_suite);
|
||||
MU_RUN_SUITE(test_datetime_datetime_to_timestamp_suite);
|
||||
MU_RUN_SUITE(test_datetime_validate_datetime);
|
||||
|
|
|
@ -25,7 +25,7 @@ MU_TEST_SUITE(dialogs_file_browser_options) {
|
|||
MU_RUN_TEST(test_dialog_file_browser_set_basic_options_should_init_all_fields);
|
||||
}
|
||||
|
||||
int run_minunit_test_dialogs_file_browser_options() {
|
||||
int run_minunit_test_dialogs_file_browser_options(void) {
|
||||
MU_RUN_SUITE(dialogs_file_browser_options);
|
||||
|
||||
return MU_EXIT_CODE;
|
||||
|
|
|
@ -194,7 +194,7 @@ MU_TEST_SUITE(test_expansion_suite) {
|
|||
MU_RUN_TEST(test_expansion_garbage_input);
|
||||
}
|
||||
|
||||
int run_minunit_test_expansion() {
|
||||
int run_minunit_test_expansion(void) {
|
||||
MU_RUN_SUITE(test_expansion_suite);
|
||||
return MU_EXIT_CODE;
|
||||
}
|
||||
|
|
|
@ -331,7 +331,7 @@ MU_TEST_SUITE(flipper_format_string_suite) {
|
|||
MU_RUN_TEST(flipper_format_file_test);
|
||||
}
|
||||
|
||||
int run_minunit_test_flipper_format_string() {
|
||||
int run_minunit_test_flipper_format_string(void) {
|
||||
MU_RUN_SUITE(flipper_format_string_suite);
|
||||
return MU_EXIT_CODE;
|
||||
}
|
||||
|
|
|
@ -103,14 +103,14 @@ static bool storage_write_string(const char* path, const char* data) {
|
|||
return result;
|
||||
}
|
||||
|
||||
static void tests_setup() {
|
||||
static void tests_setup(void) {
|
||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||
mu_assert(storage_simply_remove_recursive(storage, TEST_DIR_NAME), "Cannot clean data");
|
||||
mu_assert(storage_simply_mkdir(storage, TEST_DIR_NAME), "Cannot create dir");
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
}
|
||||
|
||||
static void tests_teardown() {
|
||||
static void tests_teardown(void) {
|
||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||
mu_assert(storage_simply_remove_recursive(storage, TEST_DIR_NAME), "Cannot clean data");
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
|
@ -545,7 +545,7 @@ MU_TEST_SUITE(flipper_format) {
|
|||
tests_teardown();
|
||||
}
|
||||
|
||||
int run_minunit_test_flipper_format() {
|
||||
int run_minunit_test_flipper_format(void) {
|
||||
MU_RUN_SUITE(flipper_format);
|
||||
return MU_EXIT_CODE;
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ MU_TEST_SUITE(float_tools_suite) {
|
|||
MU_RUN_TEST(float_tools_equal_test);
|
||||
}
|
||||
|
||||
int run_minunit_test_float_tools() {
|
||||
int run_minunit_test_float_tools(void) {
|
||||
MU_RUN_SUITE(float_tools_suite);
|
||||
return MU_EXIT_CODE;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
void test_furi_memmgr() {
|
||||
void test_furi_memmgr(void) {
|
||||
void* ptr;
|
||||
|
||||
// allocate memory case
|
||||
|
|
|
@ -15,7 +15,7 @@ void test_pubsub_handler(const void* arg, void* ctx) {
|
|||
pubsub_context_value = *(uint32_t*)ctx;
|
||||
}
|
||||
|
||||
void test_furi_pubsub() {
|
||||
void test_furi_pubsub(void) {
|
||||
FuriPubSub* test_pubsub = NULL;
|
||||
FuriPubSubSubscription* test_pubsub_subscription = NULL;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#define TEST_RECORD_NAME "test/holding"
|
||||
|
||||
void test_furi_create_open() {
|
||||
void test_furi_create_open(void) {
|
||||
// Test that record does not exist
|
||||
mu_check(furi_record_exists(TEST_RECORD_NAME) == false);
|
||||
|
||||
|
|
|
@ -462,7 +462,7 @@ MU_TEST_SUITE(test_suite) {
|
|||
MU_RUN_TEST(mu_test_furi_string_utf8);
|
||||
}
|
||||
|
||||
int run_minunit_test_furi_string() {
|
||||
int run_minunit_test_furi_string(void) {
|
||||
MU_RUN_SUITE(test_suite);
|
||||
|
||||
return MU_EXIT_CODE;
|
||||
|
|
|
@ -50,7 +50,7 @@ MU_TEST_SUITE(test_suite) {
|
|||
MU_RUN_TEST(mu_test_furi_memmgr);
|
||||
}
|
||||
|
||||
int run_minunit_test_furi() {
|
||||
int run_minunit_test_furi(void) {
|
||||
MU_RUN_SUITE(test_suite);
|
||||
|
||||
return MU_EXIT_CODE;
|
||||
|
|
|
@ -409,16 +409,16 @@ static const uint8_t tv_gcm_tag_4[16] = {
|
|||
0x1B,
|
||||
};
|
||||
|
||||
static void furi_hal_crypto_ctr_setup() {
|
||||
static void furi_hal_crypto_ctr_setup(void) {
|
||||
}
|
||||
|
||||
static void furi_hal_crypto_ctr_teardown() {
|
||||
static void furi_hal_crypto_ctr_teardown(void) {
|
||||
}
|
||||
|
||||
static void furi_hal_crypto_gcm_setup() {
|
||||
static void furi_hal_crypto_gcm_setup(void) {
|
||||
}
|
||||
|
||||
static void furi_hal_crypto_gcm_teardown() {
|
||||
static void furi_hal_crypto_gcm_teardown(void) {
|
||||
}
|
||||
|
||||
MU_TEST(furi_hal_crypto_ctr_1) {
|
||||
|
@ -595,7 +595,7 @@ MU_TEST_SUITE(furi_hal_crypto_gcm_test) {
|
|||
MU_RUN_TEST(furi_hal_crypto_gcm_4);
|
||||
}
|
||||
|
||||
int run_minunit_test_furi_hal_crypto() {
|
||||
int run_minunit_test_furi_hal_crypto(void) {
|
||||
MU_RUN_SUITE(furi_hal_crypto_ctr_test);
|
||||
MU_RUN_SUITE(furi_hal_crypto_gcm_test);
|
||||
return MU_EXIT_CODE;
|
||||
|
|
|
@ -14,19 +14,19 @@
|
|||
#define EEPROM_PAGE_SIZE 16
|
||||
#define EEPROM_WRITE_DELAY_MS 6
|
||||
|
||||
static void furi_hal_i2c_int_setup() {
|
||||
static void furi_hal_i2c_int_setup(void) {
|
||||
furi_hal_i2c_acquire(&furi_hal_i2c_handle_power);
|
||||
}
|
||||
|
||||
static void furi_hal_i2c_int_teardown() {
|
||||
static void furi_hal_i2c_int_teardown(void) {
|
||||
furi_hal_i2c_release(&furi_hal_i2c_handle_power);
|
||||
}
|
||||
|
||||
static void furi_hal_i2c_ext_setup() {
|
||||
static void furi_hal_i2c_ext_setup(void) {
|
||||
furi_hal_i2c_acquire(&furi_hal_i2c_handle_external);
|
||||
}
|
||||
|
||||
static void furi_hal_i2c_ext_teardown() {
|
||||
static void furi_hal_i2c_ext_teardown(void) {
|
||||
furi_hal_i2c_release(&furi_hal_i2c_handle_external);
|
||||
}
|
||||
|
||||
|
@ -227,7 +227,7 @@ MU_TEST_SUITE(furi_hal_i2c_ext_suite) {
|
|||
MU_RUN_TEST(furi_hal_i2c_ext_eeprom);
|
||||
}
|
||||
|
||||
int run_minunit_test_furi_hal() {
|
||||
int run_minunit_test_furi_hal(void) {
|
||||
MU_RUN_SUITE(furi_hal_i2c_int_suite);
|
||||
MU_RUN_SUITE(furi_hal_i2c_ext_suite);
|
||||
return MU_EXIT_CODE;
|
||||
|
|
|
@ -17,7 +17,7 @@ typedef struct {
|
|||
|
||||
static InfraredTest* test;
|
||||
|
||||
static void infrared_test_alloc() {
|
||||
static void infrared_test_alloc(void) {
|
||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||
test = malloc(sizeof(InfraredTest));
|
||||
test->decoder_handler = infrared_alloc_decoder();
|
||||
|
@ -26,7 +26,7 @@ static void infrared_test_alloc() {
|
|||
test->file_path = furi_string_alloc();
|
||||
}
|
||||
|
||||
static void infrared_test_free() {
|
||||
static void infrared_test_free(void) {
|
||||
furi_check(test);
|
||||
infrared_free_decoder(test->decoder_handler);
|
||||
infrared_free_encoder(test->encoder_handler);
|
||||
|
@ -543,7 +543,7 @@ MU_TEST_SUITE(infrared_test) {
|
|||
MU_RUN_TEST(infrared_test_encoder_decoder_all);
|
||||
}
|
||||
|
||||
int run_minunit_test_infrared() {
|
||||
int run_minunit_test_infrared(void) {
|
||||
MU_RUN_SUITE(infrared_test);
|
||||
return MU_EXIT_CODE;
|
||||
}
|
||||
|
|
|
@ -547,7 +547,7 @@ MU_TEST_SUITE(test_lfrfid_protocols_suite) {
|
|||
MU_RUN_TEST(test_lfrfid_protocol_fdxb_emulate_simple);
|
||||
}
|
||||
|
||||
int run_minunit_test_lfrfid_protocols() {
|
||||
int run_minunit_test_lfrfid_protocols(void) {
|
||||
MU_RUN_SUITE(test_lfrfid_protocols_suite);
|
||||
return MU_EXIT_CODE;
|
||||
}
|
|
@ -69,7 +69,7 @@ MU_TEST_SUITE(manifest_suite) {
|
|||
MU_RUN_TEST(manifest_iteration_test);
|
||||
}
|
||||
|
||||
int run_minunit_test_manifest() {
|
||||
int run_minunit_test_manifest(void) {
|
||||
MU_RUN_SUITE(manifest_suite);
|
||||
return MU_EXIT_CODE;
|
||||
}
|
|
@ -28,12 +28,12 @@ typedef struct {
|
|||
|
||||
static NfcTest* nfc_test = NULL;
|
||||
|
||||
static void nfc_test_alloc() {
|
||||
static void nfc_test_alloc(void) {
|
||||
nfc_test = malloc(sizeof(NfcTest));
|
||||
nfc_test->storage = furi_record_open(RECORD_STORAGE);
|
||||
}
|
||||
|
||||
static void nfc_test_free() {
|
||||
static void nfc_test_free(void) {
|
||||
furi_check(nfc_test);
|
||||
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
|
@ -292,7 +292,7 @@ MU_TEST(ntag_213_locked_reader) {
|
|||
nfc_free(poller);
|
||||
}
|
||||
|
||||
static void mf_ultralight_write() {
|
||||
static void mf_ultralight_write(void) {
|
||||
Nfc* poller = nfc_alloc();
|
||||
Nfc* listener = nfc_alloc();
|
||||
|
||||
|
@ -342,7 +342,7 @@ static void mf_ultralight_write() {
|
|||
nfc_free(poller);
|
||||
}
|
||||
|
||||
static void mf_classic_reader() {
|
||||
static void mf_classic_reader(void) {
|
||||
Nfc* poller = nfc_alloc();
|
||||
Nfc* listener = nfc_alloc();
|
||||
|
||||
|
@ -368,7 +368,7 @@ static void mf_classic_reader() {
|
|||
nfc_free(poller);
|
||||
}
|
||||
|
||||
static void mf_classic_write() {
|
||||
static void mf_classic_write(void) {
|
||||
Nfc* poller = nfc_alloc();
|
||||
Nfc* listener = nfc_alloc();
|
||||
|
||||
|
@ -396,7 +396,7 @@ static void mf_classic_write() {
|
|||
nfc_free(poller);
|
||||
}
|
||||
|
||||
static void mf_classic_value_block() {
|
||||
static void mf_classic_value_block(void) {
|
||||
Nfc* poller = nfc_alloc();
|
||||
Nfc* listener = nfc_alloc();
|
||||
|
||||
|
@ -548,7 +548,7 @@ MU_TEST_SUITE(nfc) {
|
|||
nfc_test_free();
|
||||
}
|
||||
|
||||
int run_minunit_test_nfc() {
|
||||
int run_minunit_test_nfc(void) {
|
||||
MU_RUN_SUITE(nfc);
|
||||
return MU_EXIT_CODE;
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ static void nfc_prepare_col_res_data(
|
|||
}
|
||||
}
|
||||
|
||||
Nfc* nfc_alloc() {
|
||||
Nfc* nfc_alloc(void) {
|
||||
Nfc* instance = malloc(sizeof(Nfc));
|
||||
|
||||
return instance;
|
||||
|
|
|
@ -63,7 +63,7 @@ MU_TEST_SUITE(test_power_suite) {
|
|||
power_test_deinit();
|
||||
}
|
||||
|
||||
int run_minunit_test_power() {
|
||||
int run_minunit_test_power(void) {
|
||||
MU_RUN_SUITE(test_power_suite);
|
||||
return MU_EXIT_CODE;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ typedef struct {
|
|||
|
||||
static const uint32_t protocol_0_decoder_result = 0xDEADBEEF;
|
||||
|
||||
static void* protocol_0_alloc() {
|
||||
static void* protocol_0_alloc(void) {
|
||||
void* data = malloc(sizeof(Protocol0Data));
|
||||
return data;
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ typedef struct {
|
|||
|
||||
static const uint64_t protocol_1_decoder_result = 0x1234567890ABCDEF;
|
||||
|
||||
static void* protocol_1_alloc() {
|
||||
static void* protocol_1_alloc(void) {
|
||||
void* data = malloc(sizeof(Protocol1Data));
|
||||
return data;
|
||||
}
|
||||
|
@ -216,7 +216,7 @@ MU_TEST_SUITE(test_protocol_dict_suite) {
|
|||
MU_RUN_TEST(test_protocol_dict);
|
||||
}
|
||||
|
||||
int run_minunit_test_protocol_dict() {
|
||||
int run_minunit_test_protocol_dict(void) {
|
||||
MU_RUN_SUITE(test_protocol_dict_suite);
|
||||
return MU_EXIT_CODE;
|
||||
}
|
|
@ -1840,7 +1840,7 @@ MU_TEST_SUITE(test_rpc_session) {
|
|||
furi_record_close(RECORD_STORAGE);
|
||||
}
|
||||
|
||||
int run_minunit_test_rpc() {
|
||||
int run_minunit_test_rpc(void) {
|
||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||
if(storage_sd_status(storage) != FSE_OK) {
|
||||
FURI_LOG_E(TAG, "SD card not mounted - skip storage tests");
|
||||
|
|
|
@ -266,7 +266,7 @@ MU_TEST_SUITE(test_dirwalk_suite) {
|
|||
furi_record_close(RECORD_STORAGE);
|
||||
}
|
||||
|
||||
int run_minunit_test_dirwalk() {
|
||||
int run_minunit_test_dirwalk(void) {
|
||||
MU_RUN_SUITE(test_dirwalk_suite);
|
||||
return MU_EXIT_CODE;
|
||||
}
|
|
@ -36,7 +36,7 @@ static bool storage_file_create(Storage* storage, const char* path, const char*
|
|||
return result;
|
||||
}
|
||||
|
||||
static void storage_file_open_lock_setup() {
|
||||
static void storage_file_open_lock_setup(void) {
|
||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||
File* file = storage_file_alloc(storage);
|
||||
storage_simply_remove(storage, STORAGE_LOCKED_FILE);
|
||||
|
@ -47,7 +47,7 @@ static void storage_file_open_lock_setup() {
|
|||
furi_record_close(RECORD_STORAGE);
|
||||
}
|
||||
|
||||
static void storage_file_open_lock_teardown() {
|
||||
static void storage_file_open_lock_teardown(void) {
|
||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||
mu_check(storage_simply_remove(storage, STORAGE_LOCKED_FILE));
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
|
@ -702,7 +702,7 @@ MU_TEST_SUITE(test_md5_calc_suite) {
|
|||
MU_RUN_TEST(test_md5_calc);
|
||||
}
|
||||
|
||||
int run_minunit_test_storage() {
|
||||
int run_minunit_test_storage(void) {
|
||||
MU_RUN_SUITE(storage_file);
|
||||
MU_RUN_SUITE(storage_file_64k);
|
||||
MU_RUN_SUITE(storage_dir);
|
||||
|
|
|
@ -526,7 +526,7 @@ MU_TEST_SUITE(stream_suite) {
|
|||
MU_RUN_TEST(stream_buffered_large_file_test);
|
||||
}
|
||||
|
||||
int run_minunit_test_stream() {
|
||||
int run_minunit_test_stream(void) {
|
||||
MU_RUN_SUITE(stream_suite);
|
||||
return MU_EXIT_CODE;
|
||||
}
|
||||
|
|
|
@ -314,7 +314,7 @@ static LevelDuration subghz_hal_async_tx_test_yield(void* context) {
|
|||
furi_crash("Yield after reset");
|
||||
}
|
||||
} else {
|
||||
furi_crash("Programming error");
|
||||
furi_crash();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -904,7 +904,7 @@ MU_TEST_SUITE(subghz) {
|
|||
subghz_test_deinit();
|
||||
}
|
||||
|
||||
int run_minunit_test_subghz() {
|
||||
int run_minunit_test_subghz(void) {
|
||||
MU_RUN_SUITE(subghz);
|
||||
return MU_EXIT_CODE;
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ const UnitTest unit_tests[] = {
|
|||
{.name = "expansion", .entry = run_minunit_test_expansion},
|
||||
};
|
||||
|
||||
void minunit_print_progress() {
|
||||
void minunit_print_progress(void) {
|
||||
static const char progress[] = {'\\', '|', '/', '-'};
|
||||
static uint8_t progress_counter = 0;
|
||||
static uint32_t last_tick = 0;
|
||||
|
@ -157,7 +157,7 @@ void unit_tests_cli(Cli* cli, FuriString* args, void* context) {
|
|||
furi_record_close(RECORD_LOADER);
|
||||
}
|
||||
|
||||
void unit_tests_on_system_start() {
|
||||
void unit_tests_on_system_start(void) {
|
||||
#ifdef SRV_CLI
|
||||
Cli* cli = furi_record_open(RECORD_CLI);
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ MU_TEST_SUITE(test_varint_suite) {
|
|||
MU_RUN_TEST(test_varint_rand_i);
|
||||
}
|
||||
|
||||
int run_minunit_test_varint() {
|
||||
int run_minunit_test_varint(void) {
|
||||
MU_RUN_SUITE(test_varint_suite);
|
||||
return MU_EXIT_CODE;
|
||||
}
|
|
@ -55,7 +55,7 @@ uint32_t usb_test_exit(void* context) {
|
|||
return VIEW_NONE;
|
||||
}
|
||||
|
||||
UsbTestApp* usb_test_app_alloc() {
|
||||
UsbTestApp* usb_test_app_alloc(void) {
|
||||
UsbTestApp* app = malloc(sizeof(UsbTestApp));
|
||||
|
||||
// Gui
|
||||
|
|
|
@ -93,7 +93,7 @@ typedef struct {
|
|||
|
||||
static SubGhzDeviceCC1101Ext* subghz_device_cc1101_ext = NULL;
|
||||
|
||||
static bool subghz_device_cc1101_ext_check_init() {
|
||||
static bool subghz_device_cc1101_ext_check_init(void) {
|
||||
furi_assert(subghz_device_cc1101_ext->state == SubGhzDeviceCC1101ExtStateInit);
|
||||
subghz_device_cc1101_ext->state = SubGhzDeviceCC1101ExtStateIdle;
|
||||
|
||||
|
@ -198,7 +198,7 @@ static bool subghz_device_cc1101_ext_check_init() {
|
|||
return ret;
|
||||
}
|
||||
|
||||
bool subghz_device_cc1101_ext_alloc() {
|
||||
bool subghz_device_cc1101_ext_alloc(void) {
|
||||
furi_assert(subghz_device_cc1101_ext == NULL);
|
||||
subghz_device_cc1101_ext = malloc(sizeof(SubGhzDeviceCC1101Ext));
|
||||
subghz_device_cc1101_ext->state = SubGhzDeviceCC1101ExtStateInit;
|
||||
|
@ -213,7 +213,7 @@ bool subghz_device_cc1101_ext_alloc() {
|
|||
return subghz_device_cc1101_ext_check_init();
|
||||
}
|
||||
|
||||
void subghz_device_cc1101_ext_free() {
|
||||
void subghz_device_cc1101_ext_free(void) {
|
||||
furi_assert(subghz_device_cc1101_ext != NULL);
|
||||
furi_hal_spi_bus_handle_deinit(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
free(subghz_device_cc1101_ext);
|
||||
|
@ -224,11 +224,11 @@ void subghz_device_cc1101_ext_set_async_mirror_pin(const GpioPin* pin) {
|
|||
subghz_device_cc1101_ext->async_mirror_pin = pin;
|
||||
}
|
||||
|
||||
const GpioPin* subghz_device_cc1101_ext_get_data_gpio() {
|
||||
const GpioPin* subghz_device_cc1101_ext_get_data_gpio(void) {
|
||||
return subghz_device_cc1101_ext->g0_pin;
|
||||
}
|
||||
|
||||
bool subghz_device_cc1101_ext_is_connect() {
|
||||
bool subghz_device_cc1101_ext_is_connect(void) {
|
||||
bool ret = false;
|
||||
|
||||
if(subghz_device_cc1101_ext == NULL) { // not initialized
|
||||
|
@ -244,7 +244,7 @@ bool subghz_device_cc1101_ext_is_connect() {
|
|||
return ret;
|
||||
}
|
||||
|
||||
void subghz_device_cc1101_ext_sleep() {
|
||||
void subghz_device_cc1101_ext_sleep(void) {
|
||||
furi_assert(subghz_device_cc1101_ext->state == SubGhzDeviceCC1101ExtStateIdle);
|
||||
furi_hal_spi_acquire(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
|
||||
|
@ -259,7 +259,7 @@ void subghz_device_cc1101_ext_sleep() {
|
|||
furi_hal_spi_release(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
}
|
||||
|
||||
void subghz_device_cc1101_ext_dump_state() {
|
||||
void subghz_device_cc1101_ext_dump_state(void) {
|
||||
furi_hal_spi_acquire(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
printf(
|
||||
"[subghz_device_cc1101_ext] cc1101 chip %d, version %d\r\n",
|
||||
|
@ -324,19 +324,19 @@ void subghz_device_cc1101_ext_write_packet(const uint8_t* data, uint8_t size) {
|
|||
furi_hal_spi_release(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
}
|
||||
|
||||
void subghz_device_cc1101_ext_flush_rx() {
|
||||
void subghz_device_cc1101_ext_flush_rx(void) {
|
||||
furi_hal_spi_acquire(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
cc1101_flush_rx(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
furi_hal_spi_release(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
}
|
||||
|
||||
void subghz_device_cc1101_ext_flush_tx() {
|
||||
void subghz_device_cc1101_ext_flush_tx(void) {
|
||||
furi_hal_spi_acquire(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
cc1101_flush_tx(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
furi_hal_spi_release(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
}
|
||||
|
||||
bool subghz_device_cc1101_ext_rx_pipe_not_empty() {
|
||||
bool subghz_device_cc1101_ext_rx_pipe_not_empty(void) {
|
||||
CC1101RxBytes status[1];
|
||||
furi_hal_spi_acquire(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
cc1101_read_reg(
|
||||
|
@ -351,7 +351,7 @@ bool subghz_device_cc1101_ext_rx_pipe_not_empty() {
|
|||
}
|
||||
}
|
||||
|
||||
bool subghz_device_cc1101_ext_is_rx_data_crc_valid() {
|
||||
bool subghz_device_cc1101_ext_is_rx_data_crc_valid(void) {
|
||||
furi_hal_spi_acquire(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
uint8_t data[1];
|
||||
cc1101_read_reg(
|
||||
|
@ -370,14 +370,14 @@ void subghz_device_cc1101_ext_read_packet(uint8_t* data, uint8_t* size) {
|
|||
furi_hal_spi_release(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
}
|
||||
|
||||
void subghz_device_cc1101_ext_shutdown() {
|
||||
void subghz_device_cc1101_ext_shutdown(void) {
|
||||
furi_hal_spi_acquire(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
// Reset and shutdown
|
||||
cc1101_shutdown(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
furi_hal_spi_release(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
}
|
||||
|
||||
void subghz_device_cc1101_ext_reset() {
|
||||
void subghz_device_cc1101_ext_reset(void) {
|
||||
furi_hal_spi_acquire(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
furi_hal_gpio_init(subghz_device_cc1101_ext->g0_pin, GpioModeAnalog, GpioPullNo, GpioSpeedLow);
|
||||
cc1101_switch_to_idle(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
|
@ -388,7 +388,7 @@ void subghz_device_cc1101_ext_reset() {
|
|||
furi_hal_spi_release(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
}
|
||||
|
||||
void subghz_device_cc1101_ext_idle() {
|
||||
void subghz_device_cc1101_ext_idle(void) {
|
||||
furi_hal_spi_acquire(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
cc1101_switch_to_idle(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
//waiting for the chip to switch to IDLE mode
|
||||
|
@ -397,7 +397,7 @@ void subghz_device_cc1101_ext_idle() {
|
|||
furi_hal_spi_release(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
}
|
||||
|
||||
void subghz_device_cc1101_ext_rx() {
|
||||
void subghz_device_cc1101_ext_rx(void) {
|
||||
furi_hal_spi_acquire(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
cc1101_switch_to_rx(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
//waiting for the chip to switch to Rx mode
|
||||
|
@ -406,7 +406,7 @@ void subghz_device_cc1101_ext_rx() {
|
|||
furi_hal_spi_release(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
}
|
||||
|
||||
bool subghz_device_cc1101_ext_tx() {
|
||||
bool subghz_device_cc1101_ext_tx(void) {
|
||||
if(subghz_device_cc1101_ext->regulation != SubGhzDeviceCC1101ExtRegulationTxRx) return false;
|
||||
furi_hal_spi_acquire(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
cc1101_switch_to_tx(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
|
@ -417,7 +417,7 @@ bool subghz_device_cc1101_ext_tx() {
|
|||
return true;
|
||||
}
|
||||
|
||||
float subghz_device_cc1101_ext_get_rssi() {
|
||||
float subghz_device_cc1101_ext_get_rssi(void) {
|
||||
furi_hal_spi_acquire(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
int32_t rssi_dec = cc1101_get_rssi(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
furi_hal_spi_release(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
|
@ -432,7 +432,7 @@ float subghz_device_cc1101_ext_get_rssi() {
|
|||
return rssi;
|
||||
}
|
||||
|
||||
uint8_t subghz_device_cc1101_ext_get_lqi() {
|
||||
uint8_t subghz_device_cc1101_ext_get_lqi(void) {
|
||||
furi_hal_spi_acquire(subghz_device_cc1101_ext->spi_bus_handle);
|
||||
uint8_t data[1];
|
||||
cc1101_read_reg(
|
||||
|
@ -472,7 +472,7 @@ uint32_t subghz_device_cc1101_ext_set_frequency(uint32_t value) {
|
|||
return real_frequency;
|
||||
}
|
||||
|
||||
static bool subghz_device_cc1101_ext_start_debug() {
|
||||
static bool subghz_device_cc1101_ext_start_debug(void) {
|
||||
bool ret = false;
|
||||
if(subghz_device_cc1101_ext->async_mirror_pin != NULL) {
|
||||
furi_hal_gpio_init(
|
||||
|
@ -485,7 +485,7 @@ static bool subghz_device_cc1101_ext_start_debug() {
|
|||
return ret;
|
||||
}
|
||||
|
||||
static bool subghz_device_cc1101_ext_stop_debug() {
|
||||
static bool subghz_device_cc1101_ext_stop_debug(void) {
|
||||
bool ret = false;
|
||||
if(subghz_device_cc1101_ext->async_mirror_pin != NULL) {
|
||||
furi_hal_gpio_init(
|
||||
|
@ -567,7 +567,7 @@ void subghz_device_cc1101_ext_start_async_rx(
|
|||
subghz_device_cc1101_ext->async_rx.capture_delta_duration = 0;
|
||||
}
|
||||
|
||||
void subghz_device_cc1101_ext_stop_async_rx() {
|
||||
void subghz_device_cc1101_ext_stop_async_rx(void) {
|
||||
furi_assert(subghz_device_cc1101_ext->state == SubGhzDeviceCC1101ExtStateAsyncRx);
|
||||
subghz_device_cc1101_ext->state = SubGhzDeviceCC1101ExtStateIdle;
|
||||
|
||||
|
@ -805,13 +805,13 @@ bool subghz_device_cc1101_ext_start_async_tx(SubGhzDeviceCC1101ExtCallback callb
|
|||
return true;
|
||||
}
|
||||
|
||||
bool subghz_device_cc1101_ext_is_async_tx_complete() {
|
||||
bool subghz_device_cc1101_ext_is_async_tx_complete(void) {
|
||||
return (
|
||||
(subghz_device_cc1101_ext->state == SubGhzDeviceCC1101ExtStateAsyncTx) &&
|
||||
(LL_TIM_GetAutoReload(TIM17) == 0));
|
||||
}
|
||||
|
||||
void subghz_device_cc1101_ext_stop_async_tx() {
|
||||
void subghz_device_cc1101_ext_stop_async_tx(void) {
|
||||
furi_assert(subghz_device_cc1101_ext->state == SubGhzDeviceCC1101ExtStateAsyncTx);
|
||||
|
||||
// Shutdown radio
|
||||
|
|
|
@ -28,31 +28,31 @@ void subghz_device_cc1101_ext_set_async_mirror_pin(const GpioPin* pin);
|
|||
*
|
||||
* @return pointer to the gpio pin structure
|
||||
*/
|
||||
const GpioPin* subghz_device_cc1101_ext_get_data_gpio();
|
||||
const GpioPin* subghz_device_cc1101_ext_get_data_gpio(void);
|
||||
|
||||
/** Initialize device
|
||||
*
|
||||
* @return true if success
|
||||
*/
|
||||
bool subghz_device_cc1101_ext_alloc();
|
||||
bool subghz_device_cc1101_ext_alloc(void);
|
||||
|
||||
/** Deinitialize device
|
||||
*/
|
||||
void subghz_device_cc1101_ext_free();
|
||||
void subghz_device_cc1101_ext_free(void);
|
||||
|
||||
/** Check and switch to power save mode Used by internal API-HAL
|
||||
* initialization routine Can be used to reinitialize device to safe state and
|
||||
* send it to sleep
|
||||
*/
|
||||
bool subghz_device_cc1101_ext_is_connect();
|
||||
bool subghz_device_cc1101_ext_is_connect(void);
|
||||
|
||||
/** Send device to sleep mode
|
||||
*/
|
||||
void subghz_device_cc1101_ext_sleep();
|
||||
void subghz_device_cc1101_ext_sleep(void);
|
||||
|
||||
/** Dump info to stdout
|
||||
*/
|
||||
void subghz_device_cc1101_ext_dump_state();
|
||||
void subghz_device_cc1101_ext_dump_state(void);
|
||||
|
||||
/** Load custom registers from preset
|
||||
*
|
||||
|
@ -83,13 +83,13 @@ void subghz_device_cc1101_ext_write_packet(const uint8_t* data, uint8_t size);
|
|||
*
|
||||
* @return true if not empty
|
||||
*/
|
||||
bool subghz_device_cc1101_ext_rx_pipe_not_empty();
|
||||
bool subghz_device_cc1101_ext_rx_pipe_not_empty(void);
|
||||
|
||||
/** Check if received data crc is valid
|
||||
*
|
||||
* @return true if valid
|
||||
*/
|
||||
bool subghz_device_cc1101_ext_is_rx_data_crc_valid();
|
||||
bool subghz_device_cc1101_ext_is_rx_data_crc_valid(void);
|
||||
|
||||
/** Read packet from FIFO
|
||||
*
|
||||
|
@ -100,47 +100,47 @@ void subghz_device_cc1101_ext_read_packet(uint8_t* data, uint8_t* size);
|
|||
|
||||
/** Flush rx FIFO buffer
|
||||
*/
|
||||
void subghz_device_cc1101_ext_flush_rx();
|
||||
void subghz_device_cc1101_ext_flush_rx(void);
|
||||
|
||||
/** Flush tx FIFO buffer
|
||||
*/
|
||||
void subghz_device_cc1101_ext_flush_tx();
|
||||
void subghz_device_cc1101_ext_flush_tx(void);
|
||||
|
||||
/** Shutdown Issue SPWD command
|
||||
* @warning registers content will be lost
|
||||
*/
|
||||
void subghz_device_cc1101_ext_shutdown();
|
||||
void subghz_device_cc1101_ext_shutdown(void);
|
||||
|
||||
/** Reset Issue reset command
|
||||
* @warning registers content will be lost
|
||||
*/
|
||||
void subghz_device_cc1101_ext_reset();
|
||||
void subghz_device_cc1101_ext_reset(void);
|
||||
|
||||
/** Switch to Idle
|
||||
*/
|
||||
void subghz_device_cc1101_ext_idle();
|
||||
void subghz_device_cc1101_ext_idle(void);
|
||||
|
||||
/** Switch to Receive
|
||||
*/
|
||||
void subghz_device_cc1101_ext_rx();
|
||||
void subghz_device_cc1101_ext_rx(void);
|
||||
|
||||
/** Switch to Transmit
|
||||
*
|
||||
* @return true if the transfer is allowed by belonging to the region
|
||||
*/
|
||||
bool subghz_device_cc1101_ext_tx();
|
||||
bool subghz_device_cc1101_ext_tx(void);
|
||||
|
||||
/** Get RSSI value in dBm
|
||||
*
|
||||
* @return RSSI value
|
||||
*/
|
||||
float subghz_device_cc1101_ext_get_rssi();
|
||||
float subghz_device_cc1101_ext_get_rssi(void);
|
||||
|
||||
/** Get LQI
|
||||
*
|
||||
* @return LQI value
|
||||
*/
|
||||
uint8_t subghz_device_cc1101_ext_get_lqi();
|
||||
uint8_t subghz_device_cc1101_ext_get_lqi(void);
|
||||
|
||||
/** Check if frequency is in valid range
|
||||
*
|
||||
|
@ -174,7 +174,7 @@ void subghz_device_cc1101_ext_start_async_rx(
|
|||
|
||||
/** Disable signal timings capture Resets GPIO and TIM2
|
||||
*/
|
||||
void subghz_device_cc1101_ext_stop_async_rx();
|
||||
void subghz_device_cc1101_ext_stop_async_rx(void);
|
||||
|
||||
/** Async TX callback type
|
||||
* @param context callback context
|
||||
|
@ -195,11 +195,11 @@ bool subghz_device_cc1101_ext_start_async_tx(SubGhzDeviceCC1101ExtCallback callb
|
|||
*
|
||||
* @return true if TX complete
|
||||
*/
|
||||
bool subghz_device_cc1101_ext_is_async_tx_complete();
|
||||
bool subghz_device_cc1101_ext_is_async_tx_complete(void);
|
||||
|
||||
/** Stop async transmission and cleanup resources Resets GPIO, TIM2, and DMA1
|
||||
*/
|
||||
void subghz_device_cc1101_ext_stop_async_tx();
|
||||
void subghz_device_cc1101_ext_stop_async_tx(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -105,6 +105,6 @@ static const FlipperAppPluginDescriptor subghz_device_cc1101_ext_descriptor = {
|
|||
.entry_point = &subghz_device_cc1101_ext,
|
||||
};
|
||||
|
||||
const FlipperAppPluginDescriptor* subghz_device_cc1101_ext_ep() {
|
||||
const FlipperAppPluginDescriptor* subghz_device_cc1101_ext_ep(void) {
|
||||
return &subghz_device_cc1101_ext_descriptor;
|
||||
}
|
|
@ -5,4 +5,4 @@
|
|||
|
||||
typedef struct SubGhzDeviceCC1101Ext SubGhzDeviceCC1101Ext;
|
||||
|
||||
const FlipperAppPluginDescriptor* subghz_device_cc1101_ext_ep();
|
||||
const FlipperAppPluginDescriptor* subghz_device_cc1101_ext_ep(void);
|
||||
|
|
|
@ -57,7 +57,7 @@ static void ble_beacon_app_restore_beacon_state(BleBeaconApp* app) {
|
|||
app->beacon_data_len = furi_hal_bt_extra_beacon_get_data(app->beacon_data);
|
||||
}
|
||||
|
||||
static BleBeaconApp* ble_beacon_app_alloc() {
|
||||
static BleBeaconApp* ble_beacon_app_alloc(void) {
|
||||
BleBeaconApp* app = malloc(sizeof(BleBeaconApp));
|
||||
|
||||
app->gui = furi_record_open(RECORD_GUI);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include <flipper_application/flipper_application.h>
|
||||
|
||||
static int example_plugin1_method1() {
|
||||
static int example_plugin1_method1(void) {
|
||||
return 42;
|
||||
}
|
||||
|
||||
|
@ -32,6 +32,6 @@ static const FlipperAppPluginDescriptor example_plugin1_descriptor = {
|
|||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* example_plugin1_ep() {
|
||||
const FlipperAppPluginDescriptor* example_plugin1_ep(void) {
|
||||
return &example_plugin1_descriptor;
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include <flipper_application/flipper_application.h>
|
||||
|
||||
static int example_plugin2_method1() {
|
||||
static int example_plugin2_method1(void) {
|
||||
return 1337;
|
||||
}
|
||||
|
||||
|
@ -32,6 +32,6 @@ static const FlipperAppPluginDescriptor example_plugin2_descriptor = {
|
|||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* example_plugin2_ep() {
|
||||
const FlipperAppPluginDescriptor* example_plugin2_ep(void) {
|
||||
return &example_plugin2_descriptor;
|
||||
}
|
||||
|
|
|
@ -11,6 +11,6 @@
|
|||
|
||||
typedef struct {
|
||||
const char* name;
|
||||
int (*method1)();
|
||||
int (*method1)(void);
|
||||
int (*method2)(int, int);
|
||||
} ExamplePlugin;
|
||||
|
|
|
@ -8,7 +8,7 @@ void app_api_accumulator_set(uint32_t value) {
|
|||
accumulator = value;
|
||||
}
|
||||
|
||||
uint32_t app_api_accumulator_get() {
|
||||
uint32_t app_api_accumulator_get(void) {
|
||||
return accumulator;
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ extern "C" {
|
|||
|
||||
void app_api_accumulator_set(uint32_t value);
|
||||
|
||||
uint32_t app_api_accumulator_get();
|
||||
uint32_t app_api_accumulator_get(void);
|
||||
|
||||
void app_api_accumulator_add(uint32_t value);
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ static void advanced_plugin1_method1(int arg1) {
|
|||
app_api_accumulator_add(arg1);
|
||||
}
|
||||
|
||||
static void advanced_plugin1_method2() {
|
||||
static void advanced_plugin1_method2(void) {
|
||||
/* Accumulator value is stored inside host application */
|
||||
FURI_LOG_I("TEST", "Plugin 1, accumulator: %lu", app_api_accumulator_get());
|
||||
}
|
||||
|
@ -38,6 +38,6 @@ static const FlipperAppPluginDescriptor advanced_plugin1_descriptor = {
|
|||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* advanced_plugin1_ep() {
|
||||
const FlipperAppPluginDescriptor* advanced_plugin1_ep(void) {
|
||||
return &advanced_plugin1_descriptor;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ static void advanced_plugin2_method1(int arg1) {
|
|||
app_api_accumulator_mul(arg1);
|
||||
}
|
||||
|
||||
static void advanced_plugin2_method2() {
|
||||
static void advanced_plugin2_method2(void) {
|
||||
/* Accumulator value is stored inside host application */
|
||||
FURI_LOG_I("TEST", "Plugin 2, accumulator: %lu", app_api_accumulator_get());
|
||||
}
|
||||
|
@ -38,6 +38,6 @@ static const FlipperAppPluginDescriptor advanced_plugin2_descriptor = {
|
|||
};
|
||||
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* advanced_plugin2_ep() {
|
||||
const FlipperAppPluginDescriptor* advanced_plugin2_ep(void) {
|
||||
return &advanced_plugin2_descriptor;
|
||||
}
|
||||
|
|
|
@ -12,5 +12,5 @@
|
|||
typedef struct {
|
||||
const char* name;
|
||||
void (*method1)(int);
|
||||
void (*method2)();
|
||||
void (*method2)(void);
|
||||
} AdvancedPlugin;
|
||||
|
|
|
@ -315,7 +315,7 @@ static void example_thermo_run(ExampleThermoContext* context) {
|
|||
/******************** Initialisation & startup *****************************/
|
||||
|
||||
/* Allocate the memory and initialise the variables */
|
||||
static ExampleThermoContext* example_thermo_context_alloc() {
|
||||
static ExampleThermoContext* example_thermo_context_alloc(void) {
|
||||
ExampleThermoContext* context = malloc(sizeof(ExampleThermoContext));
|
||||
|
||||
context->view_port = view_port_alloc();
|
||||
|
|
|
@ -12,7 +12,7 @@ bool archive_back_event_callback(void* context) {
|
|||
return scene_manager_handle_back_event(archive->scene_manager);
|
||||
}
|
||||
|
||||
ArchiveApp* archive_alloc() {
|
||||
ArchiveApp* archive_alloc(void) {
|
||||
ArchiveApp* archive = malloc(sizeof(ArchiveApp));
|
||||
|
||||
archive->gui = furi_record_open(RECORD_GUI);
|
||||
|
|
|
@ -79,7 +79,7 @@ uint16_t archive_favorites_count(void* context) {
|
|||
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);
|
||||
|
|
|
@ -436,7 +436,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));
|
||||
|
|
|
@ -111,5 +111,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);
|
||||
|
|
|
@ -71,7 +71,7 @@ bool ducky_get_number(const char* param, uint32_t* val) {
|
|||
return false;
|
||||
}
|
||||
|
||||
void ducky_numlock_on() {
|
||||
void ducky_numlock_on(void) {
|
||||
if((furi_hal_hid_get_led_state() & HID_KB_LED_NUM) == 0) {
|
||||
furi_hal_hid_kb_press(HID_KEYBOARD_LOCK_NUM_LOCK);
|
||||
furi_hal_hid_kb_release(HID_KEYBOARD_LOCK_NUM_LOCK);
|
||||
|
|
|
@ -193,7 +193,7 @@ static bool bad_usb_input_callback(InputEvent* event, void* context) {
|
|||
return consumed;
|
||||
}
|
||||
|
||||
BadUsb* bad_usb_alloc() {
|
||||
BadUsb* bad_usb_alloc(void) {
|
||||
BadUsb* bad_usb = malloc(sizeof(BadUsb));
|
||||
|
||||
bad_usb->view = view_alloc();
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
typedef struct BadUsb BadUsb;
|
||||
typedef void (*BadUsbButtonCallback)(InputKey key, void* context);
|
||||
|
||||
BadUsb* bad_usb_alloc();
|
||||
BadUsb* bad_usb_alloc(void);
|
||||
|
||||
void bad_usb_free(BadUsb* bad_usb);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -77,7 +77,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();
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
static void ibutton_cli(Cli* cli, FuriString* args, void* context);
|
||||
|
||||
// app cli function
|
||||
void ibutton_on_system_start() {
|
||||
void ibutton_on_system_start(void) {
|
||||
#ifdef SRV_CLI
|
||||
Cli* cli = furi_record_open(RECORD_CLI);
|
||||
cli_add_command(cli, "ikey", CliCommandFlagDefault, ibutton_cli, cli);
|
||||
|
@ -21,7 +21,7 @@ void ibutton_on_system_start() {
|
|||
#endif
|
||||
}
|
||||
|
||||
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");
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -508,7 +508,7 @@ static void infrared_cli_start_ir(Cli* cli, FuriString* args, void* context) {
|
|||
|
||||
furi_string_free(command);
|
||||
}
|
||||
void infrared_on_system_start() {
|
||||
void infrared_on_system_start(void) {
|
||||
#ifdef SRV_CLI
|
||||
Cli* cli = (Cli*)furi_record_open(RECORD_CLI);
|
||||
cli_add_command(cli, "ir", CliCommandFlagDefault, infrared_cli_start_ir, NULL);
|
||||
|
|
|
@ -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.
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue