From 70d0a1b6ef237a9b630d36d253bb6624d9021547 Mon Sep 17 00:00:00 2001 From: Daniel Leung Date: Wed, 31 Mar 2021 14:10:21 -0700 Subject: [PATCH] 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 --- include/timing/timing.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/timing/timing.h b/include/timing/timing.h index e46ac3f4d43..4892b07bc39 100644 --- a/include/timing/timing.h +++ b/include/timing/timing.h @@ -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_ */