timing: guard the header with CONFIG_TIMING_FUNCTIONS

The arch_timing_* are not defined if timing functions are not
enabled, which results in compiler warnings about implicit
function declarations. So guard the header with its own
kconfig so the header can be unconditionally included by
other enough though timing functions are not enabled.

Note this is done inside the doxygen @defgroup or else
doc build would fail as timing_api group cannot be found.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2021-03-31 14:10:21 -07:00 committed by Anas Nashif
commit 70d0a1b6ef

View file

@ -39,6 +39,7 @@ uint32_t board_timing_freq_get_mhz(void);
* @{
*/
#ifdef CONFIG_TIMING_FUNCTIONS
/**
* @brief Initialize the timing subsystem.
@ -168,7 +169,10 @@ static inline uint32_t timing_freq_get_mhz(void)
#endif
}
#endif /* CONFIG_TIMING_FUNCTIONS */
/**
* @}
*/
#endif /* ZEPHYR_INCLUDE_TIMING_TIMING_H_ */