flipperzero-firmware/applications/subghz/helpers/subghz_frequency_analyzer_worker.h
Skorpionm 4418e73b26
[FL-1912, FL-1939] Sub-GHz frequency analyzer and add new protocol (#746)
* ToolBox: add manchester-decoder and manchester-encoder
* SubGhz: add new FM config cc1101
* Subghz: add protocol Kia
* SubGhz: fix receiving the last packet Nero Radio
* SubGhz: app protocol CAME Twin (TW2EE/TW4EE)
* SubGhz: add protocol CAME Atomo (AT03EV/ AT04EV)
* F7: sync with F6
* SubGhz: add frequency analyzer
* SubGhz: remove space from file name 
* SubGhz: frequency analyzer add filter and fix view
* [FL-1939] GubGhz: Frequency analyzer redesign
* SubGhz: fix incorrect subghz api call sequence in frequency analyzer worker

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-10-10 17:35:10 +03:00

55 lines
1.6 KiB
C

#pragma once
#include <furi-hal.h>
typedef struct SubGhzFrequencyAnalyzerWorker SubGhzFrequencyAnalyzerWorker;
typedef void (
*SubGhzFrequencyAnalyzerWorkerPairCallback)(void* context, uint32_t frequency, float rssi);
typedef struct {
uint32_t frequency;
float rssi;
} FrequencyRSSI;
/** Allocate SubGhzFrequencyAnalyzerWorker
*
* @return SubGhzFrequencyAnalyzerWorker*
*/
SubGhzFrequencyAnalyzerWorker* subghz_frequency_analyzer_worker_alloc();
/** Free SubGhzFrequencyAnalyzerWorker
*
* @param instance SubGhzFrequencyAnalyzerWorker instance
*/
void subghz_frequency_analyzer_worker_free(SubGhzFrequencyAnalyzerWorker* instance);
/** Pair callback SubGhzFrequencyAnalyzerWorker
*
* @param instance SubGhzFrequencyAnalyzerWorker instance
* @param callback SubGhzFrequencyAnalyzerWorkerOverrunCallback callback
* @param context
*/
void subghz_frequency_analyzer_worker_set_pair_callback(
SubGhzFrequencyAnalyzerWorker* instance,
SubGhzFrequencyAnalyzerWorkerPairCallback callback,
void* context);
/** Start SubGhzFrequencyAnalyzerWorker
*
* @param instance SubGhzFrequencyAnalyzerWorker instance
*/
void subghz_frequency_analyzer_worker_start(SubGhzFrequencyAnalyzerWorker* instance);
/** Stop SubGhzFrequencyAnalyzerWorker
*
* @param instance SubGhzFrequencyAnalyzerWorker instance
*/
void subghz_frequency_analyzer_worker_stop(SubGhzFrequencyAnalyzerWorker* instance);
/** Check if worker is running
* @param instance SubGhzFrequencyAnalyzerWorker instance
* @return bool - true if running
*/
bool subghz_frequency_analyzer_worker_is_running(SubGhzFrequencyAnalyzerWorker* instance);