Files
chrg/apps/chrg/applications/bsp/chrg_fal.h
T
yhf 9f63dfeaf5 chore: 统一项目版本至V1.1.24并完善版本管理
1.  新增`apps/chrg/applications/utils/chrg_def.h`统一管理版本号,定义CHRG_VERSION相关宏与版本字符串
2.  更新所有业务源文件和头文件的文件头版本号为V1.1.24
3.  修改`chrg_comm.c`移除硬编码版本号,改用统一定义的CHRG_FIRMWARE_VERSION
4.  更新`main.c`添加版本头文件并打印应用版本字符串
5.  更新`修改日志.md`添加V1.1.24版本记录,说明版本管理规则
6.  新增编译日志记录本次版本统一构建结果
7.  补充AGENTS.md中的版本管理规范
8.  新增一批产品测试文档与彩页文件
2026-09-15 21:33:14 +08:00

71 lines
2.5 KiB
C

/****************************************************************************
文件名称 : chrg_fal.h
完成日期 :
当前版本号 : V1.1.24
主要功能 : 提供参数读/写FLASH接口。
版本历史 : 创建原始版本
说明 :
******************************************************************************/
#ifndef __CHRG_FAL_H__
#define __CHRG_FAL_H__
#include <rtthread.h>
#ifdef FAL_PART_HAS_TABLE_CFG
// 以下定义与 fal_cfg.h 中 FAL_PART_TABLE 同步。
#define PART_BOOT "boot"
#define PART_PARAM "param"
#define PART_LOG "log"
#define PART_APPLICATION "app"
#define PART_DOWNLOAD "download"
#define PART_FACTORY "factory"
/*****************************************************************
函数名称: chrg_fal_read
函数描述: 从 FALSH 分区读取数据
输入参数: *name: 分区名 offset: 偏移地址 length: 数据长度 *buf:数据缓冲区
输出参数: -
返回说明: 0: 正确 <0: 异常错误
其它说明: -
*****************************************************************/
extern int chrg_fal_read (const char *name, rt_uint32_t offset, rt_size_t length, rt_uint8_t *buf);
/*****************************************************************
函数名称: chrg_fal_write
函数描述: 将数据写入 FALSH 分区
输入参数: *name: 分区名 offset: 偏移地址 length: 数据长度 *buf:数据缓冲区
输出参数: -
返回说明: 0: 正确 <0: 异常错误
其它说明: -
*****************************************************************/
extern int chrg_fal_write (const char *name, rt_uint32_t offset, rt_size_t length, rt_uint8_t *buf);
/*****************************************************************
函数名称: chrg_fal_erase
函数描述: 从 FALSH 分区擦除数据
输入参数: *name: 分区名 offset: 偏移地址 length: 数据长度
输出参数: -
返回说明: 0: 正确 <0: 异常错误
其它说明: -
*****************************************************************/
extern int chrg_fal_erase (const char *name, rt_uint32_t offset, rt_size_t length);
/*****************************************************************
函数名称: chrg_fal_erase_part
函数描述: 擦除整个分区数据
输入参数: *name: 分区名 offset: 起始地址 length: 数据长度
输出参数: -
返回说明: 0: 正确 <0: 异常错误
其它说明: -
*****************************************************************/
extern int chrg_fal_erase_all (const char *name);
#endif
#endif