mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-23 13:03:13 +00:00
f04d0eea96
* SubGhz: add protocol MegaCode * SubGhz: check for guard time injection at the end of buffer * SubGhz: rollback samples counting in trasmitter * SubGhz: fix subghz_file_encoder_worker incorrect pulse sequence * Input: tune debounce interval * SubGhz: fix spelling in subghz_file_encoder_worker_add_level_duration Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
47 lines
1.4 KiB
C
47 lines
1.4 KiB
C
#pragma once
|
|
|
|
#include "types.h"
|
|
#include "environment.h"
|
|
#include "protocols/base.h"
|
|
|
|
typedef struct SubGhzTransmitter SubGhzTransmitter;
|
|
|
|
/**
|
|
* Allocate and init SubGhzTransmitter.
|
|
* @param environment Pointer to a SubGhzEnvironment instance
|
|
* @return SubGhzTransmitter* pointer to a SubGhzTransmitter instance
|
|
*/
|
|
SubGhzTransmitter*
|
|
subghz_transmitter_alloc_init(SubGhzEnvironment* environment, const char* protocol_name);
|
|
|
|
/**
|
|
* Free SubGhzTransmitter.
|
|
* @param instance Pointer to a SubGhzTransmitter instance
|
|
*/
|
|
void subghz_transmitter_free(SubGhzTransmitter* instance);
|
|
|
|
/** Get protocol instance.
|
|
* @param instance Pointer to a SubGhzTransmitter instance
|
|
*/
|
|
SubGhzProtocolEncoderBase* subghz_transmitter_get_protocol_instance(SubGhzTransmitter* instance);
|
|
|
|
/**
|
|
* Forced transmission stop.
|
|
* @param instance Pointer to a SubGhzTransmitter instance
|
|
*/
|
|
bool subghz_transmitter_stop(SubGhzTransmitter* instance);
|
|
|
|
/**
|
|
* Deserialize and generating an upload to send.
|
|
* @param instance Pointer to a SubGhzTransmitter instance
|
|
* @param flipper_format Pointer to a FlipperFormat instance
|
|
* @return true On success
|
|
*/
|
|
bool subghz_transmitter_deserialize(SubGhzTransmitter* instance, FlipperFormat* flipper_format);
|
|
|
|
/**
|
|
* Getting the level and duration of the upload to be loaded into DMA.
|
|
* @param context Pointer to a SubGhzTransmitter instance
|
|
* @return LevelDuration
|
|
*/
|
|
LevelDuration subghz_transmitter_yield(void* context);
|