From 5102fff8a13c0319d8125a51d3d2354e7aacdcea Mon Sep 17 00:00:00 2001 From: chen <15335560115@163.com> Date: 星期四, 31 七月 2025 16:40:06 +0800 Subject: [PATCH] 修改为2HZ发poll包,修改second task从原来2s一次为1s一次 --- keil/include/drivers/mk_sleep_timer.h | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/keil/include/drivers/mk_sleep_timer.h b/keil/include/drivers/mk_sleep_timer.h index 077cfe1..8b62086 100644 --- a/keil/include/drivers/mk_sleep_timer.h +++ b/keil/include/drivers/mk_sleep_timer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2023 Beijing Hanwei Innovation Technology Ltd. Co. and + * Copyright (c) 2019-2025 Beijing Hanwei Innovation Technology Ltd. Co. and * its subsidiaries and affiliates (collectly called MKSEMI). * * All rights reserved. @@ -57,8 +57,9 @@ struct SLEEP_TIMER_HANDLE_T { enum SLEEP_TIMER_MODE_T mode; + uint16_t enable; + uint16_t int_en; uint32_t time; - uint32_t int_en; int32_t ppm; drv_callback_t callback; }; @@ -67,13 +68,15 @@ extern "C" { #endif +extern struct SLEEP_TIMER_HANDLE_T sleep_timer_handle; + void sleep_timer_open(bool int_en, enum SLEEP_TIMER_MODE_T mode, drv_callback_t callback); void sleep_timer_close(void); void sleep_timer_start(uint32_t time); void sleep_timer_stop(void); -uint32_t high_xtal_off_time(void); +uint32_t xtal_38m4_off_time(void); void sleep_timer_ppm_set(int32_t ppm); int32_t sleep_timer_ppm_get(void); -- Gitblit v1.9.3