unleashed-firmware/lib/subghz/subghz_parser.h
Skorpionm 8fd411097e
[FL-1758, FL-1790] SubGhz refactoring part 2, fix generation of a new GateTX serial (#696)
* WidGet: fix name  Multiline String Element
* SubGhz: rename  SubGhzProtocol to SubGhzParser and bring it up
* SubGhz: a new way to navigate in receiver views
* SubGhz: fix syntax
* WedGet: add forwarding input type to wedget button callback, fix using a callback in an application
* SubGhz: add assertions and status checks
* SubGhz: fix syntax
* [FL-1790] SubGhz: fix GateTX
* SubGhz:  add 434.42 MHz frequency support
* SubGhz: rename type protocol, add decoder stage names
* SubGhz: fix navigation through received signals when changing scenes
* SubGhz: fix 2-fsk config

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-09-15 18:24:19 +03:00

73 lines
2.0 KiB
C

#pragma once
#include "protocols/subghz_protocol_common.h"
typedef void (*SubGhzProtocolTextCallback)(string_t text, void* context);
typedef void (*SubGhzProtocolCommonCallbackDump)(SubGhzProtocolCommon *parser, void* context);
typedef struct SubGhzParser SubGhzParser;
/** Allocate SubGhzParser
*
* @return SubGhzParser*
*/
SubGhzParser* subghz_parser_alloc();
/** Free SubGhzParser
*
* @param instance
*/
void subghz_parser_free(SubGhzParser* instance);
/** Get protocol by name
*
* @param instance - SubGhzParser instance
* @param name - name protocol
* @param SubGhzProtocolCommon
*/
SubGhzProtocolCommon* subghz_parser_get_by_name(SubGhzParser* instance, const char* name);
/** Outputting data text from all parsers
*
* @param instance - SubGhzParser instance
* @param callback - SubGhzProtocolTextCallback callback
* @param context
*/
void subghz_parser_enable_dump_text(SubGhzParser* instance, SubGhzProtocolTextCallback callback, void* context);
/** Outputting data SubGhzParser from all parsers
*
* @param instance - SubGhzParser instance
* @param callback - SubGhzProtocolTextCallback callback
* @param context
*/
void subghz_parser_enable_dump(SubGhzParser* instance, SubGhzProtocolCommonCallbackDump callback, void* context);
/** File name rainbow table Nice Flor-S
*
* @param instance - SubGhzParser instance
* @param file_name - "path/file_name"
*/
void subghz_parser_load_nice_flor_s_file(SubGhzParser* instance, const char* file_name);
/** File upload manufacture keys
*
* @param instance - SubGhzParser instance
* @param file_name - "path/file_name"
*/
void subghz_parser_load_keeloq_file(SubGhzParser* instance, const char* file_name);
/** Restarting all parsers
*
* @param instance - SubGhzParser instance
*/
void subghz_parser_reset(SubGhzParser* instance);
/** Loading data into all parsers
*
* @param instance - SubGhzParser instance
* @param level - true is high, false if low
* @param duration - level duration in microseconds
*/
void subghz_parser_parse(SubGhzParser* instance, bool level, uint32_t duration);