mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-23 19:23:09 +00:00
99253a0e28
* SubGhz: Fix recording RAW files, sometimes could not start at a high level * SubGhz: subghz_worker, add short duration filter setting * SubGhz: capture raw timings in cli. Furi: clear pending interrupts on ISR set/reset * SubGhz: fix start duration in furi_hal_subghz_start_async_rx * [FL-3093] SubGhz: hopping issue in some regions * [FL-3087] SubGhz: fix delete-ok issue * SubGhz: remove copypasta from rx_raw cli command Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
80 lines
2.1 KiB
C
80 lines
2.1 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);
|
|
|
|
/**
|
|
* Short duration filter setting.
|
|
* glues short durations into 1. The default setting is 30 us, if set to 0 the filter will be disabled
|
|
* @param instance Pointer to a SubGhzWorker instance
|
|
* @param timeout time in us
|
|
*/
|
|
void subghz_worker_set_filter(SubGhzWorker* instance, uint16_t timeout);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|