|
WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
|


结构体 | |
| struct | kv_key_filter_t |
| struct | kv_key_header_t |
| struct | kv_key_handle_t |
| struct | kv_key_details_t |
| struct | kv_helper_compare_key_data_info_t |
宏定义 | |
| #define | KV_KEY_MAGIC 0xA9 |
| #define | KV_KEY_VALID 0xFF |
| #define | KV_KEY_INVALID 0 |
| #define | KV_KEY_NO_MAGIC 0xFF |
| #define | KV_KEY_TYPE_NORMAL 0xFF |
| #define | KV_KEY_TYPE_PERMANENT 0 |
| #define | KV_KEY_FORCE_UPDATE 0xf0 |
| #define | KV_CRYPTO_HASH_SIZE 32 |
| #define | KV_CRYPTO_CRC_SIZE 4 |
| #define | KV_CRYPTO_CRC32_SIZE 32 |
| #define | AES_BLOCK_SIZE 16 |
| #define | NV_AES_GCM_TAG_LENGTH 16 |
| #define | MIN_AES_DECRYPT_LEN (2 * AES_BLOCK_SIZE) |
| #define | AES_KDFKEY_SDRK_TYPE 0x52 |
| #define | CRC_SWAP_SIZE8 8 |
| #define | CRC_SWAP_SIZE24 24 |
| #define | INVAILD_CRYPTO_HANDLE 0xFFFFFFFF |
类型定义 | |
| typedef uint16_t | kv_key_id |
| typedef const void * | kv_key_location |
枚举 | |
| enum | kv_key_filter_state_t { KV_KEY_FILTER_STATE_VALID = 0x01 , KV_KEY_FILTER_STATE_INVALID = 0x02 , KV_KEY_FILTER_STATE_ANY = 0x03 } |
| enum | kv_key_filter_type_t { KV_KEY_FILTER_TYPE_NORMAL = 0x01 , KV_KEY_FILTER_TYPE_PERMANENT = 0x02 , KV_KEY_FILTER_TYPE_ANY = 0x03 } |
| enum | kv_attributes_t { KV_ATTRIBUTE_PERMANENT = 0x1 , KV_ATTRIBUTE_ENCRYPTED = 0x2 , KV_ATTRIBUTE_NON_UPGRADE = 0x4 } |
| enum | kv_key_validate_status_t { KV_KEY_NOT_VALIDATE , KV_KEY_VALIDATE_CORRECT , KV_KEY_VALIDATE_WRONG } |
变量 | |
| uint8_t | g_nv_header_magic |
| #define AES_BLOCK_SIZE 16 |
| #define AES_KDFKEY_SDRK_TYPE 0x52 |
| #define CRC_SWAP_SIZE24 24 |
| #define CRC_SWAP_SIZE8 8 |
| #define INVAILD_CRYPTO_HANDLE 0xFFFFFFFF |
| #define KV_CRYPTO_CRC32_SIZE 32 |
| #define KV_CRYPTO_CRC_SIZE 4 |
| #define KV_CRYPTO_HASH_SIZE 32 |
| #define KV_KEY_FORCE_UPDATE 0xf0 |
| #define KV_KEY_INVALID 0 |
| #define KV_KEY_MAGIC 0xA9 |
| #define KV_KEY_NO_MAGIC 0xFF |
| #define KV_KEY_TYPE_NORMAL 0xFF |
| #define KV_KEY_TYPE_PERMANENT 0 |
| #define KV_KEY_VALID 0xFF |
| #define MIN_AES_DECRYPT_LEN (2 * AES_BLOCK_SIZE) |
| #define NV_AES_GCM_TAG_LENGTH 16 |
| typedef uint16_t kv_key_id |
| typedef const void* kv_key_location |
Represents the location in flash of a KV key. Provided in such a way that it can't be dereferenced, as flash is not directly addressable
| enum kv_attributes_t |
| enum kv_key_filter_type_t |
| uint32_t kv_crc32_swap | ( | uint32_t | crc | ) |
| errcode_t kv_helper_compare_key_data | ( | kv_key_handle_t * | key, |
| const uint8_t * | compare_data, | ||
| uint16_t | compare_length | ||
| ) |
| kv_attributes_t kv_key_attributes | ( | const kv_key_handle_t * | key | ) |
| void kv_key_build_from_new | ( | kv_key_handle_t * | key, |
| const kv_key_details_t * | new_key, | ||
| kv_key_location | key_location | ||
| ) |
| errcode_t kv_key_direct_erase_flash | ( | uint32_t | dest, |
| const uint32_t | size | ||
| ) |
| errcode_t kv_key_direct_write_flash | ( | uint32_t | dest, |
| uint32_t | length, | ||
| const uint8_t * | src | ||
| ) |
| errcode_t kv_key_does_filter_match | ( | kv_key_handle_t * | key, |
| kv_key_filter_t * | search_filter | ||
| ) |
| errcode_t kv_key_erase_flash | ( | uint32_t | dest, |
| const uint32_t | size | ||
| ) |
| uint16_t kv_key_flash_size | ( | kv_key_handle_t * | key | ) |
| errcode_t kv_key_get_handle_from_location | ( | kv_key_location | key_location, |
| kv_key_handle_t * | key | ||
| ) |
| errcode_t kv_key_get_next_handle | ( | kv_key_handle_t * | key, |
| kv_key_validate_status_t | key_status | ||
| ) |
| errcode_t kv_key_get_next_magic_position | ( | kv_key_location | key_location, |
| kv_key_handle_t * | key | ||
| ) |
| errcode_t kv_key_helper_copy_flash | ( | uint32_t | dest_location, |
| uint32_t | src_location, | ||
| uint16_t | length | ||
| ) |
| bool kv_key_is_erased | ( | const kv_key_handle_t * | key | ) |
| bool kv_key_is_valid | ( | kv_key_handle_t * | key | ) |
| errcode_t kv_key_locations_in_same_page | ( | kv_key_location | first_key_location, |
| kv_key_location | second_key_location | ||
| ) |
| uint16_t kv_key_padded_data_length | ( | kv_attributes_t | attributes, |
| uint16_t | unpadded_length | ||
| ) |
| errcode_t kv_key_read_data | ( | kv_key_handle_t * | key, |
| uint8_t * | dest_location | ||
| ) |
| errcode_t kv_key_validate_integrity | ( | kv_key_handle_t * | key, |
| bool | ignor_invalid | ||
| ) |
| errcode_t kv_key_validation | ( | kv_key_handle_t * | key, |
| bool | ignor_invalid | ||
| ) |
| errcode_t kv_key_write_flash | ( | uint32_t | dest, |
| uint32_t | length, | ||
| const uint8_t * | src | ||
| ) |
|
extern |