123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- #ifndef NFC_TLV_BLOCK_H__
- #define NFC_TLV_BLOCK_H__
- #include <stdint.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- typedef enum
- {
- TLV_NULL = 0x00,
- TLV_LOCK_CONTROL = 0x01,
- TLV_MEMORY_CONTROL = 0x02,
- TLV_NDEF_MESSAGE = 0x03,
- TLV_PROPRIETARY = 0xFD,
- TLV_TERMINATOR = 0xFE
- } tlv_block_types_t;
- typedef struct
- {
- uint8_t tag;
- uint16_t length;
- uint8_t * p_value;
- } tlv_block_t;
- #define TLV_T_LENGTH 1
- #define TLV_L_SHORT_LENGTH 1
- #define TLV_L_LONG_LENGTH 3
- #define TLV_L_FORMAT_FLAG 0xFF
- #define TLV_NULL_TERMINATOR_LEN 0
- #define TLV_LOCK_MEMORY_CTRL_LEN 3
- #ifdef __cplusplus
- }
- #endif
- #endif
|