229 size_t src_offset,
void *dst,
size_t size);
251 size_t dst_offset,
const void *src,
size_t size);
xf_err_t xf_fal_partition_read(const xf_fal_partition_t *part, size_t src_offset, void *dst, size_t size)
从指定分区读取数据。
xf_err_t xf_fal_register_flash_device(const xf_fal_flash_dev_t *p_dev)
注册一个 flash 设备到 xf_fal 中。
xf_err_t xf_fal_deinit(void)
反初始化 FAL.
xf_err_t xf_fal_partition_erase(const xf_fal_partition_t *part, size_t offset, size_t size)
擦除指定分区数据。
xf_err_t xf_fal_partition_erase_all(const xf_fal_partition_t *part)
擦除指定分区所有数据。
bool xf_fal_check_register_state(void)
检查 xf_fal 注册状态。
xf_err_t xf_fal_init(void)
初始化 FAL.
xf_err_t xf_fal_check_and_update_cache(void)
更新分区表中的分区与关联的 flash 设备的缓存。
xf_err_t xf_fal_unregister_partition_table(const xf_fal_partition_t *p_table)
从 xf_fal 中注销一个分区表。
const xf_fal_ctx_t * xf_fal_get_ctx(void)
获取 xf_fal 上下文。
xf_err_t xf_fal_partition_write(const xf_fal_partition_t *part, size_t dst_offset, const void *src, size_t size)
将数据写入指定分区。
const xf_fal_flash_dev_t * xf_fal_flash_device_find(const char *name)
根据 flash 名称查找 flash 设备。
void xf_fal_show_part_table(void)
打印分区表信息。
xf_err_t xf_fal_register_partition_table(const xf_fal_partition_t *p_table, size_t table_len)
注册一个分区表到 xf_fal 中。
const xf_fal_partition_t * xf_fal_partition_find(const char *name)
根据分区名称查找分区句柄。
xf_err_t xf_fal_unregister_flash_device(const xf_fal_flash_dev_t *p_dev)
从 xf_fal 中注销一个 flash 设备。
const xf_fal_flash_dev_t * xf_fal_flash_device_find_by_part(const xf_fal_partition_t *part)
通过给定分区查找 flash 设备。
int32_t xf_err_t
整形错误类型。 错误码具体值见 xf_err_code_t.