XFusion API v1.3.0
载入中...
搜索中...
未找到
xf_fal.h
浏览该文件的文档.
1
19#ifndef __XF_FAL_H__
20#define __XF_FAL_H__
21
22/* ==================== [Includes] ========================================== */
23
24#include "xf_fal_types.h"
25
27#include "xf_utils.h"
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33/* ==================== [Defines] =========================================== */
34
35/* ==================== [Typedefs] ========================================== */
36
37/* ==================== [Global Prototypes] ================================= */
38
59
69const xf_fal_ctx_t *xf_fal_get_ctx(void);
70
91
112 const xf_fal_partition_t *p_table, size_t table_len);
113
128
143
151
162
173
182const xf_fal_flash_dev_t *xf_fal_flash_device_find(const char *name);
183
198 const xf_fal_partition_t *part);
199
208const xf_fal_partition_t *xf_fal_partition_find(const char *name);
209
228 const xf_fal_partition_t *part,
229 size_t src_offset, void *dst, size_t size);
230
250 const xf_fal_partition_t *part,
251 size_t dst_offset, const void *src, size_t size);
252
274 const xf_fal_partition_t *part, size_t offset, size_t size);
275
288
292void xf_fal_show_part_table(void);
293
299/* ==================== [Macros] ============================================ */
300
301#ifdef __cplusplus
302} /* extern "C" */
303#endif
304
305#endif // __XF_FAL_H__
xf_err_t xf_fal_partition_read(const xf_fal_partition_t *part, size_t src_offset, void *dst, size_t size)
从指定分区读取数据。
Definition xf_fal.c:404
xf_err_t xf_fal_register_flash_device(const xf_fal_flash_dev_t *p_dev)
注册一个 flash 设备到 xf_fal 中。
Definition xf_fal.c:95
xf_err_t xf_fal_deinit(void)
反初始化 FAL.
Definition xf_fal.c:293
xf_err_t xf_fal_partition_erase(const xf_fal_partition_t *part, size_t offset, size_t size)
擦除指定分区数据。
Definition xf_fal.c:482
xf_err_t xf_fal_partition_erase_all(const xf_fal_partition_t *part)
擦除指定分区所有数据。
Definition xf_fal.c:520
bool xf_fal_check_register_state(void)
检查 xf_fal 注册状态。
Definition xf_fal.c:246
xf_err_t xf_fal_init(void)
初始化 FAL.
Definition xf_fal.c:259
xf_err_t xf_fal_check_and_update_cache(void)
更新分区表中的分区与关联的 flash 设备的缓存。
Definition xf_fal.c:579
xf_err_t xf_fal_unregister_partition_table(const xf_fal_partition_t *p_table)
从 xf_fal 中注销一个分区表。
Definition xf_fal.c:213
const xf_fal_ctx_t * xf_fal_get_ctx(void)
获取 xf_fal 上下文。
Definition xf_fal.c:254
xf_err_t xf_fal_partition_write(const xf_fal_partition_t *part, size_t dst_offset, const void *src, size_t size)
将数据写入指定分区。
Definition xf_fal.c:443
const xf_fal_flash_dev_t * xf_fal_flash_device_find(const char *name)
根据 flash 名称查找 flash 设备。
Definition xf_fal.c:318
void xf_fal_show_part_table(void)
打印分区表信息。
Definition xf_fal.c:525
xf_err_t xf_fal_register_partition_table(const xf_fal_partition_t *p_table, size_t table_len)
注册一个分区表到 xf_fal 中。
Definition xf_fal.c:139
const xf_fal_partition_t * xf_fal_partition_find(const char *name)
根据分区名称查找分区句柄。
Definition xf_fal.c:370
xf_err_t xf_fal_unregister_flash_device(const xf_fal_flash_dev_t *p_dev)
从 xf_fal 中注销一个 flash 设备。
Definition xf_fal.c:180
const xf_fal_flash_dev_t * xf_fal_flash_device_find_by_part(const xf_fal_partition_t *part)
通过给定分区查找 flash 设备。
Definition xf_fal.c:342
int32_t xf_err_t
整形错误类型。 错误码具体值见 xf_err_code_t.
Definition xf_err.h:69
xf_fal 对象上下文结构体。
flash 设备结构体。
flash 分区结构体。
xf_fal 内部配置。
xf_fal 公共类型类型及定义。