3#include "mf_ultralight_poller.h"
4#include <lib/nfc/protocols/iso14443_3a/iso14443_3a_poller_i.h>
5#include <lib/bit_lib/bit_lib.h>
11#define MF_ULTRALIGHT_POLLER_STANDARD_FWT_FC (60000)
12#define MF_ULTRALIGHT_MAX_BUFF_SIZE (64)
14#define MF_ULTRALIGHT_DEFAULT_PASSWORD (0xffffffffUL)
16#define MF_ULTRALIGHT_IS_NTAG_I2C(type) \
17 (((type) == MfUltralightTypeNTAGI2C1K) || ((type) == MfUltralightTypeNTAGI2C2K) || \
18 ((type) == MfUltralightTypeNTAGI2CPlus1K) || ((type) == MfUltralightTypeNTAGI2CPlus2K))
22 uint8_t page_to_write;
37 uint8_t tearing_flag_num;
51 MfUltralightPollerStateIdle,
52 MfUltralightPollerStateRequestMode,
53 MfUltralightPollerStateReadVersion,
54 MfUltralightPollerStateDetectMfulC,
55 MfUltralightPollerStateDetectNtag203,
56 MfUltralightPollerStateGetFeatureSet,
57 MfUltralightPollerStateReadSignature,
58 MfUltralightPollerStateReadCounters,
59 MfUltralightPollerStateReadTearingFlags,
60 MfUltralightPollerStateAuth,
61 MfUltralightPollerStateAuthMfulC,
62 MfUltralightPollerStateReadPages,
63 MfUltralightPollerStateTryDefaultPass,
64 MfUltralightPollerStateCheckMfulCAuthStatus,
65 MfUltralightPollerStateReadFailed,
66 MfUltralightPollerStateReadSuccess,
67 MfUltralightPollerStateRequestWriteData,
68 MfUltralightPollerStateWritePages,
69 MfUltralightPollerStateWriteFail,
70 MfUltralightPollerStateWriteSuccess,
72 MfUltralightPollerStateNum,
73} MfUltralightPollerState;
77 MfUltralightPollerState state;
78 MfUltralightPollerMode mode;
86 uint8_t counters_read;
87 uint8_t counters_total;
88 uint8_t tearing_flag_read;
89 uint8_t tearing_flag_total;
90 uint16_t current_page;
91 MfUltralightError error;
92 mbedtls_des3_context des_context;
101MfUltralightError mf_ultralight_process_error(Iso14443_3aError error);
109bool mf_ultralight_poller_ntag_i2c_addr_lin_to_tag(
114 uint8_t* pages_left);
116MfUltralightError mf_ultralight_poller_authentication_test(
MfUltralightPoller* instance);
NfcCommand(* NfcGenericCallback)(NfcGenericEvent event, void *context)
Generic Nfc event callback type.
Definition nfc_generic_event.h:75
Definition bit_buffer.c:7
Definition iso14443_3a_poller_i.h:42
Definition mf_ultralight.h:178
Definition mf_ultralight.h:95
Definition mf_ultralight.h:99
MfUltralight poller authentication context.
Definition mf_ultralight_poller.h:43
MfUltralight poller event structure.
Definition mf_ultralight_poller.h:66
Definition mf_ultralight_poller_i.h:75
Definition mf_ultralight_poller_i.h:30
Definition mf_ultralight_poller_i.h:25
Definition mf_ultralight_poller_i.h:35
Definition mf_ultralight_poller_i.h:20
Definition mf_ultralight.h:114
Definition mf_ultralight.h:123
Definition mf_ultralight.h:103
Generic Nfc event type.
Definition nfc_generic_event.h:58
Definition mf_ultralight.h:118
Definition mf_ultralight_poller_i.h:40
MfUltralight poller event data.
Definition mf_ultralight_poller.h:54