Capability Container file parser for Type 4 Tag.
More...
Capability Container file parser for Type 4 Tag.
#define NFC_T4T_CC_DESC |
( |
|
NAME | ) |
(NAME##_type_4_tag) |
#define NFC_T4T_CC_DESC_DEF |
( |
|
NAME, |
|
|
|
MAX_BLOCKS |
|
) |
| |
Value:
{ \
.p_tlv_block_array = NAME##_tlv_block_array, \
.tlv_count = 0 \
}
Macro for creating and initializing a Type 4 Tag Capability Container descriptor.
This macro creates and initializes a static instance of a nfc_t4t_capability_container_t structure and an array of nfc_t4t_tlv_block_t descriptors.
Use the macro NFC_T4T_CC_DESC to access the Type 4 Tag descriptor instance.
- Parameters
-
[in] | NAME | Name of the created descriptor instance. |
[in] | MAX_BLOCKS | Maximum number of nfc_t4t_tlv_block_t descriptors that can be stored in the array. |
Function for parsing raw data of a CC file, read from a Type 4 Tag.
This function parses raw data of a Capability Container file and stores the results in its descriptor.
- Parameters
-
[in,out] | p_t4t_cc_file | Pointer to the CC file descriptor that will be filled with parsed data. |
[in] | p_raw_data | Pointer to the buffer with raw data. |
[in] | len | Buffer length. |
- Return values
-
NRF_SUCCESS | If operation was successful. |
NRF_ERROR_NULL | If any of the provided pointer arguments is NULL. |
NRF_ERROR_INVALID_LENGTH | If provided buffer exceeds a valid CC file length range. |
NRF_ERROR_INVALID_DATA | If mapping version of Type 4 Tag specification is not a compatible CC file structure. |
Other | Other error codes might be returned depending on nfc_t4t_file_control_tlv_parse function. |
Function for printing the CC file descriptor.
This function prints the CC file descriptor.
- Parameters
-
[in] | p_t4t_cc_file | Pointer to the CC file. |
Function for finding File Control TLV block within the CC file descriptor.
This function finds File Control TLV block that matches the specified file ID within the CC file descriptor.
- Parameters
-
[in] | p_t4t_cc_file | Pointer to the CC file descriptor. |
[in] | file_id | File identifier. |
- Return values
-
TLV | Pointer to the File Control TLV. |
NULL | If TLV with the specified File ID was not found. |
Function for binding a file with its File Control TLV block.
This function binds file content with its File Control TLV block, in which maximal file size and access conditions are stored.
- Parameters
-
[in,out] | p_t4t_cc_file | Pointer to the CC file descriptor. |
[in] | file | File descriptor. |
[in] | file_id | File identifier. |
- Return values
-
NRF_SUCCESS | If operation was successful. |
NRF_ERROR_NOT_FOUND | If the provided file ID does not match any ID stored in TLV blocks of the CC file. |