9d952ed855
* File_Worker: getting the name of a new file with an index * SubGhz: add decoder RAW protocol * SubGhz: add view Save RAW * SubGhz: refactoring subghz custom event * SubGhz: fix syntax * SubGhz: fix error build * SubGhz: test build * SubGhz: refactoring subghz, add rename, delete, start and emulate RAW signal * SubGhz: fix triangle glitch in save raw view * SubGhz: fix receiver config scene * SubGhz: fix transfer after returning from save scene * Canvas: add font rotation * SubGhz: raw protocol encoder * SubGhz: fix error completion of transfer raw encoder * SubGhz: increased the speed of reading RAW data from a flash drive, displaying the name of the saved file in the Save RAW scene * Canvas: fix font rotation * SubGhz: fix navigation save RAW scene * SubGhz: add decode came atomo * Git: renormalize * Cleanup sources and enums * Gui: add font direction to canvas reset, canvas init sequence cleanup. * SubGhz: reorder menu. * Gui: correct canvas_set_font_direction signature Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
64 lines
1.8 KiB
C
64 lines
1.8 KiB
C
#pragma once
|
|
|
|
#include "subghz_protocol_common.h"
|
|
|
|
typedef struct SubGhzProtocolRAW SubGhzProtocolRAW;
|
|
|
|
/** Allocate SubGhzProtocolRAW
|
|
*
|
|
* @return SubGhzProtocolRAW*
|
|
*/
|
|
SubGhzProtocolRAW* subghz_protocol_raw_alloc();
|
|
|
|
/** Free SubGhzProtocolRAW
|
|
*
|
|
* @param instance
|
|
*/
|
|
void subghz_protocol_raw_free(SubGhzProtocolRAW* instance);
|
|
|
|
/** Reset internal state
|
|
* @param instance - SubGhzProtocolRAW instance
|
|
*/
|
|
void subghz_protocol_raw_reset(SubGhzProtocolRAW* instance);
|
|
|
|
/** Get upload protocol
|
|
*
|
|
* @param instance - SubGhzProtocolRAW instance
|
|
* @param encoder - SubGhzProtocolCommonEncoder encoder
|
|
* @return bool
|
|
*/
|
|
bool subghz_protocol_raw_send_key(
|
|
SubGhzProtocolRAW* instance,
|
|
SubGhzProtocolCommonEncoder* encoder);
|
|
|
|
/** Parse accepted duration
|
|
*
|
|
* @param instance - SubGhzProtocolRAW instance
|
|
* @param data - LevelDuration level_duration
|
|
*/
|
|
void subghz_protocol_raw_parse(SubGhzProtocolRAW* instance, bool level, uint32_t duration);
|
|
|
|
/** Outputting information from the parser
|
|
*
|
|
* @param instance - SubGhzProtocolRAW* instance
|
|
* @param output - output string
|
|
*/
|
|
void subghz_protocol_raw_to_str(SubGhzProtocolRAW* instance, string_t output);
|
|
|
|
const char* subghz_protocol_get_last_file_name(SubGhzProtocolRAW* instance);
|
|
|
|
void subghz_protocol_set_last_file_name(SubGhzProtocolRAW* instance, const char* name);
|
|
|
|
bool subghz_protocol_save_raw_to_file_init(
|
|
SubGhzProtocolRAW* instance,
|
|
const char* dev_name,
|
|
uint32_t frequency,
|
|
FuriHalSubGhzPreset preset);
|
|
void subghz_protocol_save_raw_to_file_stop(SubGhzProtocolRAW* instance);
|
|
bool subghz_protocol_save_raw_to_file_write(SubGhzProtocolRAW* instance);
|
|
size_t subghz_save_protocol_raw_get_sample_write(SubGhzProtocolRAW* instance);
|
|
|
|
bool subghz_protocol_raw_to_load_protocol_from_file(
|
|
FileWorker* file_worker,
|
|
SubGhzProtocolRAW* instance,
|
|
const char* file_path); |