From: SnickerSun Date: Fri, 27 Sep 2024 02:04:35 +0000 (+0800) Subject: #666 优化抬腕亮屏时间 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=6f21ad7acbef7e3d5ab708fa8e03683df4bead41;p=mirrors%2FFD230.git #666 优化抬腕亮屏时间 --- diff --git a/code/sdk/application/wearable/service/power_manager/src/actions/display_action.c b/code/sdk/application/wearable/service/power_manager/src/actions/display_action.c index 3f48ddef2..6a7278575 100755 --- a/code/sdk/application/wearable/service/power_manager/src/actions/display_action.c +++ b/code/sdk/application/wearable/service/power_manager/src/actions/display_action.c @@ -161,12 +161,13 @@ static uint32_t action_display_lcd_on() #ifdef SUPPORT_CAT1_SERVICE uapi_cat1_resume(); #endif - + #if defined(ENABLE_UIKIT) || defined(ENABLE_LVGL) NotifyScreenOn(); // Instruct the uikit to start the display operation. #endif if ((g_pms_lcd_on_first_flag == false) && (g_pms_dpu_ready == false)) { - touch_screen_resume(); // open touch + // touch_screen_resume();// open touch/ + post_func_to_graphic(touch_screen_resume); // open touch 太耗时,放到GraphicService里延迟执行,加快亮屏速度。 rotary_encoder_resume(); } #ifdef CONFIG_CLDO1PD_SUPPORT diff --git a/code/sdk/drivers/peripheral/rotary_encoder/rotary_encoder_drv.c b/code/sdk/drivers/peripheral/rotary_encoder/rotary_encoder_drv.c index 9a28d599c..203298865 100644 --- a/code/sdk/drivers/peripheral/rotary_encoder/rotary_encoder_drv.c +++ b/code/sdk/drivers/peripheral/rotary_encoder/rotary_encoder_drv.c @@ -462,13 +462,13 @@ void rotary_encoder_resume(void) void encoder_suspend_for_i2c(void) { - re_err("encoder_suspend_for_i2c ----------succ!!!\n"); + // re_err("encoder_suspend_for_i2c ----------succ!!!\n"); // i2c_save_reg(TOUCH_I2C_BUS); } void encoder_resume_for_i2c(void) { - re_err("encoder_resume_for_i2c ----------succ!!!\n"); + // re_err("encoder_resume_for_i2c ----------succ!!!\n"); // i2c_recovery_reg(TOUCH_I2C_BUS); } diff --git a/code/sdk/drivers/peripheral/utilscpp/custom_utilscpp.cpp b/code/sdk/drivers/peripheral/utilscpp/custom_utilscpp.cpp index ecad63122..d69ebce6c 100644 --- a/code/sdk/drivers/peripheral/utilscpp/custom_utilscpp.cpp +++ b/code/sdk/drivers/peripheral/utilscpp/custom_utilscpp.cpp @@ -326,6 +326,26 @@ void custom_set_volume(uint8_t channel,int32_t sounding) } +/** + * input: + * func 函数指针 + * return: + * ERRCODE_FAIL + * ERRCODE_SUCC +*/ +errcode_t post_func_to_graphic(void (*func)(void)) +{ + + if (func == NULL) + { + return ERRCODE_FAIL; + } + + GraphicService::GetInstance()->PostGraphicEvent(func); + + return ERRCODE_SUCC; + +} #ifdef __cplusplus } diff --git a/code/sdk/drivers/peripheral/utilscpp/custom_utilscpp.h b/code/sdk/drivers/peripheral/utilscpp/custom_utilscpp.h index b41868610..cf9732347 100644 --- a/code/sdk/drivers/peripheral/utilscpp/custom_utilscpp.h +++ b/code/sdk/drivers/peripheral/utilscpp/custom_utilscpp.h @@ -1,8 +1,8 @@ /* * @Author: penglei 1624952103@qq.com * @Date: 2024-07-09 20:22:54 - * @LastEditors: penglei 1624952103@qq.com - * @LastEditTime: 2024-08-10 12:13:13 + * @LastEditors: SnickerSun snickersun@163.com + * @LastEditTime: 2024-09-27 09:40:39 * @FilePath: /FD230/code/sdk/drivers/peripheral/utilscpp/custom_utilscpp.h * @Description: * @@ -29,6 +29,18 @@ void uapi_dump_meminfo(void); void CustomEventPublish(uint16_t topic, uint8_t *data , uint32_t size); void custom_set_volume(uint8_t channel,int32_t sounding); + + + +/** + * input: + * func 函数指针 + * return: + * ERRCODE_FAIL + * ERRCODE_SUCC +*/ +errcode_t post_func_to_graphic(void (*func)(void)); + #ifdef __cplusplus } #endif /* __cplusplus */