NFC magic cards support (#1966)
* nfc magic: introduce nfc app to work with magic cards * nfc: add nfc device functions to API * nfc magic: add bacis scenes * nfc magic: add wrong card and write confirm scenes * nfc magic: introduce magic lib * nfc magic: write magic lib * nfc magic: add write commands to magic lib * nfc magic: work on worker * furi_hal_nfc: add bits data exchage method to API * nfc magic: rework with new API * nfc magic: add check and wipe scenes * nfc magic: add icons, gui fixes * nfc: format python src Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
38
applications/plugins/nfc_magic/nfc_magic_worker.h
Normal file
38
applications/plugins/nfc_magic/nfc_magic_worker.h
Normal file
@@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
|
||||
#include <lib/nfc/nfc_device.h>
|
||||
|
||||
typedef struct NfcMagicWorker NfcMagicWorker;
|
||||
|
||||
typedef enum {
|
||||
NfcMagicWorkerStateReady,
|
||||
|
||||
NfcMagicWorkerStateCheck,
|
||||
NfcMagicWorkerStateWrite,
|
||||
NfcMagicWorkerStateWipe,
|
||||
|
||||
NfcMagicWorkerStateStop,
|
||||
} NfcMagicWorkerState;
|
||||
|
||||
typedef enum {
|
||||
NfcMagicWorkerEventSuccess,
|
||||
NfcMagicWorkerEventFail,
|
||||
NfcMagicWorkerEventCardDetected,
|
||||
NfcMagicWorkerEventNoCardDetected,
|
||||
NfcMagicWorkerEventWrongCard,
|
||||
} NfcMagicWorkerEvent;
|
||||
|
||||
typedef bool (*NfcMagicWorkerCallback)(NfcMagicWorkerEvent event, void* context);
|
||||
|
||||
NfcMagicWorker* nfc_magic_worker_alloc();
|
||||
|
||||
void nfc_magic_worker_free(NfcMagicWorker* nfc_magic_worker);
|
||||
|
||||
void nfc_magic_worker_stop(NfcMagicWorker* nfc_magic_worker);
|
||||
|
||||
void nfc_magic_worker_start(
|
||||
NfcMagicWorker* nfc_magic_worker,
|
||||
NfcMagicWorkerState state,
|
||||
NfcDeviceData* dev_data,
|
||||
NfcMagicWorkerCallback callback,
|
||||
void* context);
|
Reference in New Issue
Block a user