unleashed-firmware/lib/lfrfid/lfrfid_raw_worker.h
あく acc39a4bc0
Api Symbols: replace asserts with checks (#3507)
* 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>
2024-03-19 23:43:52 +09:00

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