drivers: timer: native_posix: Support SYSTEM_CLOCK_DISABLE
Add support for CONFIG_SYSTEM_CLOCK_DISABLE so applications may be compiled with CONFIG_REBOOT. Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
This commit is contained in:
parent
8eb51a309d
commit
ba4a01e8ff
@ -133,3 +133,19 @@ void k_busy_wait(u32_t usec_to_wait)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SYSTEM_CLOCK_DISABLE)
|
||||
/**
|
||||
*
|
||||
* @brief Stop announcing sys ticks into the kernel
|
||||
*
|
||||
* Disable the system ticks generation
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void sys_clock_disable(void)
|
||||
{
|
||||
irq_disable(TIMER_TICK_IRQ);
|
||||
hwtimer_set_silent_ticks(INT64_MAX);
|
||||
}
|
||||
#endif /* CONFIG_SYSTEM_CLOCK_DISABLE */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user