[src][tick]rt_tick setting arbitrary value function is added to support low-power wake-up tick compensation

This commit is contained in:
wdfk-prog
2024-07-11 09:28:41 +08:00
committed by Rbb666
parent 7c1d205a4e
commit 8d3ad68caf
4 changed files with 60 additions and 17 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023-2024, RT-Thread Development Team
* Copyright (c) 2023-2024 RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -157,7 +157,7 @@ void rt_sched_thread_startup(struct rt_thread *thread);
/* scheduler related routine */
void rt_sched_post_ctx_switch(struct rt_thread *thread);
rt_err_t rt_sched_tick_increase(void);
rt_err_t rt_sched_tick_increase(rt_tick_t tick);
/* thread status operation */
rt_uint8_t rt_sched_thread_get_stat(struct rt_thread *thread);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
* Copyright (c) 2006-2024 RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -100,6 +100,7 @@ void rt_object_put_sethook(void (*hook)(struct rt_object *object));
rt_tick_t rt_tick_get(void);
void rt_tick_set(rt_tick_t tick);
void rt_tick_increase(void);
void rt_tick_increase_tick(rt_tick_t tick);
rt_tick_t rt_tick_from_millisecond(rt_int32_t ms);
rt_tick_t rt_tick_get_millisecond(void);
#ifdef RT_USING_HOOK