mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-15 17:18:01 +00:00
3c77ae2eb8
* Nfc: replace cmsis thread with furi, fix condition race on thread stop routine. * Nfc: fix memory leak * FuriCore, CMSIS: properly handle thread names before scheduler start
48 lines
1,004 B
C
Executable file
48 lines
1,004 B
C
Executable file
#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 {
|
|
FuriThread* thread;
|
|
|
|
NfcDeviceData* dev_data;
|
|
|
|
NfcWorkerCallback callback;
|
|
void* context;
|
|
|
|
NfcWorkerState state;
|
|
};
|
|
|
|
void nfc_worker_change_state(NfcWorker* nfc_worker, NfcWorkerState state);
|
|
|
|
int32_t 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);
|