7#ifndef NFC_T2T_PARSER_H_
8#define NFC_T2T_PARSER_H_
107#define NFC_T2T_DESC_DEF(_name, _max_blocks) \
108 static struct nfc_t2t_tlv_block _name##_tlv_block_array[_max_blocks]; \
109 static struct nfc_t2t NFC_T2T_DESC(_name) = \
111 .max_tlv_blocks = _max_blocks, \
112 .tlv_block_array = _name##_tlv_block_array, \
119#define NFC_T2T_DESC(_name) (_name##_t2t)
122#define NFC_T2T_NFC_FORUM_DEFINED_DATA 0xE1
127#define NFC_T2T_UID_BCC_CASCADE_BYTE 0x88
131#define NFC_T2T_SUPPORTED_MAJOR_VERSION 1
134#define NFC_T2T_SUPPORTED_MINOR_VERSION 0
137#define NFC_T2T_BLOCK_SIZE 4
140#define NFC_T2T_CC_BLOCK_OFFSET 12
143#define NFC_T2T_FIRST_DATA_BLOCK_OFFSET 16
int nfc_t2t_parse(struct nfc_t2t *t2t, const uint8_t *raw_data)
Parse raw data that was read from a Type 2 Tag.
void nfc_t2t_clear(struct nfc_t2t *t2t)
Clear the nfc_t2t structure.
void nfc_t2t_printout(const struct nfc_t2t *t2t)
Print parsed contents of the Type 2 Tag.
uint8_t read_access
Definition parser.h:65
uint8_t write_access
Definition parser.h:68
uint8_t minor_version
Definition parser.h:59
uint16_t data_area_size
Definition parser.h:62
uint8_t major_version
Definition parser.h:56
Descriptor for the Capability Container (CC) bytes of a Type 2 Tag.
Definition parser.h:54
uint8_t internal
Definition parser.h:49
uint16_t serial_number_part_1
Definition parser.h:33
uint8_t manufacturer_id
Definition parser.h:30
uint8_t check_byte_1
Definition parser.h:46
uint32_t serial_number_part_2
Definition parser.h:36
uint8_t check_byte_0
Definition parser.h:41
Descriptor for the internal bytes of a Type 2 Tag.
Definition parser.h:26
TLV block descriptor.
Definition tlv_block.h:53
struct nfc_t2t_cc cc
Definition parser.h:81
uint16_t tlv_count
Definition parser.h:90
struct nfc_t2t_sn sn
Definition parser.h:75
struct nfc_t2t_tlv_block * tlv_block_array
Definition parser.h:87
uint16_t lock_bytes
Definition parser.h:78
const uint16_t max_tlv_blocks
Definition parser.h:84
Type 2 Tag descriptor.
Definition parser.h:73