Flipper Developer Docs
Loading...
Searching...
No Matches
st25tb_poller_i.h
1
#pragma once
2
3
#include "st25tb_poller.h"
4
5
#include <
nfc/nfc_poller.h
>
6
7
#ifdef __cplusplus
8
extern
"C"
{
9
#endif
10
11
#define ST25TB_POLLER_MAX_BUFFER_SIZE (16U)
12
13
typedef
enum
{
14
St25tbPollerStateSelect,
15
St25tbPollerStateRequestMode,
16
St25tbPollerStateRead,
17
St25tbPollerStateWrite,
18
St25tbPollerStateSuccess,
19
St25tbPollerStateFailure,
20
21
St25tbPollerStateNum,
22
} St25tbPollerState;
23
24
typedef
struct
{
25
uint8_t current_block;
26
}
St25tbPollerReadContext
;
27
28
typedef
struct
{
29
uint8_t block_number;
30
uint32_t block_data;
31
}
St25tbPollerWriteContext
;
32
33
typedef
union
{
34
St25tbPollerReadContext
read;
35
St25tbPollerWriteContext
write;
36
}
St25tbPollerContext
;
37
38
struct
St25tbPoller
{
39
Nfc
* nfc;
40
St25tbPollerState state;
41
St25tbData
* data;
42
BitBuffer
* tx_buffer;
43
BitBuffer
* rx_buffer;
44
45
St25tbPollerContext
poller_ctx;
46
47
NfcGenericEvent
general_event;
48
St25tbPollerEvent
st25tb_event;
49
St25tbPollerEventData
st25tb_event_data;
50
NfcGenericCallback
callback;
51
void
* context;
52
};
53
54
const
St25tbData
* st25tb_poller_get_data(
St25tbPoller
* instance);
55
56
#ifdef __cplusplus
57
}
58
#endif
NfcGenericCallback
NfcCommand(* NfcGenericCallback)(NfcGenericEvent event, void *context)
Generic Nfc event callback type.
Definition
nfc_generic_event.h:75
nfc_poller.h
NFC card reading library.
BitBuffer
Definition
bit_buffer.c:7
NfcGenericEvent
Generic Nfc event type.
Definition
nfc_generic_event.h:58
Nfc
Definition
nfc.c:41
St25tbData
Definition
st25tb.h:42
St25tbPollerEvent
Definition
st25tb_poller.h:50
St25tbPoller
Definition
st25tb_poller_i.h:38
St25tbPollerReadContext
Definition
st25tb_poller_i.h:24
St25tbPollerWriteContext
Definition
st25tb_poller_i.h:28
St25tbPollerContext
Definition
st25tb_poller_i.h:33
St25tbPollerEventData
Definition
st25tb_poller.h:44
lib
nfc
protocols
st25tb
st25tb_poller_i.h
Generated by
1.12.0