flipperzero-firmware/lib/subghz/subghz_worker.h
あく 421a0f6b97
[FL-1546, FL-1534, FL-1550] Drop F5, Certification preparation, Global application start lock (#585)
* Firmware: drop F5 target
* Rename app-loader to loader
* Update code owners file
* Loader: global application start lock API, minor refactoring
* Archive: update loader usage
* Cli: Command flags, global application start lock
* Apps: update cli API usage
* Bootloader: minor refactoring
* Firmware: minor build refactoring
* SubGhz: GUI packet test
* SubGhz: drop packet transmission and unused presets
* Github: drop F5 from build
* Archive: favorites
* Archive: a little bit more of Favorites
2021-07-18 21:09:00 +03:00

57 lines
1.4 KiB
C

#pragma once
#include <api-hal.h>
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*
*/
SubGhzWorker* subghz_worker_alloc();
/** Free SubGhzWorker
*
* @param instance SubGhzWorker instance
*/
void subghz_worker_free(SubGhzWorker* instance);
/** Overrun callback SubGhzWorker
*
* @param instance SubGhzWorker instance
* @param callback SubGhzWorkerOverrunCallback callback
*/
void subghz_worker_set_overrun_callback(SubGhzWorker* instance, SubGhzWorkerOverrunCallback callback);
/** Pair callback SubGhzWorker
*
* @param instance SubGhzWorker instance
* @param callback SubGhzWorkerOverrunCallback callback
*/
void subghz_worker_set_pair_callback(SubGhzWorker* instance, SubGhzWorkerPairCallback callback);
/** Context callback SubGhzWorker
*
* @param instance SubGhzWorker instance
* @param context
*/
void subghz_worker_set_context(SubGhzWorker* instance, void* context);
/** Start SubGhzWorker
*
* @param instance SubGhzWorker instance
*/
void subghz_worker_start(SubGhzWorker* instance);
/** Stop SubGhzWorker
*
* @param instance SubGhzWorker instance
*/
void subghz_worker_stop(SubGhzWorker* instance);