flipperzero-firmware/lib/subghz/receiver.h
Skorpionm 3164184bbc
[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>
2022-03-03 12:48:56 +03:00

29 lines
852 B
C

#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);