/* * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes * 2024-11-07 RuoFeng the first version */ #ifndef APPLICATIONS_SYS_CONFIG_H_ #define APPLICATIONS_SYS_CONFIG_H_ /* RT-FOTA module define */ #define RT_FOTA_SW_VERSION "1.0.0" /* Enable Ymodem OTA */ #define PKG_USING_YMODEM_OTA /* FOTA application partition name */ #ifndef RT_FOTA_APP_PART_NAME #define RT_FOTA_APP_PART_NAME "app" #endif /* FOTA download partition name */ #ifndef RT_FOTA_FM_PART_NAME #define RT_FOTA_FM_PART_NAME "fm_area" #endif /* FOTA default partition name */ #ifndef RT_FOTA_DF_PART_NAME #define RT_FOTA_DF_PART_NAME "df_area" #endif /* AES256 encryption algorithm option */ #define RT_FOTA_ALGO_AES_IV "0123456789ABCDEF" #define RT_FOTA_ALGO_AES_KEY "0123456789ABCDEF0123456789ABCDEF" #define Version "V1.39" #define IsReady "固件管理模式就绪" #define BLReady IsReady " " Version extern void fota_status_send(const char *data,unsigned char len); extern void fota_progress_bar_send(unsigned char data); #define SWITCH_HMI (1 << 0) #define PartitionNotFound fota_status_send("分区未找到", sizeof("分区未找到")); #define PartitionReadError fota_status_send("分区读取错误", sizeof("分区读取错误")); #define PartitionCRCError fota_status_send("分区数据校验错误", sizeof("分区数据校验错误")); #define PartitionNotSurport fota_status_send("分区类型不支持", sizeof("分区类型不支持")); #define PartitionIntegrityVerifyError fota_status_send("固件完整性校验失败", sizeof("固件完整性校验失败")); #define PartitionVerifySuccess fota_status_send("固件校验成功", sizeof("固件校验成功")); #define PartitionVerifyError fota_status_send("固件校验失败", sizeof("固件校验失败")); #define PartitionInitFail fota_status_send("分区初始化失败", sizeof("分区初始化失败")); #define EraseStart fota_status_send("开始擦除分区", sizeof("开始擦除分区")); #define EraseFailed fota_status_send("擦除失败", sizeof("擦除失败")); #define EraseSuccess fota_status_send("擦除成功", sizeof("擦除成功")); #define WriteFailed fota_status_send("写入失败", sizeof("写入失败")); #define StartApp fota_status_send("正在启动应用……", sizeof("正在启动应用……")); #define Flash_Fw fota_status_send("正在刷写固件", sizeof("正在刷写固件")); #define Recove_Fw fota_status_send("正在恢复出厂固件", sizeof("正在恢复出厂固件")); #define UpgradeSuccess fota_status_send("固件升级成功", sizeof("固件升级成功")); #define UpgradeFail fota_status_send("固件升级失败", sizeof("固件升级失败")); #define Fw_mg_Ready fota_status_send(BLReady, sizeof(BLReady)); #define WritetoRecove fota_status_send("正在将固件写入备份区", sizeof("正在将固件写入备份区")); #endif