安全模式:增加修复下载runtime
authorCaisking <3449750381@qq.com>
Thu, 12 Sep 2024 12:05:30 +0000 (20:05 +0800)
committerCaisking <3449750381@qq.com>
Thu, 12 Sep 2024 12:05:30 +0000 (20:05 +0800)
code/sdk/drivers/peripheral/utils/custom_runtime.c
code/sdk/drivers/peripheral/utils/custom_runtime.h

index 7bba0bf..ae68385 100644 (file)
@@ -83,6 +83,7 @@ typedef struct
     uint8_t sleep_mode_flag; // sleep mode flag
     uint8_t absolute_static_state; // 绝对静止状态
     uint8_t checkres_status;//校验文件状态
+    uint8_t repair_download_status;//升级下载状态
 } runtime_status_t;
 
 
@@ -384,6 +385,15 @@ uint8_t uapi_dev_runtime_get_checkres_status(void)
 {
     return g_runtime.checkres_status;
 }
+/*设置修复下载状态*/
+void uapi_dev_runtime_set_repair_download_status(uint8_t status)
+{
+    g_runtime.repair_download_status = status;
+}
+uint8_t uapi_dev_runtime_get_repair_download_status(void)
+{
+    return g_runtime.repair_download_status;
+}
 /*设置运动识别状态*/
 void uapi_dev_runtime_set_motion_recognition_status(uint8_t status)
 {
index 8d2880b..3395e92 100644 (file)
@@ -99,6 +99,15 @@ uint8_t uapi_dev_runtime_get_lock_status(void);
 void uapi_dev_runtime_set_checkres_status(uint8_t status);
 uint8_t uapi_dev_runtime_get_checkres_status(void);
 
+/*
+    修复下载状态
+    0 未修复
+    1 正在修复
+    2 修复成功
+    3 修复失败
+*/
+void uapi_dev_runtime_set_repair_download_status(uint8_t status);
+uint8_t uapi_dev_runtime_get_repair_download_status(void);
 
 /*运动识别*/
 void uapi_dev_runtime_set_motion_recognition_status(uint8_t status);