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
8extern "C" {
9#endif
10
11#define ST25TB_POLLER_MAX_BUFFER_SIZE (16U)
12
13typedef enum {
14 St25tbPollerStateSelect,
15 St25tbPollerStateRequestMode,
16 St25tbPollerStateRead,
17 St25tbPollerStateWrite,
18 St25tbPollerStateSuccess,
19 St25tbPollerStateFailure,
20
21 St25tbPollerStateNum,
22} St25tbPollerState;
23
24typedef struct {
25 uint8_t current_block;
27
28typedef struct {
29 uint8_t block_number;
30 uint32_t block_data;
32
37
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
54const St25tbData* st25tb_poller_get_data(St25tbPoller* instance);
55
56#ifdef __cplusplus
57}
58#endif
NfcCommand(* NfcGenericCallback)(NfcGenericEvent event, void *context)
Generic Nfc event callback type.
Definition nfc_generic_event.h:75
NFC card reading library.
Definition bit_buffer.c:7
Generic Nfc event type.
Definition nfc_generic_event.h:58
Definition nfc.c:41
Definition st25tb.h:42
Definition st25tb_poller.h:50
Definition st25tb_poller_i.h:38
Definition st25tb_poller_i.h:24
Definition st25tb_poller_i.h:28
Definition st25tb_poller_i.h:33
Definition st25tb_poller.h:44