mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-26 23:05:05 +03:00
acc39a4bc0
* Api Symbols: replace asserts with checks * Api Symbols: replace asserts with checks part 2 * Update no args function signatures with void, to help compiler to track incorrect usage * More unavoidable void * Update PVS config and code to make it happy * Format sources * nfc: fix checks * dead code cleanup & include fixes Co-authored-by: gornekich <n.gorbadey@gmail.com> Co-authored-by: hedger <hedger@users.noreply.github.com> Co-authored-by: hedger <hedger@nanode.su>
68 lines
1.5 KiB
C
68 lines
1.5 KiB
C
#pragma once
|
|
#include <furi.h>
|
|
#include "lfrfid_worker.h"
|
|
#include <toolbox/protocols/protocol_dict.h>
|
|
#include "protocols/lfrfid_protocols.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct LFRFIDRawWorker LFRFIDRawWorker;
|
|
|
|
/**
|
|
* @brief Allocate a new LFRFIDRawWorker instance
|
|
*
|
|
* @return LFRFIDRawWorker*
|
|
*/
|
|
LFRFIDRawWorker* lfrfid_raw_worker_alloc(void);
|
|
|
|
/**
|
|
* @brief Free a LFRFIDRawWorker instance
|
|
*
|
|
* @param worker LFRFIDRawWorker instance
|
|
*/
|
|
void lfrfid_raw_worker_free(LFRFIDRawWorker* worker);
|
|
|
|
/**
|
|
* @brief Start reading
|
|
*
|
|
* @param worker LFRFIDRawWorker instance
|
|
* @param file_path path where file will be saved
|
|
* @param frequency HW frequency
|
|
* @param duty_cycle HW duty cycle
|
|
* @param callback callback for read event
|
|
* @param context context for callback
|
|
*/
|
|
void lfrfid_raw_worker_start_read(
|
|
LFRFIDRawWorker* worker,
|
|
const char* file_path,
|
|
float frequency,
|
|
float duty_cycle,
|
|
LFRFIDWorkerReadRawCallback callback,
|
|
void* context);
|
|
|
|
/**
|
|
* @brief Start emulate
|
|
*
|
|
* @param worker LFRFIDRawWorker instance
|
|
* @param file_path path to file that will be emulated
|
|
* @param callback callback for emulate event
|
|
* @param context context for callback
|
|
*/
|
|
void lfrfid_raw_worker_start_emulate(
|
|
LFRFIDRawWorker* worker,
|
|
const char* file_path,
|
|
LFRFIDWorkerEmulateRawCallback callback,
|
|
void* context);
|
|
|
|
/**
|
|
* @brief Stop worker
|
|
*
|
|
* @param worker
|
|
*/
|
|
void lfrfid_raw_worker_stop(LFRFIDRawWorker* worker);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif |