2022-11-04 10:01:44 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <furi.h>
|
|
|
|
|
|
|
|
#include "nfc_magic_worker.h"
|
2023-05-25 20:01:02 +03:00
|
|
|
#include "lib/magic/common.h"
|
2022-11-04 10:01:44 +03:00
|
|
|
|
|
|
|
struct NfcMagicWorker {
|
|
|
|
FuriThread* thread;
|
|
|
|
|
2023-05-25 20:01:02 +03:00
|
|
|
NfcMagicDevice* magic_dev;
|
2022-11-04 10:01:44 +03:00
|
|
|
NfcDeviceData* dev_data;
|
2023-05-25 20:01:02 +03:00
|
|
|
uint32_t new_password;
|
2022-11-04 10:01:44 +03:00
|
|
|
|
|
|
|
NfcMagicWorkerCallback callback;
|
|
|
|
void* context;
|
|
|
|
|
|
|
|
NfcMagicWorkerState state;
|
|
|
|
};
|
|
|
|
|
|
|
|
int32_t nfc_magic_worker_task(void* context);
|
|
|
|
|
|
|
|
void nfc_magic_worker_check(NfcMagicWorker* nfc_magic_worker);
|
|
|
|
|
|
|
|
void nfc_magic_worker_write(NfcMagicWorker* nfc_magic_worker);
|
|
|
|
|
2023-05-25 20:01:02 +03:00
|
|
|
void nfc_magic_worker_rekey(NfcMagicWorker* nfc_magic_worker);
|
|
|
|
|
2022-11-04 10:01:44 +03:00
|
|
|
void nfc_magic_worker_wipe(NfcMagicWorker* nfc_magic_worker);
|