mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-30 16:29:12 +00:00
3164184bbc
* 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>
30 lines
742 B
C
30 lines
742 B
C
#pragma once
|
|
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
#include <stddef.h>
|
|
|
|
#include <lib/flipper_format/flipper_format.h>
|
|
#include "furi.h"
|
|
#include "furi_hal.h"
|
|
|
|
typedef struct SubGhzBlockGeneric SubGhzBlockGeneric;
|
|
|
|
struct SubGhzBlockGeneric {
|
|
const char* protocol_name;
|
|
uint64_t data;
|
|
uint32_t serial;
|
|
uint8_t data_count_bit;
|
|
uint8_t btn;
|
|
uint16_t cnt;
|
|
};
|
|
|
|
bool subghz_block_generic_get_preset_name(FuriHalSubGhzPreset preset, string_t preset_str);
|
|
|
|
bool subghz_block_generic_serialize(
|
|
SubGhzBlockGeneric* instance,
|
|
FlipperFormat* flipper_format,
|
|
uint32_t frequency,
|
|
FuriHalSubGhzPreset preset);
|
|
|
|
bool subghz_block_generic_deserialize(SubGhzBlockGeneric* instance, FlipperFormat* flipper_format);
|