Loading...
Searching...
No Matches
lib/subghz/protocols/base.h
1#pragma once
2
3#include "../types.h"
4
5#ifdef __cplusplus
6extern "C" {
7#endif
8
10
11typedef void (
12 *SubGhzProtocolDecoderBaseRxCallback)(SubGhzProtocolDecoderBase* instance, void* context);
13
14typedef void (*SubGhzProtocolDecoderBaseSerialize)(
15 SubGhzProtocolDecoderBase* decoder_base,
16 FuriString* output);
17
19 // Decoder general section
20 const SubGhzProtocol* protocol;
21
22 // Callback section
23 SubGhzProtocolDecoderBaseRxCallback callback;
24 void* context;
25};
26
33void subghz_protocol_decoder_base_set_decoder_callback(
34 SubGhzProtocolDecoderBase* decoder_base,
35 SubGhzProtocolDecoderBaseRxCallback callback,
36 void* context);
37
43bool subghz_protocol_decoder_base_get_string(
44 SubGhzProtocolDecoderBase* decoder_base,
45 FuriString* output);
46
54SubGhzProtocolStatus subghz_protocol_decoder_base_serialize(
55 SubGhzProtocolDecoderBase* decoder_base,
56 FlipperFormat* flipper_format,
57 SubGhzRadioPreset* preset);
58
65SubGhzProtocolStatus subghz_protocol_decoder_base_deserialize(
66 SubGhzProtocolDecoderBase* decoder_base,
67 FlipperFormat* flipper_format);
68
74uint8_t subghz_protocol_decoder_base_get_hash_data(SubGhzProtocolDecoderBase* decoder_base);
75
76// Encoder Base
78
80 // Decoder general section
81 const SubGhzProtocol* protocol;
82
83 // Callback section
84};
85
86#ifdef __cplusplus
87}
88#endif
Definition flipper_format.c:12
Definition string.c:4
Definition lib/subghz/protocols/base.h:18
Definition lib/subghz/protocols/base.h:79
Definition types.h:129
Definition types.h:35