添加省电模式接口(暂不完善) 109/1 109/head
authorpenglei <1624952103@qq.com>
Sun, 28 Apr 2024 13:02:37 +0000 (21:02 +0800)
committerpenglei <1624952103@qq.com>
Sun, 28 Apr 2024 13:02:37 +0000 (21:02 +0800)
code/sdk/drivers/peripheral/utils/custom_utils.c

index 6549d36..195c7d6 100644 (file)
@@ -1556,3 +1556,33 @@ uint32_t uapi_calendar_recover_date(void)
     return ret;
 }
 
+void uapi_enter_power_saving_mode(void)
+{
+    PRINT("Enter Power Saving Mode !!! \r\n");
+    //关闭蓝牙
+    stop_custom_ble_service();
+
+    //关闭cat1
+    uapi_cat1_power_on(0);
+    uapi_cat1_reset(1);
+
+    //停止心率周期检测
+    
+    //进入normal模式
+    do_cywee_service_check_msg(CYWEE_SERVICE_CMD_NORMAL_MODE,NULL);
+
+    //关闭音乐
+}
+
+void uapi_exit_power_saving_mode(void)
+{
+    PRINT("Exit Power Saving Mode !!! \r\n");
+    //打开蓝牙
+    start_custom_ble_service();
+
+    //打开cat1
+    uapi_cat1_power_on(1);
+    uapi_cat1_reset(0);
+
+    //开启心率周期检测
+}
\ No newline at end of file