8#include <lib/toolbox/level_duration.h>
10#include "environment.h"
14#define SUBGHZ_APP_FOLDER EXT_PATH("subghz")
15#define SUBGHZ_RAW_FOLDER EXT_PATH("subghz")
16#define SUBGHZ_APP_FILENAME_PREFIX "SubGHz"
17#define SUBGHZ_APP_FILENAME_EXTENSION ".sub"
19#define SUBGHZ_KEY_FILE_VERSION 1
20#define SUBGHZ_KEY_FILE_TYPE "Flipper SubGhz Key File"
22#define SUBGHZ_RAW_FILE_VERSION 1
23#define SUBGHZ_RAW_FILE_TYPE "Flipper SubGhz RAW File"
25#define SUBGHZ_KEYSTORE_DIR_NAME EXT_PATH("subghz/assets/keeloq_mfcodes")
26#define SUBGHZ_KEYSTORE_DIR_USER_NAME EXT_PATH("subghz/assets/keeloq_mfcodes_user")
27#define SUBGHZ_CAME_ATOMO_DIR_NAME EXT_PATH("subghz/assets/came_atomo")
28#define SUBGHZ_NICE_FLOR_S_DIR_NAME EXT_PATH("subghz/assets/nice_flor_s")
29#define SUBGHZ_ALUTECH_AT_4N_DIR_NAME EXT_PATH("subghz/assets/alutech_at_4n")
43 SubGhzProtocolStatusOk = 0,
45 SubGhzProtocolStatusError = (-1),
47 SubGhzProtocolStatusErrorParserHeader = (-2),
48 SubGhzProtocolStatusErrorParserFrequency = (-3),
49 SubGhzProtocolStatusErrorParserPreset = (-4),
50 SubGhzProtocolStatusErrorParserCustomPreset = (-5),
51 SubGhzProtocolStatusErrorParserProtocolName = (-6),
52 SubGhzProtocolStatusErrorParserBitCount = (-7),
53 SubGhzProtocolStatusErrorParserKey = (-8),
54 SubGhzProtocolStatusErrorParserTe = (-9),
55 SubGhzProtocolStatusErrorParserOthers = (-10),
57 SubGhzProtocolStatusErrorValueBitCount = (-11),
59 SubGhzProtocolStatusErrorEncoderGetUpload = (-12),
61 SubGhzProtocolStatusErrorProtocolNotFound = (-13),
62 SubGhzProtocolStatusReserved = 0x7FFFFFFF,
63} SubGhzProtocolStatus;
67typedef void (*SubGhzFree)(
void* context);
70typedef SubGhzProtocolStatus (
72typedef SubGhzProtocolStatus (*SubGhzDeserialize)(
void* context,
FlipperFormat* flipper_format);
75typedef void (*SubGhzDecoderFeed)(
void* decoder,
bool level, uint32_t duration);
76typedef void (*SubGhzDecoderReset)(
void* decoder);
77typedef uint8_t (*SubGhzGetHashData)(
void* decoder);
78typedef void (*SubGhzGetString)(
void* decoder,
FuriString* output);
81typedef void (*SubGhzEncoderStop)(
void* encoder);
88 SubGhzDecoderFeed feed;
89 SubGhzDecoderReset reset;
91 SubGhzGetHashData get_hash_data;
92 SubGhzGetString get_string;
93 SubGhzSerialize serialize;
94 SubGhzDeserialize deserialize;
101 SubGhzDeserialize deserialize;
102 SubGhzEncoderStop stop;
103 SubGhzEncoderYield yield;
107 SubGhzProtocolTypeUnknown = 0,
108 SubGhzProtocolTypeStatic,
109 SubGhzProtocolTypeDynamic,
110 SubGhzProtocolTypeRAW,
111 SubGhzProtocolWeatherStation,
112 SubGhzProtocolCustom,
116 SubGhzProtocolFlag_RAW = (1 << 0),
117 SubGhzProtocolFlag_Decodable = (1 << 1),
118 SubGhzProtocolFlag_315 = (1 << 2),
119 SubGhzProtocolFlag_433 = (1 << 3),
120 SubGhzProtocolFlag_868 = (1 << 4),
121 SubGhzProtocolFlag_AM = (1 << 5),
122 SubGhzProtocolFlag_FM = (1 << 6),
123 SubGhzProtocolFlag_Save = (1 << 7),
124 SubGhzProtocolFlag_Load = (1 << 8),
125 SubGhzProtocolFlag_Send = (1 << 9),
126 SubGhzProtocolFlag_BinRAW = (1 << 10),
131 SubGhzProtocolType type;
132 SubGhzProtocolFlag flag;
Definition level_duration.h:15
Definition environment.c:4