Functions | |
void | TLV_getInfo (uint8_t tag, uint8_t *length, uint16_t **data_address) |
Gets TLV Info. More... | |
bool | TLV_performChecksumCheck (void) |
Performs checksum check on TLV. More... | |
void TLV_getInfo | ( | uint8_t | tag, |
uint8_t * | length, | ||
uint16_t ** | data_address | ||
) |
Gets TLV Info.
The TLV structure uses a tag or base address to identify segments of the table where information is stored. This can be used to retrieve calibration constants for the device or find out more information about the device. This function retrieves the address of a tag and the length of the tag request. Please check the device datasheet for tags available on your device.
tag | represents the tag for which the information needs to be retrieved. Valid values are:
|
length | Acts as a return through indirect reference. The function retrieves the value of the TLV tag length. This value is pointed to by *length and can be used by the application level once the function is called. |
data_address | acts as a return through indirect reference. Once the function is called data_address points to the pointer that holds the value retrieved from the specified TLV tag. |
bool TLV_performChecksumCheck | ( | void | ) |
Performs checksum check on TLV.
The 2's complement checksum is calculated on the data stored in the TLV. If the calculated checksum is equal to the checksum stored in the TLV then the user knows that the TLV has not been corrupted. This API can be used after a BOR before writing configuration constants to the appropriate registers.