优化hx3508效果(补) 2728/1 2728/head 2729/target/1
authorpenglei <1624952103@qq.com>
Wed, 12 Nov 2025 09:28:41 +0000 (17:28 +0800)
committerpenglei <1624952103@qq.com>
Wed, 12 Nov 2025 09:28:41 +0000 (17:28 +0800)
code/sdk/zhihui/drivers/rotary_encoder/hx3508/hx3508.c
code/sdk/zhihui/drivers/rotary_encoder/mixo/mixo_ots_driver.c

index dc94513..1568405 100644 (file)
@@ -515,6 +515,7 @@ void ots_data_handler(void *p_event_data, uint16_t event_size)
             // printf("hx3508 enter int mode\n");
             ots_timer_stop();           // 关闭定时器
             uapi_pin_set_ie(INT_PIN,HAL_PIO_IE_ENBALE);
+            timer_cnt = 0;
         }
         if (stand_still == 0) 
         {
index 2364c34..12e00b2 100644 (file)
@@ -104,6 +104,7 @@ void mixo_ots_timer_callback(void)
              * 必须放在 external_int_init 之前去做
              * 否则可能造成功耗异常的问题
              */
+            timer_cnt = 0;
             mixo_ots_forced_clear_int();  // 强制拉高MOT脚
             int_mode = 1;
         }