kernel: Do not use fixed list of "good" sys_clock_ticks_per_sec values.
This commit removes fixed list of "good" sys_clock_ticks_per_sec values which usage results in integer _ms_per_tick value. Instead of using the list, simply check if MSEC_PER_SEC could be divided without remainder by sys_clock_ticks_per_sec. Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
This commit is contained in:
parent
fe2ac39bf2
commit
e995c27b42
1 changed files with 1 additions and 10 deletions
|
@ -1319,16 +1319,7 @@ __syscall void *k_thread_custom_data_get(void);
|
|||
|
||||
/* kernel clocks */
|
||||
|
||||
#if (sys_clock_ticks_per_sec == 1000) || \
|
||||
(sys_clock_ticks_per_sec == 500) || \
|
||||
(sys_clock_ticks_per_sec == 250) || \
|
||||
(sys_clock_ticks_per_sec == 125) || \
|
||||
(sys_clock_ticks_per_sec == 100) || \
|
||||
(sys_clock_ticks_per_sec == 50) || \
|
||||
(sys_clock_ticks_per_sec == 25) || \
|
||||
(sys_clock_ticks_per_sec == 20) || \
|
||||
(sys_clock_ticks_per_sec == 10) || \
|
||||
(sys_clock_ticks_per_sec == 1)
|
||||
#if (MSEC_PER_SEC % sys_clock_ticks_per_sec) == 0
|
||||
|
||||
#define _ms_per_tick (MSEC_PER_SEC / sys_clock_ticks_per_sec)
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue