优化3507停止流程,保证其能正常休眠。
authorSnickerSun <snickersun@163.com>
Tue, 26 Mar 2024 11:54:44 +0000 (19:54 +0800)
committerSnickerSun <snickersun@163.com>
Tue, 26 Mar 2024 11:54:44 +0000 (19:54 +0800)
code/sdk/drivers/peripheral/rotary_encoder/hx3507/hx3507.c

index d466c8e..965283c 100644 (file)
@@ -1,4 +1,4 @@
-/**
+/**,.
  * Copyright (c) @CompanyNameMagicTag 2023-2023. All rights reserved. \n
  *
  * Description: Button driver source file \n
@@ -97,7 +97,7 @@ void crown_timer_creat(void)
 void crown_timer_start(void)
 {
      if(osTimerIsRunning(g_hx3507_timer)==0)
-        osTimerStart(g_hx3507_timer, 50);
+        osTimerStart(g_hx3507_timer, 40);
 }
 
 /**
@@ -518,6 +518,7 @@ void crown_stop(void)
 {
 #ifdef MOT_NO_USE_MODE
     crown_timer_stop();
+    LOS_Mdelay(50);
     crown_write_reg(Config_St,0x89); // power down, power down 后芯片功耗9uA
     LOS_Mdelay(20);
     TYHX_LOG("[tyhx_crown_stop]\r\n");