Fix function prototypes after merge

This commit is contained in:
Willy-JL
2024-04-02 16:05:03 +01:00
parent 514171d0c5
commit 82a07888f5
42 changed files with 71 additions and 71 deletions

View File

@@ -46,7 +46,7 @@ static bool archive_favorites_read_line(File* file, FuriString* str_result) {
return result; return result;
} }
uint16_t archive_favorites_count() { uint16_t archive_favorites_count(void) {
Storage* fs_api = furi_record_open(RECORD_STORAGE); Storage* fs_api = furi_record_open(RECORD_STORAGE);
File* file = storage_file_alloc(fs_api); File* file = storage_file_alloc(fs_api);

View File

@@ -5,7 +5,7 @@
#define ARCHIVE_FAV_PATH ANY_PATH("favorites.txt") #define ARCHIVE_FAV_PATH ANY_PATH("favorites.txt")
#define ARCHIVE_FAV_TEMP_PATH ANY_PATH("favorites.tmp") #define ARCHIVE_FAV_TEMP_PATH ANY_PATH("favorites.tmp")
uint16_t archive_favorites_count(); uint16_t archive_favorites_count(void);
bool archive_favorites_read(void* context); bool archive_favorites_read(void* context);
bool archive_favorites_delete(const char* format, ...) _ATTRIBUTE((__format__(__printf__, 1, 2))); bool archive_favorites_delete(const char* format, ...) _ATTRIBUTE((__format__(__printf__, 1, 2)));
bool archive_is_favorite(const char* format, ...) _ATTRIBUTE((__format__(__printf__, 1, 2))); bool archive_is_favorite(const char* format, ...) _ATTRIBUTE((__format__(__printf__, 1, 2)));

View File

@@ -49,7 +49,7 @@ struct SubGhzGPS {
* *
* @return SubGhzGPS* SubGhzGPS object * @return SubGhzGPS* SubGhzGPS object
*/ */
SubGhzGPS* subghz_gps_plugin_init(); SubGhzGPS* subghz_gps_plugin_init(uint32_t baudrate);
/** /**
* Deinitialize SubGhzGPS plugin * Deinitialize SubGhzGPS plugin

View File

@@ -27,7 +27,7 @@ static void infrared_remote_clear_buttons(InfraredRemote* remote) {
InfraredButtonArray_reset(remote->buttons); InfraredButtonArray_reset(remote->buttons);
} }
InfraredRemote* infrared_remote_alloc() { InfraredRemote* infrared_remote_alloc(void) {
InfraredRemote* remote = malloc(sizeof(InfraredRemote)); InfraredRemote* remote = malloc(sizeof(InfraredRemote));
InfraredButtonArray_init(remote->buttons); InfraredButtonArray_init(remote->buttons);
remote->name = furi_string_alloc(); remote->name = furi_string_alloc();

View File

@@ -8,7 +8,7 @@
typedef struct InfraredRemote InfraredRemote; typedef struct InfraredRemote InfraredRemote;
InfraredRemote* infrared_remote_alloc(); InfraredRemote* infrared_remote_alloc(void);
void infrared_remote_free(InfraredRemote* remote); void infrared_remote_free(InfraredRemote* remote);
void infrared_remote_reset(InfraredRemote* remote); void infrared_remote_reset(InfraredRemote* remote);

View File

@@ -7,7 +7,7 @@ struct InfraredRemoteButton {
InfraredSignal* signal; InfraredSignal* signal;
}; };
InfraredRemoteButton* infrared_remote_button_alloc() { InfraredRemoteButton* infrared_remote_button_alloc(void) {
InfraredRemoteButton* button = malloc(sizeof(InfraredRemoteButton)); InfraredRemoteButton* button = malloc(sizeof(InfraredRemoteButton));
button->name = furi_string_alloc(); button->name = furi_string_alloc();
button->signal = infrared_signal_alloc(); button->signal = infrared_signal_alloc();

View File

@@ -4,7 +4,7 @@
typedef struct InfraredRemoteButton InfraredRemoteButton; typedef struct InfraredRemoteButton InfraredRemoteButton;
InfraredRemoteButton* infrared_remote_button_alloc(); InfraredRemoteButton* infrared_remote_button_alloc(void);
void infrared_remote_button_free(InfraredRemoteButton* button); void infrared_remote_button_free(InfraredRemoteButton* button);
void infrared_remote_button_set_name(InfraredRemoteButton* button, const char* name); void infrared_remote_button_set_name(InfraredRemoteButton* button, const char* name);

View File

@@ -166,7 +166,7 @@ static bool infrared_signal_read_body(InfraredSignal* signal, FlipperFormat* ff)
return success; return success;
} }
InfraredSignal* infrared_signal_alloc() { InfraredSignal* infrared_signal_alloc(void) {
InfraredSignal* signal = malloc(sizeof(InfraredSignal)); InfraredSignal* signal = malloc(sizeof(InfraredSignal));
signal->is_raw = false; signal->is_raw = false;

View File

@@ -16,7 +16,7 @@ typedef struct {
float duty_cycle; float duty_cycle;
} InfraredRawSignal; } InfraredRawSignal;
InfraredSignal* infrared_signal_alloc(); InfraredSignal* infrared_signal_alloc(void);
void infrared_signal_free(InfraredSignal* signal); void infrared_signal_free(InfraredSignal* signal);
bool infrared_signal_is_raw(InfraredSignal* signal); bool infrared_signal_is_raw(InfraredSignal* signal);

View File

@@ -2,7 +2,7 @@
#define TAG "SubRemPresets" #define TAG "SubRemPresets"
SubRemSubFilePreset* subrem_sub_file_preset_alloc() { SubRemSubFilePreset* subrem_sub_file_preset_alloc(void) {
SubRemSubFilePreset* sub_preset = malloc(sizeof(SubRemSubFilePreset)); SubRemSubFilePreset* sub_preset = malloc(sizeof(SubRemSubFilePreset));
sub_preset->fff_data = flipper_format_string_alloc(); sub_preset->fff_data = flipper_format_string_alloc();

View File

@@ -27,7 +27,7 @@ typedef struct {
SubRemSubFilePreset* subs_preset[SubRemSubKeyNameMaxCount]; SubRemSubFilePreset* subs_preset[SubRemSubKeyNameMaxCount];
} SubRemMapPreset; } SubRemMapPreset;
SubRemSubFilePreset* subrem_sub_file_preset_alloc(); SubRemSubFilePreset* subrem_sub_file_preset_alloc(void);
void subrem_sub_file_preset_free(SubRemSubFilePreset* sub_preset); void subrem_sub_file_preset_free(SubRemSubFilePreset* sub_preset);

View File

@@ -25,7 +25,7 @@ static void subghz_txrx_radio_device_power_off(SubGhzTxRx* instance) {
if(furi_hal_power_is_otg_enabled()) furi_hal_power_disable_otg(); 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)); SubGhzTxRx* instance = malloc(sizeof(SubGhzTxRx));
instance->setting = subghz_setting_alloc(); instance->setting = subghz_setting_alloc();
subghz_setting_load(instance->setting, EXT_PATH("subghz/assets/setting_user")); subghz_setting_load(instance->setting, EXT_PATH("subghz/assets/setting_user"));

View File

@@ -53,7 +53,7 @@ typedef enum {
* *
* @return SubGhzTxRx* pointer to SubGhzTxRx * @return SubGhzTxRx* pointer to SubGhzTxRx
*/ */
SubGhzTxRx* subghz_txrx_alloc(); SubGhzTxRx* subghz_txrx_alloc(void);
/** /**
* Free SubGhzTxRx * Free SubGhzTxRx

View File

@@ -242,7 +242,7 @@ void subrem_view_edit_menu_exit(void* context) {
furi_assert(context); furi_assert(context);
} }
SubRemViewEditMenu* subrem_view_edit_menu_alloc() { SubRemViewEditMenu* subrem_view_edit_menu_alloc(void) {
SubRemViewEditMenu* subrem_view_edit_menu = malloc(sizeof(SubRemViewEditMenu)); SubRemViewEditMenu* subrem_view_edit_menu = malloc(sizeof(SubRemViewEditMenu));
// View allocation and configuration // View allocation and configuration

View File

@@ -13,7 +13,7 @@ void subrem_view_edit_menu_set_callback(
SubRemViewEditMenuCallback callback, SubRemViewEditMenuCallback callback,
void* context); void* context);
SubRemViewEditMenu* subrem_view_edit_menu_alloc(); SubRemViewEditMenu* subrem_view_edit_menu_alloc(void);
void subrem_view_edit_menu_free(SubRemViewEditMenu* subrem_view_edit_menu); void subrem_view_edit_menu_free(SubRemViewEditMenu* subrem_view_edit_menu);

View File

@@ -277,7 +277,7 @@ void subrem_view_remote_exit(void* context) {
furi_assert(context); furi_assert(context);
} }
SubRemViewRemote* subrem_view_remote_alloc() { SubRemViewRemote* subrem_view_remote_alloc(void) {
SubRemViewRemote* subrem_view_remote = malloc(sizeof(SubRemViewRemote)); SubRemViewRemote* subrem_view_remote = malloc(sizeof(SubRemViewRemote));
// View allocation and configuration // View allocation and configuration

View File

@@ -20,7 +20,7 @@ void subrem_view_remote_set_callback(
SubRemViewRemoteCallback callback, SubRemViewRemoteCallback callback,
void* context); void* context);
SubRemViewRemote* subrem_view_remote_alloc(); SubRemViewRemote* subrem_view_remote_alloc(void);
void subrem_view_remote_free(SubRemViewRemote* subrem_view_remote); void subrem_view_remote_free(SubRemViewRemote* subrem_view_remote);

View File

@@ -14,7 +14,7 @@ typedef struct {
void* context; void* context;
} TimerCallback_t; } TimerCallback_t;
const char* furi_timer_get_current_name() { const char* furi_timer_get_current_name(void) {
return current_timer_name; return current_timer_name;
} }

View File

@@ -105,7 +105,7 @@ void furi_timer_set_thread_priority(FuriTimerThreadPriority priority);
* *
* @return The pointer to the timer name, or NULL * @return The pointer to the timer name, or NULL
*/ */
const char* furi_timer_get_current_name(); const char* furi_timer_get_current_name(void);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@@ -39,13 +39,13 @@
static const GpioPin led_pin = {.port = GPIOA, .pin = LL_GPIO_PIN_8}; static const GpioPin led_pin = {.port = GPIOA, .pin = LL_GPIO_PIN_8};
static uint8_t led_buffer[SK6805_LED_COUNT][3]; static uint8_t led_buffer[SK6805_LED_COUNT][3];
void SK6805_init() { void SK6805_init(void) {
DEBUG_INIT(); DEBUG_INIT();
furi_hal_gpio_write(SK6805_LED_PIN, false); furi_hal_gpio_write(SK6805_LED_PIN, false);
furi_hal_gpio_init(SK6805_LED_PIN, GpioModeOutputPushPull, GpioPullNo, GpioSpeedVeryHigh); furi_hal_gpio_init(SK6805_LED_PIN, GpioModeOutputPushPull, GpioPullNo, GpioSpeedVeryHigh);
} }
uint8_t SK6805_get_led_count() { uint8_t SK6805_get_led_count(void) {
return (const uint8_t)SK6805_LED_COUNT; return (const uint8_t)SK6805_LED_COUNT;
} }
void SK6805_set_led_color(uint8_t led_index, uint8_t r, uint8_t g, uint8_t b) { void SK6805_set_led_color(uint8_t led_index, uint8_t r, uint8_t g, uint8_t b) {
@@ -57,7 +57,7 @@ void SK6805_set_led_color(uint8_t led_index, uint8_t r, uint8_t g, uint8_t b) {
led_buffer[led_index][2] = b; led_buffer[led_index][2] = b;
} }
void SK6805_update() { void SK6805_update(void) {
FURI_LOG_T(TAG, "update"); FURI_LOG_T(TAG, "update");
SK6805_init(); SK6805_init();
FURI_CRITICAL_ENTER(); FURI_CRITICAL_ENTER();

View File

@@ -26,14 +26,14 @@
/** /**
* @brief Инициализация линии управления подсветкой * @brief Инициализация линии управления подсветкой
*/ */
void SK6805_init(); void SK6805_init(void);
/** /**
* @brief Получить количество светодиодов в подсветке * @brief Получить количество светодиодов в подсветке
* *
* @return Количество светодиодов * @return Количество светодиодов
*/ */
uint8_t SK6805_get_led_count(); uint8_t SK6805_get_led_count(void);
/** /**
* @brief Установить цвет свечения светодиода * @brief Установить цвет свечения светодиода
@@ -48,6 +48,6 @@ void SK6805_set_led_color(uint8_t led_index, uint8_t r, uint8_t g, uint8_t b);
/** /**
* @brief Обновление состояния подсветки дисплея * @brief Обновление состояния подсветки дисплея
*/ */
void SK6805_update(); void SK6805_update(void);
#endif /* SK6805_H_ */ #endif /* SK6805_H_ */

View File

@@ -83,7 +83,7 @@ void rgb_backlight_load_settings(bool enabled) {
rgb_backlight_reconfigure(rgb_state.enabled); rgb_backlight_reconfigure(rgb_state.enabled);
} }
void rgb_backlight_save_settings() { void rgb_backlight_save_settings(void) {
if(!rgb_state.settings_loaded) return; if(!rgb_state.settings_loaded) return;
furi_check(furi_mutex_acquire(rgb_state.mutex, FuriWaitForever) == FuriStatusOk); furi_check(furi_mutex_acquire(rgb_state.mutex, FuriWaitForever) == FuriStatusOk);
@@ -132,7 +132,7 @@ void rgb_backlight_set_rainbow_mode(RGBBacklightRainbowMode rainbow_mode) {
furi_check(furi_mutex_release(rgb_state.mutex) == FuriStatusOk); furi_check(furi_mutex_release(rgb_state.mutex) == FuriStatusOk);
} }
RGBBacklightRainbowMode rgb_backlight_get_rainbow_mode() { RGBBacklightRainbowMode rgb_backlight_get_rainbow_mode(void) {
if(!rgb_state.settings_loaded) return 0; if(!rgb_state.settings_loaded) return 0;
furi_check(furi_mutex_acquire(rgb_state.mutex, FuriWaitForever) == FuriStatusOk); furi_check(furi_mutex_acquire(rgb_state.mutex, FuriWaitForever) == FuriStatusOk);
@@ -151,7 +151,7 @@ void rgb_backlight_set_rainbow_speed(uint8_t rainbow_speed) {
furi_check(furi_mutex_release(rgb_state.mutex) == FuriStatusOk); furi_check(furi_mutex_release(rgb_state.mutex) == FuriStatusOk);
} }
uint8_t rgb_backlight_get_rainbow_speed() { uint8_t rgb_backlight_get_rainbow_speed(void) {
if(!rgb_state.settings_loaded) return 0; if(!rgb_state.settings_loaded) return 0;
furi_check(furi_mutex_acquire(rgb_state.mutex, FuriWaitForever) == FuriStatusOk); furi_check(furi_mutex_acquire(rgb_state.mutex, FuriWaitForever) == FuriStatusOk);
@@ -173,7 +173,7 @@ void rgb_backlight_set_rainbow_interval(uint32_t rainbow_interval) {
furi_check(furi_mutex_release(rgb_state.mutex) == FuriStatusOk); furi_check(furi_mutex_release(rgb_state.mutex) == FuriStatusOk);
} }
uint32_t rgb_backlight_get_rainbow_interval() { uint32_t rgb_backlight_get_rainbow_interval(void) {
if(!rgb_state.settings_loaded) return 0; if(!rgb_state.settings_loaded) return 0;
furi_check(furi_mutex_acquire(rgb_state.mutex, FuriWaitForever) == FuriStatusOk); furi_check(furi_mutex_acquire(rgb_state.mutex, FuriWaitForever) == FuriStatusOk);
@@ -193,7 +193,7 @@ void rgb_backlight_set_rainbow_saturation(uint8_t rainbow_saturation) {
furi_check(furi_mutex_release(rgb_state.mutex) == FuriStatusOk); furi_check(furi_mutex_release(rgb_state.mutex) == FuriStatusOk);
} }
uint8_t rgb_backlight_get_rainbow_saturation() { uint8_t rgb_backlight_get_rainbow_saturation(void) {
if(!rgb_state.settings_loaded) return 0; if(!rgb_state.settings_loaded) return 0;
furi_check(furi_mutex_acquire(rgb_state.mutex, FuriWaitForever) == FuriStatusOk); furi_check(furi_mutex_acquire(rgb_state.mutex, FuriWaitForever) == FuriStatusOk);

View File

@@ -42,7 +42,7 @@ void rgb_backlight_load_settings(bool enabled);
/** /**
* @brief Save Current RGB Lighting Settings * @brief Save Current RGB Lighting Settings
*/ */
void rgb_backlight_save_settings(); void rgb_backlight_save_settings(void);
/** /**
* @brief Change the color of the backlight * @brief Change the color of the backlight
@@ -61,7 +61,7 @@ void rgb_backlight_get_color(uint8_t index, RgbColor* color);
*/ */
void rgb_backlight_set_rainbow_mode(RGBBacklightRainbowMode rainbow_mode); void rgb_backlight_set_rainbow_mode(RGBBacklightRainbowMode rainbow_mode);
RGBBacklightRainbowMode rgb_backlight_get_rainbow_mode(); RGBBacklightRainbowMode rgb_backlight_get_rainbow_mode(void);
/** /**
* @brief Change rainbow speed * @brief Change rainbow speed
@@ -70,7 +70,7 @@ RGBBacklightRainbowMode rgb_backlight_get_rainbow_mode();
*/ */
void rgb_backlight_set_rainbow_speed(uint8_t rainbow_speed); void rgb_backlight_set_rainbow_speed(uint8_t rainbow_speed);
uint8_t rgb_backlight_get_rainbow_speed(); uint8_t rgb_backlight_get_rainbow_speed(void);
/** /**
* @brief Change rainbow interval * @brief Change rainbow interval
@@ -79,7 +79,7 @@ uint8_t rgb_backlight_get_rainbow_speed();
*/ */
void rgb_backlight_set_rainbow_interval(uint32_t rainbow_interval); void rgb_backlight_set_rainbow_interval(uint32_t rainbow_interval);
uint32_t rgb_backlight_get_rainbow_interval(); uint32_t rgb_backlight_get_rainbow_interval(void);
/** /**
* @brief Change rainbow saturation * @brief Change rainbow saturation
@@ -88,7 +88,7 @@ uint32_t rgb_backlight_get_rainbow_interval();
*/ */
void rgb_backlight_set_rainbow_saturation(uint8_t rainbow_saturation); void rgb_backlight_set_rainbow_saturation(uint8_t rainbow_saturation);
uint8_t rgb_backlight_get_rainbow_saturation(); uint8_t rgb_backlight_get_rainbow_saturation(void);
/** /**
* @brief Reconfigure rgb backlight with new settings * @brief Reconfigure rgb backlight with new settings

View File

@@ -148,7 +148,7 @@ static const char* font_names[] = {
[FontBatteryPercent] = "BatteryPercent", [FontBatteryPercent] = "BatteryPercent",
}; };
void asset_packs_init() { void asset_packs_init(void) {
const char* pack = momentum_settings.asset_pack; const char* pack = momentum_settings.asset_pack;
if(pack[0] == '\0') return; if(pack[0] == '\0') return;
@@ -180,7 +180,7 @@ void asset_packs_init() {
furi_record_close(RECORD_STORAGE); furi_record_close(RECORD_STORAGE);
} }
void asset_packs_free() { void asset_packs_free(void) {
for(size_t i = 0; i < ICON_PATHS_COUNT; i++) { for(size_t i = 0; i < ICON_PATHS_COUNT; i++) {
if(ICON_PATHS[i].icon->original != NULL) { if(ICON_PATHS[i].icon->original != NULL) {
free_icon(ICON_PATHS[i].icon); free_icon(ICON_PATHS[i].icon);

View File

@@ -96,12 +96,12 @@ typedef struct {
CanvasFontParameters* font_params[FontTotalNumber]; CanvasFontParameters* font_params[FontTotalNumber];
} AssetPacks; } AssetPacks;
void momentum_settings_load(); void momentum_settings_load(void);
void momentum_settings_save(); void momentum_settings_save(void);
extern MomentumSettings momentum_settings; extern MomentumSettings momentum_settings;
void asset_packs_init(); void asset_packs_init(void);
void asset_packs_free(); void asset_packs_free(void);
extern AssetPacks asset_packs; extern AssetPacks asset_packs;
#ifdef __cplusplus #ifdef __cplusplus

View File

@@ -4,7 +4,7 @@
#define TAG "NameSpoof" #define TAG "NameSpoof"
void namespoof_init() { void namespoof_init(void) {
FuriString* str = furi_string_alloc(); FuriString* str = furi_string_alloc();
Storage* storage = furi_record_open(RECORD_STORAGE); Storage* storage = furi_record_open(RECORD_STORAGE);
FlipperFormat* file = flipper_format_file_alloc(storage); FlipperFormat* file = flipper_format_file_alloc(storage);

View File

@@ -4,4 +4,4 @@
#define NAMESPOOF_VERSION 1 #define NAMESPOOF_VERSION 1
#define NAMESPOOF_PATH EXT_PATH("dolphin/name.txt") #define NAMESPOOF_PATH EXT_PATH("dolphin/name.txt")
void namespoof_init(); void namespoof_init(void);

View File

@@ -114,7 +114,7 @@ static const struct {
{setting_uint(vgm_color_bg, 0x0000, 0xFFFF)}, {setting_uint(vgm_color_bg, 0x0000, 0xFFFF)},
}; };
void momentum_settings_load() { void momentum_settings_load(void) {
Storage* storage = furi_record_open(RECORD_STORAGE); Storage* storage = furi_record_open(RECORD_STORAGE);
FlipperFormat* file = flipper_format_file_alloc(storage); FlipperFormat* file = flipper_format_file_alloc(storage);
if(flipper_format_file_open_existing(file, MOMENTUM_SETTINGS_PATH)) { if(flipper_format_file_open_existing(file, MOMENTUM_SETTINGS_PATH)) {
@@ -159,7 +159,7 @@ void momentum_settings_load() {
rgb_backlight_load_settings(momentum_settings.rgb_backlight); rgb_backlight_load_settings(momentum_settings.rgb_backlight);
} }
void momentum_settings_save() { void momentum_settings_save(void) {
Storage* storage = furi_record_open(RECORD_STORAGE); Storage* storage = furi_record_open(RECORD_STORAGE);
FlipperFormat* file = flipper_format_file_alloc(storage); FlipperFormat* file = flipper_format_file_alloc(storage);

View File

@@ -25,7 +25,7 @@ const NfcDeviceBase nfc_device_emv = {
.get_base_data = (NfcDeviceGetBaseData)emv_get_base_data, .get_base_data = (NfcDeviceGetBaseData)emv_get_base_data,
}; };
EmvData* emv_alloc() { EmvData* emv_alloc(void) {
EmvData* data = malloc(sizeof(EmvData)); EmvData* data = malloc(sizeof(EmvData));
data->iso14443_4a_data = iso14443_4a_alloc(); data->iso14443_4a_data = iso14443_4a_alloc();
data->emv_application.pin_try_counter = 0xff; data->emv_application.pin_try_counter = 0xff;

View File

@@ -119,7 +119,7 @@ extern const NfcDeviceBase nfc_device_emv;
// Virtual methods // Virtual methods
EmvData* emv_alloc(); EmvData* emv_alloc(void);
void emv_free(EmvData* data); void emv_free(EmvData* data);

View File

@@ -15,7 +15,7 @@ bool subghz_custom_btn_set(uint8_t btn_id) {
} }
} }
uint8_t subghz_custom_btn_get() { uint8_t subghz_custom_btn_get(void) {
return custom_btn_id; return custom_btn_id;
} }
@@ -23,7 +23,7 @@ void subghz_custom_btn_set_original(uint8_t btn_code) {
custom_btn_original = btn_code; custom_btn_original = btn_code;
} }
uint8_t subghz_custom_btn_get_original() { uint8_t subghz_custom_btn_get_original(void) {
return custom_btn_original; return custom_btn_original;
} }
@@ -31,14 +31,14 @@ void subghz_custom_btn_set_max(uint8_t b) {
custom_btn_max_btns = b; custom_btn_max_btns = b;
} }
void subghz_custom_btns_reset() { void subghz_custom_btns_reset(void) {
custom_btn_original = 0; custom_btn_original = 0;
custom_btn_max_btns = 0; custom_btn_max_btns = 0;
controller_programming_mode = PROG_MODE_OFF; controller_programming_mode = PROG_MODE_OFF;
custom_btn_id = SUBGHZ_CUSTOM_BTN_OK; custom_btn_id = SUBGHZ_CUSTOM_BTN_OK;
} }
bool subghz_custom_btn_is_allowed() { bool subghz_custom_btn_is_allowed(void) {
return custom_btn_max_btns != 0; return custom_btn_max_btns != 0;
} }
@@ -46,6 +46,6 @@ void subghz_custom_btn_set_prog_mode(ProgMode prog_mode) {
controller_programming_mode = prog_mode; controller_programming_mode = prog_mode;
} }
ProgMode subghz_custom_btn_get_prog_mode() { ProgMode subghz_custom_btn_get_prog_mode(void) {
return controller_programming_mode; return controller_programming_mode;
} }

View File

@@ -17,13 +17,13 @@ extern "C" {
bool subghz_custom_btn_set(uint8_t btn_id); bool subghz_custom_btn_set(uint8_t btn_id);
uint8_t subghz_custom_btn_get(); uint8_t subghz_custom_btn_get(void);
uint8_t subghz_custom_btn_get_original(); uint8_t subghz_custom_btn_get_original(void);
void subghz_custom_btns_reset(); void subghz_custom_btns_reset(void);
bool subghz_custom_btn_is_allowed(); bool subghz_custom_btn_is_allowed(void);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@@ -15,4 +15,4 @@ void subghz_custom_btn_set_max(uint8_t b);
void subghz_custom_btn_set_prog_mode(ProgMode prog_mode); void subghz_custom_btn_set_prog_mode(ProgMode prog_mode);
ProgMode subghz_custom_btn_get_prog_mode(); ProgMode subghz_custom_btn_get_prog_mode(void);

View File

@@ -324,7 +324,7 @@ bool subghz_protocol_alutech_at_4n_create_data(
* Basic set | 0x11 | 0x22 | 0xFF | 0x44 | 0x33 | * Basic set | 0x11 | 0x22 | 0xFF | 0x44 | 0x33 |
* @return Button code * @return Button code
*/ */
static uint8_t subghz_protocol_alutech_at_4n_get_btn_code(); static uint8_t subghz_protocol_alutech_at_4n_get_btn_code(void);
/** /**
* Generating an upload from data. * Generating an upload from data.
@@ -702,7 +702,7 @@ SubGhzProtocolStatus subghz_protocol_decoder_alutech_at_4n_deserialize(
return ret; return ret;
} }
static uint8_t subghz_protocol_alutech_at_4n_get_btn_code() { static uint8_t subghz_protocol_alutech_at_4n_get_btn_code(void) {
uint8_t custom_btn_id = subghz_custom_btn_get(); uint8_t custom_btn_id = subghz_custom_btn_get();
uint8_t original_btn_code = subghz_custom_btn_get_original(); uint8_t original_btn_code = subghz_custom_btn_get_original();
uint8_t btn = original_btn_code; uint8_t btn = original_btn_code;

View File

@@ -79,7 +79,7 @@ static void subghz_protocol_came_atomo_remote_controller(SubGhzBlockGeneric* ins
* Basic set | 0x0 | 0x2 | 0x4 | 0x6 | * Basic set | 0x0 | 0x2 | 0x4 | 0x6 |
* @return Button code * @return Button code
*/ */
static uint8_t subghz_protocol_came_atomo_get_btn_code(); static uint8_t subghz_protocol_came_atomo_get_btn_code(void);
void* subghz_protocol_encoder_came_atomo_alloc(SubGhzEnvironment* environment) { void* subghz_protocol_encoder_came_atomo_alloc(SubGhzEnvironment* environment) {
UNUSED(environment); UNUSED(environment);
@@ -615,7 +615,7 @@ void atomo_decrypt(uint8_t* buff) {
} }
} }
static uint8_t subghz_protocol_came_atomo_get_btn_code() { static uint8_t subghz_protocol_came_atomo_get_btn_code(void) {
uint8_t custom_btn_id = subghz_custom_btn_get(); uint8_t custom_btn_id = subghz_custom_btn_get();
uint8_t original_btn_code = subghz_custom_btn_get_original(); uint8_t original_btn_code = subghz_custom_btn_get_original();
uint8_t btn = original_btn_code; uint8_t btn = original_btn_code;

View File

@@ -24,7 +24,7 @@ static uint32_t temp_counter_backup = 0;
static bool faac_prog_mode = false; static bool faac_prog_mode = false;
static bool allow_zero_seed = false; static bool allow_zero_seed = false;
void faac_slh_reset_prog_mode() { void faac_slh_reset_prog_mode(void) {
temp_fix_backup = 0; temp_fix_backup = 0;
temp_counter_backup = 0; temp_counter_backup = 0;
faac_prog_mode = false; faac_prog_mode = false;

View File

@@ -125,7 +125,7 @@ static void subghz_protocol_nice_one_get_data(uint8_t* p, uint8_t num_parcel, ui
* Basic set | 0x1 | 0x2 | 0x4 | 0x8 | * Basic set | 0x1 | 0x2 | 0x4 | 0x8 |
* @return Button code * @return Button code
*/ */
static uint8_t subghz_protocol_nice_flor_s_get_btn_code(); static uint8_t subghz_protocol_nice_flor_s_get_btn_code(void);
/** /**
* Generating an upload from data. * Generating an upload from data.
@@ -754,7 +754,7 @@ SubGhzProtocolStatus
return ret; return ret;
} }
static uint8_t subghz_protocol_nice_flor_s_get_btn_code() { static uint8_t subghz_protocol_nice_flor_s_get_btn_code(void) {
uint8_t custom_btn_id = subghz_custom_btn_get(); uint8_t custom_btn_id = subghz_custom_btn_get();
uint8_t original_btn_code = subghz_custom_btn_get_original(); uint8_t original_btn_code = subghz_custom_btn_get_original();
uint8_t btn = original_btn_code; uint8_t btn = original_btn_code;

View File

@@ -214,7 +214,7 @@ bool subghz_protocol_secplus_v1_check_fixed(uint32_t fixed);
// Reset prog mode vars // Reset prog mode vars
// TODO: Remake in proper way // TODO: Remake in proper way
void faac_slh_reset_prog_mode(); void faac_slh_reset_prog_mode(void);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@@ -381,7 +381,7 @@ static uint64_t subghz_protocol_secplus_v2_encode_half(uint8_t roll_array[], uin
* Basic set | 0x68 | 0x80 | 0x81 | 0xE2 | 0x78 * Basic set | 0x68 | 0x80 | 0x81 | 0xE2 | 0x78
* @return Button code * @return Button code
*/ */
static uint8_t subghz_protocol_secplus_v2_get_btn_code(); static uint8_t subghz_protocol_secplus_v2_get_btn_code(void);
/** /**
* Security+ 2.0 message encoding * Security+ 2.0 message encoding
@@ -835,7 +835,7 @@ SubGhzProtocolStatus
return ret; return ret;
} }
static uint8_t subghz_protocol_secplus_v2_get_btn_code() { static uint8_t subghz_protocol_secplus_v2_get_btn_code(void) {
uint8_t custom_btn_id = subghz_custom_btn_get(); uint8_t custom_btn_id = subghz_custom_btn_get();
uint8_t original_btn_code = subghz_custom_btn_get_original(); uint8_t original_btn_code = subghz_custom_btn_get_original();
uint8_t btn = original_btn_code; uint8_t btn = original_btn_code;

View File

@@ -103,7 +103,7 @@ void subghz_protocol_encoder_somfy_telis_free(void* context) {
* Basic set | 0x1 | 0x2 | 0x4 | 0x8 | * Basic set | 0x1 | 0x2 | 0x4 | 0x8 |
* @return Button code * @return Button code
*/ */
static uint8_t subghz_protocol_somfy_telis_get_btn_code(); static uint8_t subghz_protocol_somfy_telis_get_btn_code(void);
static bool subghz_protocol_somfy_telis_gen_data( static bool subghz_protocol_somfy_telis_gen_data(
SubGhzProtocolEncoderSomfyTelis* instance, SubGhzProtocolEncoderSomfyTelis* instance,
@@ -669,7 +669,7 @@ SubGhzProtocolStatus
subghz_protocol_somfy_telis_const.min_count_bit_for_found); subghz_protocol_somfy_telis_const.min_count_bit_for_found);
} }
static uint8_t subghz_protocol_somfy_telis_get_btn_code() { static uint8_t subghz_protocol_somfy_telis_get_btn_code(void) {
uint8_t custom_btn_id = subghz_custom_btn_get(); uint8_t custom_btn_id = subghz_custom_btn_get();
uint8_t original_btn_code = subghz_custom_btn_get_original(); uint8_t original_btn_code = subghz_custom_btn_get_original();
uint8_t btn = original_btn_code; uint8_t btn = original_btn_code;

View File

@@ -285,7 +285,7 @@ void furi_hal_subghz_stop_async_tx(void);
// External CC1101 Ebytes power amplifier control // External CC1101 Ebytes power amplifier control
void furi_hal_subghz_set_ext_power_amp(bool enabled); void furi_hal_subghz_set_ext_power_amp(bool enabled);
bool furi_hal_subghz_get_ext_power_amp(); bool furi_hal_subghz_get_ext_power_amp(void);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@@ -61,7 +61,7 @@ FuriHalUsbInterface* furi_hal_usb_get_config(void);
* *
* @return current USB device context * @return current USB device context
*/ */
void* furi_hal_usb_get_config_context(); void* furi_hal_usb_get_config_context(void);
/** Lock USB device mode switch /** Lock USB device mode switch
*/ */