mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-23 21:13:16 +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>
36 lines
1 KiB
C
36 lines
1 KiB
C
#pragma once
|
|
#include <stdint.h>
|
|
#include <gui/view.h>
|
|
#include <gui/modules/widget.h>
|
|
|
|
typedef struct DetectReader DetectReader;
|
|
|
|
typedef enum {
|
|
DetectReaderStateStart,
|
|
DetectReaderStateReaderDetected,
|
|
DetectReaderStateReaderLost,
|
|
DetectReaderStateDone,
|
|
} DetectReaderState;
|
|
|
|
typedef void (*DetectReaderDoneCallback)(void* context);
|
|
|
|
DetectReader* detect_reader_alloc();
|
|
|
|
void detect_reader_free(DetectReader* detect_reader);
|
|
|
|
void detect_reader_reset(DetectReader* detect_reader);
|
|
|
|
View* detect_reader_get_view(DetectReader* detect_reader);
|
|
|
|
void detect_reader_set_callback(
|
|
DetectReader* detect_reader,
|
|
DetectReaderDoneCallback callback,
|
|
void* context);
|
|
|
|
void detect_reader_set_nonces_max(DetectReader* detect_reader, uint16_t nonces_max);
|
|
|
|
void detect_reader_set_nonces_collected(DetectReader* detect_reader, uint16_t nonces_collected);
|
|
|
|
void detect_reader_set_state(DetectReader* detect_reader, DetectReaderState state);
|
|
|
|
void detect_reader_set_uid(DetectReader* detect_reader, uint8_t* uid, uint8_t uid_len);
|