bf8fd71c00
* 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>
39 lines
929 B
C
39 lines
929 B
C
#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);
|