Welcome to mirror list, hosted at ThFree Co, Russian Federation.

nfc_worker_i.h « nfc « applications - github.com/ClusterM/flipperzero-firmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 79c642254ea546aaa2763b41d8778f817245bb1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#pragma once

#include "nfc_i.h"
#include "nfc_worker.h"

#include <furi.h>
#include <stdbool.h>

#include <rfal_analogConfig.h>
#include <rfal_rf.h>
#include <rfal_nfc.h>
#include <rfal_nfca.h>
#include <rfal_nfcb.h>
#include <rfal_nfcf.h>
#include <rfal_nfcv.h>
#include <st25r3916.h>
#include <st25r3916_irq.h>

struct NfcWorker {
    osThreadAttr_t thread_attr;
    osThreadId_t thread;

    NfcDeviceData* dev_data;

    NfcWorkerCallback callback;
    void* context;

    NfcWorkerState state;
};

void nfc_worker_change_state(NfcWorker* nfc_worker, NfcWorkerState state);

void nfc_worker_task(void* context);

void nfc_worker_read_emv_app(NfcWorker* nfc_worker);

void nfc_worker_read_emv(NfcWorker* nfc_worker);

void nfc_worker_emulate_apdu(NfcWorker* nfc_worker);

void nfc_worker_detect(NfcWorker* nfc_worker);

void nfc_worker_emulate(NfcWorker* nfc_worker);

void nfc_worker_field(NfcWorker* nfc_worker);

void nfc_worker_read_mifare_ul(NfcWorker* nfc_worker);

void nfc_worker_emulate_mifare_ul(NfcWorker* nfc_worker);