mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-22 10:43:11 +00:00
5741ed2bd5
* nfc: add expiration date tag to emv parser * nfc: add expiration date save and display * nfc: add long apdu test command
40 lines
898 B
C
Executable file
40 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);
|