7#include <toolbox/protocols/protocol_dict.h>
8#include "protocols/lfrfid_protocols.h"
16 LFRFIDWorkerWriteProtocolCannotBeWritten,
17 LFRFIDWorkerWriteFobCannotBeWritten,
18 LFRFIDWorkerWriteTooLongToWrite,
19} LFRFIDWorkerWriteResult;
22 LFRFIDWorkerReadTypeAuto,
23 LFRFIDWorkerReadTypeASKOnly,
24 LFRFIDWorkerReadTypePSKOnly,
25} LFRFIDWorkerReadType;
28 LFRFIDWorkerReadSenseStart,
29 LFRFIDWorkerReadSenseEnd,
30 LFRFIDWorkerReadSenseCardStart,
31 LFRFIDWorkerReadSenseCardEnd,
32 LFRFIDWorkerReadStartASK,
33 LFRFIDWorkerReadStartPSK,
35} LFRFIDWorkerReadResult;
38 LFRFIDWorkerReadRawFileError,
39 LFRFIDWorkerReadRawOverrun,
40} LFRFIDWorkerReadRawResult;
43 LFRFIDWorkerEmulateRawFileError,
44 LFRFIDWorkerEmulateRawOverrun,
45} LFRFIDWorkerEmulateRawResult;
48 *LFRFIDWorkerReadCallback)(LFRFIDWorkerReadResult result, ProtocolId protocol,
void* context);
49typedef void (*LFRFIDWorkerWriteCallback)(LFRFIDWorkerWriteResult result,
void* context);
51typedef void (*LFRFIDWorkerReadRawCallback)(LFRFIDWorkerReadRawResult result,
void* context);
52typedef void (*LFRFIDWorkerEmulateRawCallback)(LFRFIDWorkerEmulateRawResult result,
void* context);
88 LFRFIDWorkerReadType type,
89 LFRFIDWorkerReadCallback callback,
101 LFRFIDProtocol protocol,
102 LFRFIDWorkerWriteCallback callback,
122 const char* filename,
123 LFRFIDWorkerReadType type,
124 LFRFIDWorkerReadRawCallback callback,
136 const char* filename,
137 LFRFIDWorkerEmulateRawCallback callback,
void lfrfid_worker_stop_thread(LFRFIDWorker *worker)
Stop LF-RFID worker thread.
Definition lfrfid_worker.c:134
void lfrfid_worker_read_raw_start(LFRFIDWorker *worker, const char *filename, LFRFIDWorkerReadType type, LFRFIDWorkerReadRawCallback callback, void *context)
Start raw read mode.
Definition lfrfid_worker.c:92
void lfrfid_worker_read_start(LFRFIDWorker *worker, LFRFIDWorkerReadType type, LFRFIDWorkerReadCallback callback, void *context)
Start read mode.
Definition lfrfid_worker.c:50
void lfrfid_worker_stop(LFRFIDWorker *worker)
Stop all modes.
Definition lfrfid_worker.c:122
void lfrfid_worker_emulate_raw_start(LFRFIDWorker *worker, const char *filename, LFRFIDWorkerEmulateRawCallback callback, void *context)
Emulate raw read mode.
Definition lfrfid_worker.c:108
void lfrfid_worker_free(LFRFIDWorker *worker)
Free LF-RFID worker.
Definition lfrfid_worker.c:39
void lfrfid_worker_start_thread(LFRFIDWorker *worker)
Start LF-RFID worker thread.
Definition lfrfid_worker.c:128
void lfrfid_worker_emulate_start(LFRFIDWorker *worker, LFRFIDProtocol protocol)
Start emulate mode.
Definition lfrfid_worker.c:76
void lfrfid_worker_write_start(LFRFIDWorker *worker, LFRFIDProtocol protocol, LFRFIDWorkerWriteCallback callback, void *context)
Start write mode.
Definition lfrfid_worker.c:64
LFRFIDWorker * lfrfid_worker_alloc(ProtocolDict *dict)
Allocate LF-RFID worker.
Definition lfrfid_worker.c:21
Definition lfrfid_worker_i.h:30
Definition protocol_dict.c:4