sys_config.h 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2024-11-07 RuoFeng the first version
  9. */
  10. #ifndef APPLICATIONS_SYS_CONFIG_H_
  11. #define APPLICATIONS_SYS_CONFIG_H_
  12. /* RT-FOTA module define */
  13. #define RT_FOTA_SW_VERSION "1.0.0"
  14. /* Enable Ymodem OTA */
  15. #define PKG_USING_YMODEM_OTA
  16. /* FOTA application partition name */
  17. #ifndef RT_FOTA_APP_PART_NAME
  18. #define RT_FOTA_APP_PART_NAME "app"
  19. #endif
  20. /* FOTA download partition name */
  21. #ifndef RT_FOTA_FM_PART_NAME
  22. #define RT_FOTA_FM_PART_NAME "fm_area"
  23. #endif
  24. /* FOTA default partition name */
  25. #ifndef RT_FOTA_DF_PART_NAME
  26. #define RT_FOTA_DF_PART_NAME "df_area"
  27. #endif
  28. /* AES256 encryption algorithm option */
  29. #define RT_FOTA_ALGO_AES_IV "0123456789ABCDEF"
  30. #define RT_FOTA_ALGO_AES_KEY "0123456789ABCDEF0123456789ABCDEF"
  31. #define Version "V1.23"
  32. #define IsReady "固件管理模式就绪"
  33. #define BLReady IsReady " " Version
  34. extern void fota_status_send(const char *data,unsigned char len);
  35. extern void fota_progress_bar_send(unsigned char data);
  36. #define SWITCH_HMI (1 << 0)
  37. #define PartitionNotFound fota_status_send("分区未找到", sizeof("分区未找到"));
  38. #define PartitionReadError fota_status_send("分区读取错误", sizeof("分区读取错误"));
  39. #define PartitionCRCError fota_status_send("分区数据校验错误", sizeof("分区数据校验错误"));
  40. #define PartitionNotSurport fota_status_send("分区类型不支持", sizeof("分区类型不支持"));
  41. #define PartitionIntegrityVerifyError fota_status_send("固件完整性校验失败", sizeof("固件完整性校验失败"));
  42. #define PartitionVerifySuccess fota_status_send("固件校验成功", sizeof("固件校验成功"));
  43. #define PartitionVerifyError fota_status_send("固件校验失败", sizeof("固件校验失败"));
  44. #define PartitionInitFail fota_status_send("分区初始化失败", sizeof("分区初始化失败"));
  45. #define EraseStart fota_status_send("开始擦除分区", sizeof("开始擦除分区"));
  46. #define EraseFailed fota_status_send("擦除失败", sizeof("擦除失败"));
  47. #define EraseSuccess fota_status_send("擦除成功", sizeof("擦除成功"));
  48. #define WriteFailed fota_status_send("写入失败", sizeof("写入失败"));
  49. #define StartApp fota_status_send("正在启动应用……", sizeof("正在启动应用……"));
  50. #define Flash_Fw fota_status_send("正在刷写固件", sizeof("正在刷写固件"));
  51. #define Recove_Fw fota_status_send("正在恢复出厂固件", sizeof("正在恢复出厂固件"));
  52. #define UpgradeSuccess fota_status_send("固件升级成功", sizeof("固件升级成功"));
  53. #define UpgradeFail fota_status_send("固件升级失败", sizeof("固件升级失败"));
  54. #define Fw_mg_Ready fota_status_send(BLReady, sizeof(BLReady));
  55. #define WritetoRecove fota_status_send("正在将固件写入备份区", sizeof("正在将固件写入备份区"));
  56. #endif