TLV Application Functions
APP_TLV API Brief
Application |
Brief |
|---|---|
used TLV data format get data from flash |
|
check chip magic data from flash to identify tlv data valid or not |
|
Read app_env data partition from flash |
APP_TLV API Reference
Header File
Functions
-
void app_tlv_get_data(uint8_t *pos, uint8_t encrypt)
app_tlv_get_data brief description
execute read flash data with the specified position
- 参数:
pos – [in] start address for reading flash data
encrypt – [in] enable encrypt or not
- 返回:
N/A
-
uint32_t app_tlv_check_data_chip_magic(uint8_t *p_chip_magic, uint8_t encrypt)
app_tlv_check_data_chip_magic brief description
compare flash data header with magic words. If the results are the same, data is valid
- 参数:
p_chip_magic – [in] data buffer for magic words
encrypt – [in] enable encrypt or not
- 返回值:
0 – success
other – fail
- 返回:
result
-
void app_tlv_read_flash_data(uint8_t encrypt, uint8_t *p_dst, uint32_t flash_addr, uint32_t read_len)
app_tlv_read_flash_data brief description
get the specified data form flash with starting address and length
- 参数:
encrypt – [in] enable encrypt or not @APP_ENV_FLASH_ENCRYPT
p_dst – [out] data buffer for read from flash
flash_addr – [in] starting address
read_len – [in] read len
- 返回:
N/A
Structures
-
struct TLV_TAG
TLV tag data struct definition.
Enumerations
-
enum TLV_TYPE
TLV tag value definition.
Values:
-
enumerator TLV_TYPE_CALI_END
-
enumerator TLV_TYPE_CALI_DC_OFFSET_DIFF_DISPGA
-
enumerator TLV_TYPE_CALI_DC_OFFSET_SNGL_DISPGA
-
enumerator TLV_TYPE_CALI_DC_OFFSET_DIFF_ENPGA
-
enumerator TLV_TYPE_CALI_DC_OFFSET_SNGL_ENPGA
-
enumerator TLV_TYPE_CALI_SARADC
-
enumerator TLV_TYPE_CALI_VOLTAGE
-
enumerator TLV_TYPE_CALI_CHARGE
-
enumerator TLV_TYPE_CALI_TEMPR
-
enumerator TLV_TYPE_CALI_ANC_PARAM
-
enumerator TLV_TYPE_CALI_ANC_COEFS
-
enumerator TLV_TYPE_CFG_TOTAL
-
enumerator TLV_TYPE_CFG_BT_NAME
-
enumerator TLV_TYPE_CFG_BT_ADDR
-
enumerator TLV_TYPE_CFG_SYS_PARA
-
enumerator TLV_TYPE_CFG_HFP_FEQ
-
enumerator TLV_TYPE_FACT_BT_NAME
-
enumerator TLV_TYPE_FACT_BT_ADDR
-
enumerator TLV_TYPE_BASE_INFO
-
enumerator TLV_TYPE_CALI_END2
-
enumerator TLV_TYPE_CALI_END