123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- #ifndef NFC_T4T_TLV_BLOCK_H__
- #define NFC_T4T_TLV_BLOCK_H__
- #include <stdint.h>
- #include "sdk_errors.h"
- #ifdef __cplusplus
- extern "C" {
- #endif
- #define CONTROL_FILE_READ_ACCESS_GRANTED 0x00
- #define CONTROL_FILE_WRITE_ACCESS_GRANTED 0x00
- #define CONTROL_FILE_WRITE_ACCESS_DISABLED 0xFF
- typedef enum
- {
- NDEF_FILE_CONTROL_TLV = 0x04,
- PROPRIETARY_FILE_CONTROL_TLV = 0x05,
- EXTENDED_NDEF_FILE_CONTROL_TLV = 0x06
- } nfc_t4t_tlv_block_types_t;
- typedef struct
- {
- uint8_t * p_content;
- uint16_t len;
- } nfc_t4t_file_t;
- typedef struct
- {
- nfc_t4t_file_t file;
- uint32_t max_file_size;
- uint16_t file_id;
- uint8_t read_access;
- uint8_t write_access;
- } nfc_t4t_file_control_val_t;
- typedef struct
- {
- nfc_t4t_file_control_val_t value;
- uint16_t length;
- uint8_t type;
- } nfc_t4t_tlv_block_t;
- ret_code_t nfc_t4t_file_control_tlv_parse(nfc_t4t_tlv_block_t * p_file_control_tlv,
- uint8_t * p_raw_data,
- uint16_t * p_len);
- void nfc_t4t_file_control_tlv_printout(uint8_t num, nfc_t4t_tlv_block_t * p_t4t_tlv_block);
- #ifdef __cplusplus
- }
- #endif
- #endif
|