XFusion API v1.3.0
载入中...
搜索中...
未找到
xf_fal.h 文件参考

Flash 抽象层 FAL (Flash Abstraction Layer). 更多...

#include "xf_fal_types.h"
#include "xf_fal_config_internal.h"
#include "xf_utils.h"
xf_fal.h 的引用(Include)关系图:

浏览源代码.

函数

xf_err_t xf_fal_check_and_update_cache (void)
 更新分区表中的分区与关联的 flash 设备的缓存。
 
const xf_fal_ctx_txf_fal_get_ctx (void)
 获取 xf_fal 上下文。
 
xf_err_t xf_fal_register_flash_device (const xf_fal_flash_dev_t *p_dev)
 注册一个 flash 设备到 xf_fal 中。
 
xf_err_t xf_fal_register_partition_table (const xf_fal_partition_t *p_table, size_t table_len)
 注册一个分区表到 xf_fal 中。
 
xf_err_t xf_fal_unregister_flash_device (const xf_fal_flash_dev_t *p_dev)
 从 xf_fal 中注销一个 flash 设备。
 
xf_err_t xf_fal_unregister_partition_table (const xf_fal_partition_t *p_table)
 从 xf_fal 中注销一个分区表。
 
bool xf_fal_check_register_state (void)
 检查 xf_fal 注册状态。
 
xf_err_t xf_fal_init (void)
 初始化 FAL.
 
xf_err_t xf_fal_deinit (void)
 反初始化 FAL.
 
const xf_fal_flash_dev_txf_fal_flash_device_find (const char *name)
 根据 flash 名称查找 flash 设备。
 
const xf_fal_flash_dev_txf_fal_flash_device_find_by_part (const xf_fal_partition_t *part)
 通过给定分区查找 flash 设备。
 
const xf_fal_partition_txf_fal_partition_find (const char *name)
 根据分区名称查找分区句柄。
 
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_partition_write (const xf_fal_partition_t *part, size_t dst_offset, const void *src, size_t size)
 将数据写入指定分区。
 
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)
 擦除指定分区所有数据。
 
void xf_fal_show_part_table (void)
 打印分区表信息。
 

详细描述

Flash 抽象层 FAL (Flash Abstraction Layer).

作者
cangyu (sky.k.nosp@m.irto.nosp@m.@qq.c.nosp@m.om)
版本
0.1
日期
2024-10-18

在文件 xf_fal.h 中定义.