From c53ab581d013dda28ba43d3cdc60124cc2c3e013 Mon Sep 17 00:00:00 2001 From: chenjintao Date: Tue, 13 Oct 2026 16:10:00 +0800 Subject: [PATCH] fix: queue sleep prompt before entering sleep mode --- ql-application/threadx/interface/custom_app/sleep_wake.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ql-application/threadx/interface/custom_app/sleep_wake.c b/ql-application/threadx/interface/custom_app/sleep_wake.c index 0ef87cb..358af80 100644 --- a/ql-application/threadx/interface/custom_app/sleep_wake.c +++ b/ql-application/threadx/interface/custom_app/sleep_wake.c @@ -102,9 +102,13 @@ void enter_sleep_mode(void) if (g_in_sleep_mode) return; printf("enter_sleep_mode\r\n"); + /* 先排入休眠提示音,再设置交互休眠标志;提示音入口会拦截休眠状态。 + * 播放线程会唤醒音频芯片,播放结束后由原有空闲计时进入低功耗。 */ + int prompt_ret = app_play_tips_file(12); g_in_sleep_mode = 1; - - app_play_tips_file(12); + if (prompt_ret != 0) { + printf("sleep prompt queue failed:ret=%d\r\n", prompt_ret); + } } /**