unleashed-firmware/lib/subghz/transmitter.h
SG b9a766d909 [FL-2627] Flipper applications: SDK, build and debug system (#1387)
* Added support for running applications from SD card (FAPs - Flipper Application Packages)
* Added plugin_dist target for fbt to build FAPs
* All apps of type FlipperAppType.EXTERNAL and FlipperAppType.PLUGIN are built as FAPs by default
* Updated VSCode configuration for new fbt features - re-deploy stock configuration to use them
* Added debugging support for FAPs with fbt debug & VSCode
* Added public firmware API with automated versioning

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: SG <who.just.the.doctor@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2022-09-15 02:21:03 +09:00

55 lines
1.5 KiB
C

#pragma once
#include "types.h"
#include "environment.h"
#include "protocols/base.h"
#ifdef __cplusplus
extern "C" {
#endif
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);
#ifdef __cplusplus
}
#endif