timer: legacy_api: Fix a build dependency in legacy_api header
z_timer_idle_enter is declared only when CONFIG_TICKLESS_IDLE is selected. This function is not implemented anywhere, but the only driver including this header is not TICKLESS_CAPABLE. So, no undefined reference will happen. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
1dd2d414b8
commit
c408765d70
1 changed files with 2 additions and 2 deletions
|
@ -30,13 +30,13 @@ extern uint64_t z_clock_uptime(void);
|
||||||
|
|
||||||
void z_clock_set_timeout(int32_t ticks, bool idle)
|
void z_clock_set_timeout(int32_t ticks, bool idle)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_TICKLESS_KERNEL
|
#if defined(CONFIG_TICKLESS_IDLE) && defined(CONFIG_TICKLESS_KERNEL)
|
||||||
if (idle) {
|
if (idle) {
|
||||||
z_timer_idle_enter(ticks);
|
z_timer_idle_enter(ticks);
|
||||||
} else {
|
} else {
|
||||||
z_set_time(ticks == K_TICKS_FOREVER ? 0 : ticks);
|
z_set_time(ticks == K_TICKS_FOREVER ? 0 : ticks);
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* TICKLESS_IDLE && TICKLESS_KERNEL */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The old driver "now" API would return a full uptime value. The new
|
/* The old driver "now" API would return a full uptime value. The new
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue