Partition table API
数据结构体
-
struct wm_partition_item_t
partition infomation
相关API
-
int wm_partition_table_init(void)
initialize partition table module
备注
Partition table must exist in flash, and it must be burned to CONFIG_WM_PARTITION_TABLE_OFFSET
- 返回:
WM_ERR_SUCCESS: success
WM_ERR_NOT_FOUND: fail
-
int wm_partition_table_find(const char *name, wm_partition_item_t *partition)
find a partition information by partition name
备注
must called after wm_partition_table_init
- 参数:
name – [in] partition name
partition – [out] partition information, wm_partition_item_t
- 返回:
WM_ERR_SUCCESS: success
WM_ERR_INVALID_PARAM: invalid argument
WM_ERR_NOT_FOUND: Not found the partition
-
void wm_partition_table_print(void)
print partition table information
- 返回:
WM_ERR_SUCCESS: success
WM_ERR_NOT_FOUND: fail