nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
tlv_block.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#ifndef NFC_T4T_TLV_BLOCK_H_
8#define NFC_T4T_TLV_BLOCK_H_
9
17#include <stdint.h>
18#include <zephyr/types.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
30#define NFC_T4T_TLV_BLOCK_CONTROL_FILE_READ_ACCESS_GRANTED 0x00
31
33#define NFC_T4T_TLV_BLOCK_CONTROL_FILE_WRITE_ACCESS_GRANTED 0x00
34
36#define NFC_T4T_TLV_BLOCK_CONTROL_FILE_WRITE_ACCESS_DISABLED 0xFF
37
47
50
53};
54
59 uint8_t *content;
60
62 uint16_t len;
63};
64
68
71
73 uint32_t max_file_size;
74
76 uint16_t file_id;
77
79 uint8_t read_access;
80
82 uint8_t write_access;
83};
84
90
92 uint16_t length;
93
95 uint8_t type;
96};
97
114int nfc_t4t_tlv_block_parse(struct nfc_t4t_tlv_block *file_control_tlv,
115 const uint8_t *raw_data,
116 uint16_t *len);
117
125void nfc_t4t_tlv_block_printout(uint8_t num, const struct nfc_t4t_tlv_block *t4t_tlv_block);
126
127#ifdef __cplusplus
128}
129#endif
130
135#endif /* NFC_T4T_TLV_BLOCK_H_ */
nfc_t4t_tlv_block_type
Possible types of File Control TLV for Type 4 Tag.
Definition: tlv_block.h:44
@ NFC_T4T_TLV_BLOCK_TYPE_EXTENDED_NDEF_FILE_CONTROL_TLV
Definition: tlv_block.h:52
@ NFC_T4T_TLV_BLOCK_TYPE_NDEF_FILE_CONTROL_TLV
Definition: tlv_block.h:46
@ NFC_T4T_TLV_BLOCK_TYPE_PROPRIETARY_FILE_CONTROL_TLV
Definition: tlv_block.h:49
int nfc_t4t_tlv_block_parse(struct nfc_t4t_tlv_block *file_control_tlv, const uint8_t *raw_data, uint16_t *len)
Function for parsing raw data of File Control TLV, read from a Type 4 Tag.
void nfc_t4t_tlv_block_printout(uint8_t num, const struct nfc_t4t_tlv_block *t4t_tlv_block)
Function for printing TLV block descriptor.
uint8_t write_access
Definition: tlv_block.h:82
uint16_t file_id
Definition: tlv_block.h:76
uint32_t max_file_size
Definition: tlv_block.h:73
uint8_t read_access
Definition: tlv_block.h:79
struct nfc_t4t_tlv_block_file file
Definition: tlv_block.h:70
Extended NDEF/NDEF/Proprietary File Control Value descriptor.
Definition: tlv_block.h:67
uint8_t * content
Definition: tlv_block.h:59
uint16_t len
Definition: tlv_block.h:62
File content descriptor.
Definition: tlv_block.h:57
uint16_t length
Definition: tlv_block.h:92
struct nfc_t4t_tlv_block_file_control_val value
Definition: tlv_block.h:89
uint8_t type
Definition: tlv_block.h:95
File Control TLV block descriptor.
Definition: tlv_block.h:87