2022-09-03 15:25:36 +03:00
|
|
|
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <gui/view.h>
|
|
|
|
#include <gui/modules/widget.h>
|
|
|
|
|
|
|
|
typedef struct DetectReader DetectReader;
|
|
|
|
|
2022-10-06 19:58:17 +03:00
|
|
|
typedef enum {
|
|
|
|
DetectReaderStateStart,
|
|
|
|
DetectReaderStateReaderDetected,
|
|
|
|
DetectReaderStateReaderLost,
|
|
|
|
DetectReaderStateDone,
|
|
|
|
} DetectReaderState;
|
|
|
|
|
2022-09-03 15:25:36 +03:00
|
|
|
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);
|
|
|
|
|
2022-10-06 19:58:17 +03:00
|
|
|
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);
|
2022-10-28 19:10:16 +03:00
|
|
|
|
|
|
|
void detect_reader_set_uid(DetectReader* detect_reader, uint8_t* uid, uint8_t uid_len);
|