3#include "mf_classic_poller.h"
4#include <lib/nfc/protocols/iso14443_3a/iso14443_3a_poller_i.h>
5#include <bit_lib/bit_lib.h>
6#include <nfc/helpers/crypto1.h>
12#define MF_CLASSIC_FWT_FC (60000)
15 MfClassicAuthStateIdle,
16 MfClassicAuthStatePassed,
20 MfClassicCardStateDetected,
21 MfClassicCardStateLost,
25 MfClassicPollerStateDetectType,
26 MfClassicPollerStateStart,
29 MfClassicPollerStateRequestSectorTrailer,
30 MfClassicPollerStateCheckWriteConditions,
31 MfClassicPollerStateReadBlock,
32 MfClassicPollerStateWriteBlock,
33 MfClassicPollerStateWriteValueBlock,
36 MfClassicPollerStateRequestReadSector,
37 MfClassicPollerStateReadSectorBlocks,
40 MfClassicPollerStateNextSector,
41 MfClassicPollerStateRequestKey,
42 MfClassicPollerStateReadSector,
43 MfClassicPollerStateAuthKeyA,
44 MfClassicPollerStateAuthKeyB,
45 MfClassicPollerStateKeyReuseStart,
46 MfClassicPollerStateKeyReuseAuthKeyA,
47 MfClassicPollerStateKeyReuseAuthKeyB,
48 MfClassicPollerStateKeyReuseReadSector,
49 MfClassicPollerStateSuccess,
50 MfClassicPollerStateFail,
52 MfClassicPollerStateNum,
53} MfClassicPollerState;
56 uint8_t current_sector;
58 uint16_t current_block;
60 MfClassicKeyType key_type_read;
61 MfClassicKeyType key_type_write;
62 bool need_halt_before_write;
67 uint8_t current_sector;
69 MfClassicKeyType current_key_type;
71 uint16_t current_block;
72 uint8_t reuse_key_sector;
76 uint8_t current_sector;
77 uint16_t current_block;
78 MfClassicKeyType key_type;
93 MfClassicPollerState state;
94 MfClassicAuthState auth_state;
95 MfClassicCardState card_state;
97 MfClassicType current_type_check;
98 uint8_t sectors_total;
117 MfClassicKeyType key_type;
124 MfClassicKeyType key_type;
131 MfClassicKeyType key_type;
138 MfClassicKeyType key_type;
145 MfClassicKeyType key_type;
146 MfClassicValueCommand value_cmd;
153 uint8_t current_sector;
166MfClassicError mf_classic_process_error(Iso14443_3aError error);
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_classic.h:109
Definition mf_classic.h:76
Definition mf_classic_poller_i.h:142
Definition mf_classic_poller_i.h:115
Definition mf_classic.h:135
Definition mf_classic.h:128
Definition mf_classic.h:85
Definition mf_classic.h:93
Definition mf_classic_poller_i.h:66
MfClassic poller event.
Definition mf_classic_poller.h:157
Definition mf_classic_poller_i.h:90
Definition mf_classic_poller_i.h:75
Definition mf_classic_poller_i.h:55
Definition mf_classic_poller_i.h:121
Definition mf_classic_poller_i.h:151
Definition mf_classic_poller_i.h:135
Definition mf_classic_poller_i.h:128
Generic Nfc event type.
Definition nfc_generic_event.h:58
Definition mf_classic_poller_i.h:156
MfClassic poller event data.
Definition mf_classic_poller.h:139
Definition mf_classic_poller_i.h:83
Definition mf_classic.h:119