[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:
@@ -1,7 +1,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <lib/subghz/protocols/subghz_protocol_common.h>
|
||||
#include <math.h>
|
||||
#include <furi.h>
|
||||
#include <furi_hal.h>
|
||||
#include <lib/flipper_format/flipper_format.h>
|
||||
|
||||
typedef struct SubGhzHistory SubGhzHistory;
|
||||
|
||||
@@ -23,19 +26,6 @@ void subghz_history_free(SubGhzHistory* instance);
|
||||
*/
|
||||
void subghz_history_reset(SubGhzHistory* instance);
|
||||
|
||||
/** Set frequency and preset to history[idx]
|
||||
*
|
||||
* @param instance - SubGhzHistory instance
|
||||
* @param idx - record index
|
||||
* @param frequency - frequency Hz
|
||||
* @param preset - FuriHalSubGhzPreset preset
|
||||
*/
|
||||
void subghz_history_set_frequency_preset(
|
||||
SubGhzHistory* instance,
|
||||
uint16_t idx,
|
||||
uint32_t frequency,
|
||||
FuriHalSubGhzPreset preset);
|
||||
|
||||
/** Get frequency to history[idx]
|
||||
*
|
||||
* @param instance - SubGhzHistory instance
|
||||
@@ -73,7 +63,7 @@ uint8_t subghz_history_get_type_protocol(SubGhzHistory* instance, uint16_t idx);
|
||||
* @param idx - record index
|
||||
* @return name - const char* name protocol
|
||||
*/
|
||||
const char* subghz_history_get_name(SubGhzHistory* instance, uint16_t idx);
|
||||
const char* subghz_history_get_protocol_name(SubGhzHistory* instance, uint16_t idx);
|
||||
|
||||
/** Get string item menu to history[idx]
|
||||
*
|
||||
@@ -111,4 +101,4 @@ bool subghz_history_add_to_history(
|
||||
* @param idx - record index
|
||||
* @return SubGhzProtocolCommonLoad*
|
||||
*/
|
||||
SubGhzProtocolCommonLoad* subghz_history_get_raw_data(SubGhzHistory* instance, uint16_t idx);
|
||||
FlipperFormat* subghz_history_get_raw_data(SubGhzHistory* instance, uint16_t idx);
|
||||
|
Reference in New Issue
Block a user