[FL-2230] SubGhz: protocol API refactoring (#969)

* SubGhz: protocols library refactoring
* SubGhz: new architecture and refactoring
* SubGhz: simplify protocol structure, remove unused types
* SubGhz: rename Subghz to SubGhz
* SubGhz: add environment concept

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
Co-authored-by: DrZlo13 <who.just.the.doctor@gmail.com>
This commit is contained in:
Skorpionm
2022-03-03 13:48:56 +04:00
committed by GitHub
parent 052237f8c9
commit 3164184bbc
173 changed files with 9836 additions and 8486 deletions

View File

@@ -3,48 +3,48 @@
#include <gui/view.h>
#include "../helpers/subghz_custom_event.h"
typedef struct SubghzReadRAW SubghzReadRAW;
typedef struct SubGhzReadRAW SubGhzReadRAW;
typedef void (*SubghzReadRAWCallback)(SubghzCustomEvent event, void* context);
typedef void (*SubGhzReadRAWCallback)(SubGhzCustomEvent event, void* context);
typedef enum {
SubghzReadRAWStatusStart,
SubghzReadRAWStatusIDLE,
SubghzReadRAWStatusREC,
SubghzReadRAWStatusTX,
SubghzReadRAWStatusTXRepeat,
SubGhzReadRAWStatusStart,
SubGhzReadRAWStatusIDLE,
SubGhzReadRAWStatusREC,
SubGhzReadRAWStatusTX,
SubGhzReadRAWStatusTXRepeat,
SubghzReadRAWStatusLoadKeyIDLE,
SubghzReadRAWStatusLoadKeyTX,
SubghzReadRAWStatusLoadKeyTXRepeat,
SubghzReadRAWStatusSaveKey,
} SubghzReadRAWStatus;
SubGhzReadRAWStatusLoadKeyIDLE,
SubGhzReadRAWStatusLoadKeyTX,
SubGhzReadRAWStatusLoadKeyTXRepeat,
SubGhzReadRAWStatusSaveKey,
} SubGhzReadRAWStatus;
void subghz_read_raw_set_callback(
SubghzReadRAW* subghz_read_raw,
SubghzReadRAWCallback callback,
SubGhzReadRAW* subghz_read_raw,
SubGhzReadRAWCallback callback,
void* context);
SubghzReadRAW* subghz_read_raw_alloc();
SubGhzReadRAW* subghz_read_raw_alloc();
void subghz_read_raw_free(SubghzReadRAW* subghz_static);
void subghz_read_raw_free(SubGhzReadRAW* subghz_static);
void subghz_read_raw_add_data_statusbar(
SubghzReadRAW* instance,
SubGhzReadRAW* instance,
const char* frequency_str,
const char* preset_str);
void subghz_read_raw_update_sample_write(SubghzReadRAW* instance, size_t sample);
void subghz_read_raw_update_sample_write(SubGhzReadRAW* instance, size_t sample);
void subghz_read_raw_stop_send(SubghzReadRAW* instance);
void subghz_read_raw_stop_send(SubGhzReadRAW* instance);
void subghz_read_raw_update_sin(SubghzReadRAW* instance);
void subghz_read_raw_update_sin(SubGhzReadRAW* instance);
void subghz_read_raw_add_data_rssi(SubghzReadRAW* instance, float rssi);
void subghz_read_raw_add_data_rssi(SubGhzReadRAW* instance, float rssi);
void subghz_read_raw_set_status(
SubghzReadRAW* instance,
SubghzReadRAWStatus satus,
SubGhzReadRAW* instance,
SubGhzReadRAWStatus satus,
const char* file_name);
View* subghz_read_raw_get_view(SubghzReadRAW* subghz_static);
View* subghz_read_raw_get_view(SubGhzReadRAW* subghz_static);