Capability Container file parser for Type 4 Tag. More...
Modules |
|
| Capability Container file for Type 4 Tag configuration | |
| File Control TLV block parser for Type 4 Tag. | |
|
File Control TLV block parser for Type 4 Tag (T4T).
|
|
Data Structures |
|
| struct | nfc_t4t_capability_container_t |
|
Descriptor for the Capability Container (CC) file of Type 4 Tag.
More...
|
|
Macros |
|
| #define | NFC_T4T_CC_DESC_DEF (NAME, MAX_BLOCKS) |
|
Macro for creating and initializing a Type 4 Tag Capability Container descriptor.
More...
|
|
| #define | NFC_T4T_CC_DESC (NAME) (NAME##_type_4_tag) |
|
Macro for accessing the
nfc_t4t_capability_container_t
instance that was created with
NFC_T4T_CC_DESC_DEF
.
More...
|
|
Functions |
|
| ret_code_t | nfc_t4t_cc_file_parse ( nfc_t4t_capability_container_t *p_t4t_cc_file, uint8_t *p_raw_data, uint16_t len) |
|
Function for parsing raw data of a CC file, read from a Type 4 Tag.
More...
|
|
| nfc_t4t_tlv_block_t * | nfc_t4t_file_content_get ( nfc_t4t_capability_container_t *p_t4t_cc_file, uint16_t file_id) |
|
Function for finding File Control TLV block within the CC file descriptor.
More...
|
|
| ret_code_t | nfc_t4t_file_content_set ( nfc_t4t_capability_container_t *p_t4t_cc_file, nfc_t4t_file_t file, uint16_t file_id) |
|
Function for binding a file with its File Control TLV block.
More...
|
|
| void | nfc_t4t_cc_file_printout ( nfc_t4t_capability_container_t *p_t4t_cc_file) |
|
Function for printing the CC file descriptor.
More...
|
|
Detailed Description
Capability Container file parser for Type 4 Tag.
Macro Definition Documentation
| #define NFC_T4T_CC_DESC | ( | NAME | ) | (NAME##_type_4_tag) |
Macro for accessing the nfc_t4t_capability_container_t instance that was created with NFC_T4T_CC_DESC_DEF .
- Parameters
-
[in] NAME Name of the created descriptor instance.
| #define NFC_T4T_CC_DESC_DEF | ( | NAME, | |
| MAX_BLOCKS | |||
| ) |
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 Documentation
| ret_code_t nfc_t4t_cc_file_parse | ( | nfc_t4t_capability_container_t * | p_t4t_cc_file , |
| uint8_t * | p_raw_data , | ||
| uint16_t | len | ||
| ) |
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.
| void nfc_t4t_cc_file_printout | ( | nfc_t4t_capability_container_t * | p_t4t_cc_file | ) |
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.
| nfc_t4t_tlv_block_t * nfc_t4t_file_content_get | ( | nfc_t4t_capability_container_t * | p_t4t_cc_file , |
| uint16_t | file_id | ||
| ) |
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.
| ret_code_t nfc_t4t_file_content_set | ( | nfc_t4t_capability_container_t * | p_t4t_cc_file , |
| nfc_t4t_file_t | file , | ||
| uint16_t | file_id | ||
| ) |
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.