From: Caisking <3449750381@qq.com> Date: Thu, 12 Sep 2024 12:05:30 +0000 (+0800) Subject: 安全模式:增加修复下载runtime X-Git-Tag: release_V1.2.70_20241020_135402~485^2~5^2~10 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=2545c218bb5f761212f72e1c05672b9d03aced90;p=mirrors%2FFD230.git 安全模式:增加修复下载runtime --- diff --git a/code/sdk/drivers/peripheral/utils/custom_runtime.c b/code/sdk/drivers/peripheral/utils/custom_runtime.c index 7bba0bfa6..ae683852a 100644 --- a/code/sdk/drivers/peripheral/utils/custom_runtime.c +++ b/code/sdk/drivers/peripheral/utils/custom_runtime.c @@ -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) { diff --git a/code/sdk/drivers/peripheral/utils/custom_runtime.h b/code/sdk/drivers/peripheral/utils/custom_runtime.h index 8d2880b1b..3395e9250 100644 --- a/code/sdk/drivers/peripheral/utils/custom_runtime.h +++ b/code/sdk/drivers/peripheral/utils/custom_runtime.h @@ -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);