mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-26 14:30:25 +00:00
93a6e17ce5
* nfc: introduce nfc write * nfc: add write logic * nfc worker: add write state * nfc: add mfc update logic * nfc: add update success logic * nfc: add custom card for detect reader * nfc: update write logic * nfc: add halt command, add notifications * nfc: add write fail scene * nfc: fixes and clean up * nfc: fix navigation ad notifications * nfc: fix detect reader nfc data setter Co-authored-by: あく <alleteam@gmail.com>
43 lines
1.2 KiB
C
43 lines
1.2 KiB
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include <lib/nfc/nfc_device.h>
|
|
|
|
typedef enum {
|
|
ReaderAnalyzerModeDebugLog = 0x01,
|
|
ReaderAnalyzerModeMfkey = 0x02,
|
|
ReaderAnalyzerModeDebugPcap = 0x04,
|
|
} ReaderAnalyzerMode;
|
|
|
|
typedef enum {
|
|
ReaderAnalyzerEventMfkeyCollected,
|
|
} ReaderAnalyzerEvent;
|
|
|
|
typedef struct ReaderAnalyzer ReaderAnalyzer;
|
|
|
|
typedef void (*ReaderAnalyzerParseDataCallback)(ReaderAnalyzerEvent event, void* context);
|
|
|
|
ReaderAnalyzer* reader_analyzer_alloc();
|
|
|
|
void reader_analyzer_free(ReaderAnalyzer* instance);
|
|
|
|
void reader_analyzer_set_callback(
|
|
ReaderAnalyzer* instance,
|
|
ReaderAnalyzerParseDataCallback callback,
|
|
void* context);
|
|
|
|
void reader_analyzer_start(ReaderAnalyzer* instance, ReaderAnalyzerMode mode);
|
|
|
|
void reader_analyzer_stop(ReaderAnalyzer* instance);
|
|
|
|
NfcProtocol
|
|
reader_analyzer_guess_protocol(ReaderAnalyzer* instance, uint8_t* buff_rx, uint16_t len);
|
|
|
|
FuriHalNfcDevData* reader_analyzer_get_nfc_data(ReaderAnalyzer* instance);
|
|
|
|
void reader_analyzer_set_nfc_data(ReaderAnalyzer* instance, FuriHalNfcDevData* nfc_data);
|
|
|
|
void reader_analyzer_prepare_tx_rx(
|
|
ReaderAnalyzer* instance,
|
|
FuriHalNfcTxRxContext* tx_rx,
|
|
bool is_picc);
|