nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches
cc_file.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_CC_FILE_H_
8#define NFC_T4T_CC_FILE_H_
9
18#include <stdint.h>
19#include <nfc/t4t/tlv_block.h>
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
29
31 uint16_t tlv_count;
32
35
37 uint16_t len;
38
41
44
47
50};
51
67#define NFC_T4T_CC_DESC_DEF(_name, _max_blocks) \
68 static struct nfc_t4t_tlv_block _name##_tlv_block_array[_max_blocks]; \
69 static struct nfc_t4t_cc_file _name##_type_4_tag = { \
70 .max_tlv_blocks = _max_blocks, \
71 .tlv_block_array = _name##_tlv_block_array, \
72 .tlv_count = 0 \
73 }
74
80#define NFC_T4T_CC_DESC(_name) (_name##_type_4_tag)
81
95int nfc_t4t_cc_file_parse(struct nfc_t4t_cc_file *t4t_cc_file,
96 const uint8_t *raw_data,
97 uint16_t len);
98
112 uint16_t file_id);
113
127 const struct nfc_t4t_tlv_block_file *file,
128 uint16_t file_id);
129
136void nfc_t4t_cc_file_printout(const struct nfc_t4t_cc_file *t4t_cc_file);
137
138#ifdef __cplusplus
139}
140#endif
141
146#endif /* NFC_T4T_CC_FILE_H_ */
int nfc_t4t_cc_file_content_set(struct nfc_t4t_cc_file *t4t_cc_file, const struct nfc_t4t_tlv_block_file *file, uint16_t file_id)
Function for binding a file with its File Control TLV block.
void nfc_t4t_cc_file_printout(const struct nfc_t4t_cc_file *t4t_cc_file)
Function for printing the CC file descriptor.
int nfc_t4t_cc_file_parse(struct nfc_t4t_cc_file *t4t_cc_file, const uint8_t *raw_data, uint16_t len)
Function for parsing raw data of a CC file, read from a Type 4 Tag.
struct nfc_t4t_tlv_block * nfc_t4t_cc_file_content_get(struct nfc_t4t_cc_file *t4t_cc_file, uint16_t file_id)
Function for finding File Control TLV block within the CC file descriptor.
uint16_t max_rapdu_size
Definition cc_file.h:40
uint8_t major_version
Definition cc_file.h:46
struct nfc_t4t_tlv_block * tlv_block_array
Definition cc_file.h:28
uint16_t len
Definition cc_file.h:37
uint16_t tlv_count
Definition cc_file.h:31
uint16_t max_tlv_blocks
Definition cc_file.h:34
uint8_t minor_version
Definition cc_file.h:49
uint16_t max_capdu_size
Definition cc_file.h:43
Descriptor for the Capability Container (CC) file of Type 4 Tag.
Definition cc_file.h:26
File content descriptor.
Definition tlv_block.h:57
File Control TLV block descriptor.
Definition tlv_block.h:87