2022-04-14 17:05:40 +03:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <math.h>
|
|
|
|
#include <furi.h>
|
|
|
|
#include <furi_hal.h>
|
2022-07-26 17:16:59 +03:00
|
|
|
#include <lib/flipper_format/flipper_format.h>
|
|
|
|
|
2022-10-18 19:51:44 +03:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2022-07-26 17:16:59 +03:00
|
|
|
#define SUBGHZ_SETTING_DEFAULT_PRESET_COUNT 4
|
2022-04-14 17:05:40 +03:00
|
|
|
|
|
|
|
typedef struct SubGhzSetting SubGhzSetting;
|
|
|
|
|
|
|
|
SubGhzSetting* subghz_setting_alloc(void);
|
2022-04-15 19:31:25 +03:00
|
|
|
|
2022-04-14 17:05:40 +03:00
|
|
|
void subghz_setting_free(SubGhzSetting* instance);
|
2022-04-15 19:31:25 +03:00
|
|
|
|
2022-12-11 00:42:26 +03:00
|
|
|
void subghz_setting_load(SubGhzSetting* instance, const char* file_path);
|
2022-04-15 19:31:25 +03:00
|
|
|
|
2022-04-14 17:05:40 +03:00
|
|
|
size_t subghz_setting_get_frequency_count(SubGhzSetting* instance);
|
2022-04-15 19:31:25 +03:00
|
|
|
|
2022-04-14 17:05:40 +03:00
|
|
|
size_t subghz_setting_get_hopper_frequency_count(SubGhzSetting* instance);
|
2022-04-15 19:31:25 +03:00
|
|
|
|
2022-07-26 17:16:59 +03:00
|
|
|
size_t subghz_setting_get_preset_count(SubGhzSetting* instance);
|
|
|
|
|
|
|
|
const char* subghz_setting_get_preset_name(SubGhzSetting* instance, size_t idx);
|
|
|
|
|
|
|
|
int subghz_setting_get_inx_preset_by_name(SubGhzSetting* instance, const char* preset_name);
|
|
|
|
|
|
|
|
uint8_t* subghz_setting_get_preset_data(SubGhzSetting* instance, size_t idx);
|
|
|
|
|
|
|
|
size_t subghz_setting_get_preset_data_size(SubGhzSetting* instance, size_t idx);
|
|
|
|
|
|
|
|
uint8_t* subghz_setting_get_preset_data_by_name(SubGhzSetting* instance, const char* preset_name);
|
|
|
|
|
|
|
|
bool subghz_setting_load_custom_preset(
|
|
|
|
SubGhzSetting* instance,
|
|
|
|
const char* preset_name,
|
|
|
|
FlipperFormat* fff_data_file);
|
|
|
|
|
|
|
|
bool subghz_setting_delete_custom_preset(SubGhzSetting* instance, const char* preset_name);
|
|
|
|
|
2022-04-14 17:05:40 +03:00
|
|
|
uint32_t subghz_setting_get_frequency(SubGhzSetting* instance, size_t idx);
|
2022-04-15 19:31:25 +03:00
|
|
|
|
2022-04-14 17:05:40 +03:00
|
|
|
uint32_t subghz_setting_get_hopper_frequency(SubGhzSetting* instance, size_t idx);
|
2022-04-15 19:31:25 +03:00
|
|
|
|
2022-04-14 17:05:40 +03:00
|
|
|
uint32_t subghz_setting_get_frequency_default_index(SubGhzSetting* instance);
|
2022-04-15 19:31:25 +03:00
|
|
|
|
|
|
|
uint32_t subghz_setting_get_default_frequency(SubGhzSetting* instance);
|
2022-09-28 01:01:09 +03:00
|
|
|
|
|
|
|
void subghz_setting_set_default_frequency(SubGhzSetting* instance, uint32_t frequency_to_setup);
|
2022-10-18 19:51:44 +03:00
|
|
|
|
2023-06-13 22:17:54 +03:00
|
|
|
uint8_t subghz_setting_customs_presets_to_log(SubGhzSetting* instance);
|
|
|
|
|
2022-10-18 19:51:44 +03:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|