unleashed-firmware/lib/lfrfid/lfrfid_raw_worker.h
hedger ffa3996a5e
[FL-3867] Code formatting update (#3765)
* clang-format: AllowShortEnumsOnASingleLine: false
* clang-format: InsertNewlineAtEOF: true
* clang-format: Standard:        c++20
* clang-format: AlignConsecutiveBitFields
* clang-format: AlignConsecutiveMacros
* clang-format: RemoveParentheses: ReturnStatement
* clang-format: RemoveSemicolon: true
* Restored RemoveParentheses: Leave, retained general changes for it
* formatting: fixed logging TAGs
* Formatting update for dev

Co-authored-by: あく <alleteam@gmail.com>
2024-07-15 13:38:49 +09:00

69 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