mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-11-28 19:36:36 +03:00
5741ed2bd5
* nfc: add expiration date tag to emv parser * nfc: add expiration date save and display * nfc: add long apdu test command
41 lines
898 B
C
Executable File
41 lines
898 B
C
Executable File
#pragma once
|
|
|
|
#include "nfc_device.h"
|
|
|
|
typedef struct NfcWorker NfcWorker;
|
|
|
|
typedef enum {
|
|
// Init states
|
|
NfcWorkerStateNone,
|
|
NfcWorkerStateBroken,
|
|
NfcWorkerStateReady,
|
|
// Main worker states
|
|
NfcWorkerStateDetect,
|
|
NfcWorkerStateEmulate,
|
|
NfcWorkerStateReadEMVApp,
|
|
NfcWorkerStateReadEMV,
|
|
NfcWorkerStateEmulateApdu,
|
|
NfcWorkerStateField,
|
|
NfcWorkerStateReadMifareUl,
|
|
NfcWorkerStateEmulateMifareUl,
|
|
// Transition
|
|
NfcWorkerStateStop,
|
|
} NfcWorkerState;
|
|
|
|
typedef void (*NfcWorkerCallback)(void* context);
|
|
|
|
NfcWorker* nfc_worker_alloc();
|
|
|
|
NfcWorkerState nfc_worker_get_state(NfcWorker* nfc_worker);
|
|
|
|
void nfc_worker_free(NfcWorker* nfc_worker);
|
|
|
|
void nfc_worker_start(
|
|
NfcWorker* nfc_worker,
|
|
NfcWorkerState state,
|
|
NfcDeviceData* dev_data,
|
|
NfcWorkerCallback callback,
|
|
void* context);
|
|
|
|
void nfc_worker_stop(NfcWorker* nfc_worker);
|