Loading...
Searching...
No Matches
st25tb_poller.h
1#pragma once
2
3#include "st25tb.h"
4#include <lib/nfc/nfc.h>
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10typedef struct St25tbPoller St25tbPoller;
11
12typedef enum {
13 St25tbPollerEventTypeReady,
14 St25tbPollerEventTypeRequestMode,
15 St25tbPollerEventTypeFailure,
16 St25tbPollerEventTypeSuccess,
17} St25tbPollerEventType;
18
19typedef struct {
20 St25tbType type;
22
23typedef enum {
24 St25tbPollerModeRead,
25 St25tbPollerModeWrite,
26
27 St25tbPollerModeNum,
28} St25tbPollerMode;
29
30typedef struct {
31 uint8_t block_number;
32 uint32_t block_data;
34
38
39typedef struct {
40 St25tbPollerMode mode;
43
44typedef union {
47 St25tbError error;
49
50typedef struct {
51 St25tbPollerEventType type;
54
55St25tbError st25tb_poller_send_frame(
56 St25tbPoller* instance,
57 const BitBuffer* tx_buffer,
58 BitBuffer* rx_buffer,
59 uint32_t fwt);
60
61St25tbError st25tb_poller_initiate(St25tbPoller* instance, uint8_t* chip_id_ptr);
62
63St25tbError st25tb_poller_select(St25tbPoller* instance, uint8_t* chip_id_ptr);
64
65St25tbError st25tb_poller_get_uid(St25tbPoller* instance, uint8_t* uid);
66
67St25tbError
68 st25tb_poller_read_block(St25tbPoller* instance, uint32_t* block, uint8_t block_number);
69
70St25tbError
71 st25tb_poller_write_block(St25tbPoller* instance, uint32_t block, uint8_t block_number);
72
73St25tbError st25tb_poller_halt(St25tbPoller* instance);
74
75#ifdef __cplusplus
76}
77#endif
Transport layer Nfc library.
Definition bit_buffer.c:7
Definition st25tb_poller.h:39
Definition st25tb_poller.h:30
Definition st25tb_poller.h:50
Definition st25tb_poller_i.h:38
Definition st25tb_poller.h:19
Definition st25tb_poller.h:44
Definition st25tb_poller.h:35