这个页面的 最新开发版本 可能比这个发布的 2.3-beta.1 版本新。

Partition table API

数据结构体

struct wm_partition_item_t

partition infomation

Public Members

char name[16]

partition name

uint32_t offset

partition offset

uint32_t size

partition size

uint32_t flag

partition flag

相关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

参数:
返回:

  • 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