include: sys_clock: Fix compilation when SYS_CLOCK_EXISTS is disabled
If `CONFIG_SYS_CLOCK_EXISTS=n`, then `CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC` will likely not be defined at all. Fix the compilation by moving the check for it being `== 0` to a separate preprocessor #if statement. Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit is contained in:
parent
97cdedec80
commit
03f46db859
1 changed files with 4 additions and 3 deletions
|
@ -162,10 +162,11 @@ typedef struct {
|
|||
/** @endcond */
|
||||
|
||||
#ifndef CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME
|
||||
#if defined(CONFIG_SYS_CLOCK_EXISTS) && \
|
||||
(CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC == 0)
|
||||
#if defined(CONFIG_SYS_CLOCK_EXISTS)
|
||||
#if CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC == 0
|
||||
#error "SYS_CLOCK_HW_CYCLES_PER_SEC must be non-zero!"
|
||||
#endif
|
||||
#endif /* CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC == 0 */
|
||||
#endif /* CONFIG_SYS_CLOCK_EXISTS */
|
||||
#endif /* CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME */
|
||||
|
||||
/* kernel clocks */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue