7#ifndef NFC_T4T_ISODEP_H_
8#define NFC_T4T_ISODEP_H_
26#define NFC_T4T_ISODEP_SYNTAX_ERROR 1
29#define NFC_T4T_ISODEP_SEMANTIC_ERROR 2
32#define NFC_T4T_ISODEP_TRANSMISSION_ERROR 3
35#define NFC_T4T_ISODEP_TIMEOUT_ERROR 4
42#define NFC_T4T_ISODEP_HIST_MAX_LEN 15
244 uint8_t *rx_buf,
size_t rx_size,
int nfc_t4t_isodep_data_received(const uint8_t *data, size_t data_len, int err)
Handle NFC ISO-DEP protocol received data.
int nfc_t4t_isodep_transmit(const uint8_t *data, size_t data_len)
Exchange the specified amount of data.
int nfc_t4t_isodep_tag_deselect(void)
Send a Deselect command.
int nfc_t4t_isodep_rats_send(enum nfc_t4t_isodep_fsd fsd, uint8_t did)
Send a Request for Answer to Select (RATS).
int nfc_t4t_isodep_init(uint8_t *tx_buf, size_t tx_size, uint8_t *rx_buf, size_t rx_size, const struct nfc_t4t_isodep_cb *cb)
Initialize NFC ISO-DEP protocol.
nfc_t4t_isodep_fsd
NFC Type 4 Tag ISO-DEP frame size.
Definition isodep.h:81
@ NFC_T4T_ISODEP_FSD_64
Definition isodep.h:98
@ NFC_T4T_ISODEP_FSD_32
Definition isodep.h:89
@ NFC_T4T_ISODEP_FSD_96
Definition isodep.h:101
@ NFC_T4T_ISODEP_FSD_16
Definition isodep.h:83
@ NFC_T4T_ISODEP_FSD_128
Definition isodep.h:104
@ NFC_T4T_ISODEP_FSD_256
Definition isodep.h:107
@ NFC_T4T_ISODEP_FSD_48
Definition isodep.h:95
@ NFC_T4T_ISODEP_FSD_40
Definition isodep.h:92
@ NFC_T4T_ISODEP_FSD_24
Definition isodep.h:86
void nfc_t4t_isodep_on_timeout(void)
Handle a transmission timeout error.
#define NFC_T4T_ISODEP_HIST_MAX_LEN
Definition isodep.h:42
void(* ready_to_send)(uint8_t *data, size_t data_len, uint32_t ftd)
ISO-DEP data ready to send a callback.
Definition isodep.h:147
void(* data_received)(const uint8_t *data, size_t data_len)
ISO-DEP data received callback.
Definition isodep.h:124
void(* selected)(const struct nfc_t4t_isodep_tag *t4t_tag)
Type 4 Tag ISO-DEP selected callback.
Definition isodep.h:130
void(* deselected)(void)
Type 4 Tag ISO-DEP deselected callback.
Definition isodep.h:136
void(* error)(int err)
ISO-DEP error callback.
Definition isodep.h:154
ISO-DEP Protocol callback structure.
Definition isodep.h:115
uint8_t historical[15]
Definition isodep.h:67
uint8_t lp_divisor
Definition isodep.h:61
uint8_t did
Definition isodep.h:58
bool did_supported
Definition isodep.h:73
uint32_t fwt
Definition isodep.h:49
uint8_t pl_divisor
Definition isodep.h:64
uint8_t historical_len
Definition isodep.h:70
bool nad_supported
Definition isodep.h:76
uint16_t fsc
Definition isodep.h:55
uint32_t sfgt
Definition isodep.h:52
NFC Type 4 Tag data negotiated over RATS command exchange.
Definition isodep.h:47