Support for lists of type-length-value items. More...
Go to the source code of this file.
Data Structures | |
struct | dp_tlv_item_t |
Item in a TLV list. More... | |
Macros | |
#define | TLV_TYPE_END 0xFF |
#define | TLV_ENTRY(type, memspace, address) {type, sizeof(*address), memspace, address} |
Macro for TLV list item. | |
#define | TLV_END {TLV_TYPE_END, 0, MEMSPACE_NONE, 0} |
Macro for last item in TLV list. | |
Functions | |
uint16_t | get_tlv_list_length_P (const struct dp_tlv_item_t *tlv_data) |
Support for lists of type-length-value items.
#define TLV_TYPE_END 0xFF |
Last field in TLV list with length 0. Same value as unprogrammed flash/EEPROM to lower chances of get_tlv_list_length_P() failing when it is provided with a bad pointer.
uint16_t get_tlv_list_length_P | ( | const struct dp_tlv_item_t * | tlv_data | ) |
Calculate the total length of the TLV list stored in program memory, not including a TLV_TYPE_END field.