[FL-2230] SubGhz: protocol API refactoring (#969)
* 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>
This commit is contained in:
28
lib/subghz/receiver.h
Normal file
28
lib/subghz/receiver.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include "types.h"
|
||||
#include "protocols/base.h"
|
||||
|
||||
typedef struct SubGhzReceiver SubGhzReceiver;
|
||||
|
||||
typedef void (*SubGhzReceiverCallback)(
|
||||
SubGhzReceiver* decoder,
|
||||
SubGhzProtocolDecoderBase* decoder_base,
|
||||
void* context);
|
||||
|
||||
SubGhzReceiver* subghz_receiver_alloc(SubGhzEnvironment* environment);
|
||||
|
||||
void subghz_receiver_free(SubGhzReceiver* instance);
|
||||
|
||||
void subghz_receiver_decode(SubGhzReceiver* instance, bool level, uint32_t duration);
|
||||
|
||||
void subghz_receiver_reset(SubGhzReceiver* instance);
|
||||
|
||||
void subghz_receiver_set_rx_callback(
|
||||
SubGhzReceiver* instance,
|
||||
SubGhzReceiverCallback callback,
|
||||
void* context);
|
||||
|
||||
void subghz_receiver_set_filter(SubGhzReceiver* instance, SubGhzProtocolFlag filter);
|
||||
SubGhzProtocolDecoderBase*
|
||||
subghz_receiver_search_decoder_base_by_name(SubGhzReceiver* instance, const char* decoder_name);
|
Reference in New Issue
Block a user