mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-30 16:56:41 +03:00
b9a766d909
* 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>
73 lines
1.8 KiB
C
73 lines
1.8 KiB
C
#pragma once
|
|
|
|
#include <furi_hal.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct SubGhzWorker SubGhzWorker;
|
|
|
|
typedef void (*SubGhzWorkerOverrunCallback)(void* context);
|
|
|
|
typedef void (*SubGhzWorkerPairCallback)(void* context, bool level, uint32_t duration);
|
|
|
|
void subghz_worker_rx_callback(bool level, uint32_t duration, void* context);
|
|
|
|
/**
|
|
* Allocate SubGhzWorker.
|
|
* @return SubGhzWorker* Pointer to a SubGhzWorker instance
|
|
*/
|
|
SubGhzWorker* subghz_worker_alloc();
|
|
|
|
/**
|
|
* Free SubGhzWorker.
|
|
* @param instance Pointer to a SubGhzWorker instance
|
|
*/
|
|
void subghz_worker_free(SubGhzWorker* instance);
|
|
|
|
/**
|
|
* Overrun callback SubGhzWorker.
|
|
* @param instance Pointer to a SubGhzWorker instance
|
|
* @param callback SubGhzWorkerOverrunCallback callback
|
|
*/
|
|
void subghz_worker_set_overrun_callback(
|
|
SubGhzWorker* instance,
|
|
SubGhzWorkerOverrunCallback callback);
|
|
|
|
/**
|
|
* Pair callback SubGhzWorker.
|
|
* @param instance Pointer to a SubGhzWorker instance
|
|
* @param callback SubGhzWorkerOverrunCallback callback
|
|
*/
|
|
void subghz_worker_set_pair_callback(SubGhzWorker* instance, SubGhzWorkerPairCallback callback);
|
|
|
|
/**
|
|
* Context callback SubGhzWorker.
|
|
* @param instance Pointer to a SubGhzWorker instance
|
|
* @param context
|
|
*/
|
|
void subghz_worker_set_context(SubGhzWorker* instance, void* context);
|
|
|
|
/**
|
|
* Start SubGhzWorker.
|
|
* @param instance Pointer to a SubGhzWorker instance
|
|
*/
|
|
void subghz_worker_start(SubGhzWorker* instance);
|
|
|
|
/** Stop SubGhzWorker
|
|
* @param instance Pointer to a SubGhzWorker instance
|
|
*/
|
|
void subghz_worker_stop(SubGhzWorker* instance);
|
|
|
|
/**
|
|
* Check if worker is running.
|
|
* @param instance Pointer to a SubGhzWorker instance
|
|
* @return bool - true if running
|
|
*/
|
|
bool subghz_worker_is_running(SubGhzWorker* instance);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|