Skip to content

Commit 41caa2a

Browse files
kernel: hooks: make definitions appear in Doxygen
The hooks' signature was not visible to Doxygen due to preprocessor conditionals - instead, the dummy no-op implementation was seen instead. Update #ifdef guard to make the hooks' signature and the associated documentation visible to Doxygen such that it appears in docs. Also fix a tiny typo on soc_reset_hook()'s documentation comment. Signed-off-by: Mathieu Choplain <[email protected]>
1 parent 16f4d6c commit 41caa2a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

include/zephyr/platform/hooks.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
*/
2121

2222

23-
#ifdef CONFIG_SOC_RESET_HOOK
23+
#if defined(CONFIG_SOC_RESET_HOOK) || defined(__DOXYGEN__)
2424
/**
25-
* @brief SoC hook executed at the beginning of the reset vector.
25+
* @brief SoC hook executed at the beginning of the reset vector.
2626
*
2727
* This hook is implemented by the SoC and can be used to perform any
2828
* SoC-specific initialization.
@@ -32,7 +32,7 @@ void soc_reset_hook(void);
3232
#define soc_reset_hook() do { } while (0)
3333
#endif
3434

35-
#ifdef CONFIG_SOC_PREP_HOOK
35+
#if defined(CONFIG_SOC_PREP_HOOK) || defined(__DOXYGEN__)
3636
/**
3737
* @brief SoC hook executed after the reset vector.
3838
*
@@ -44,7 +44,7 @@ void soc_prep_hook(void);
4444
#define soc_prep_hook() do { } while (0)
4545
#endif
4646

47-
#ifdef CONFIG_SOC_EARLY_INIT_HOOK
47+
#if defined(CONFIG_SOC_EARLY_INIT_HOOK) || defined(__DOXYGEN__)
4848
/**
4949
* @brief SoC hook executed before the kernel and devices are initialized.
5050
*
@@ -56,7 +56,7 @@ void soc_early_init_hook(void);
5656
#define soc_early_init_hook() do { } while (0)
5757
#endif
5858

59-
#ifdef CONFIG_SOC_LATE_INIT_HOOK
59+
#if defined(CONFIG_SOC_LATE_INIT_HOOK) || defined(__DOXYGEN__)
6060
/**
6161
* @brief SoC hook executed after the kernel and devices are initialized.
6262
*
@@ -68,7 +68,7 @@ void soc_late_init_hook(void);
6868
#define soc_late_init_hook() do { } while (0)
6969
#endif
7070

71-
#ifdef CONFIG_SOC_PER_CORE_INIT_HOOK
71+
#if defined(CONFIG_SOC_PER_CORE_INIT_HOOK) || defined(__DOXYGEN__)
7272
/**
7373
* @brief SoC per-core initialization
7474
*
@@ -80,7 +80,7 @@ void soc_per_core_init_hook(void);
8080
#define soc_per_core_init_hook() do { } while (0)
8181
#endif
8282

83-
#ifdef CONFIG_BOARD_EARLY_INIT_HOOK
83+
#if defined(CONFIG_BOARD_EARLY_INIT_HOOK) || defined(__DOXYGEN__)
8484
/**
8585
* @brief Board hook executed before the kernel starts.
8686
*
@@ -93,7 +93,7 @@ void board_early_init_hook(void);
9393
#define board_early_init_hook() do { } while (0)
9494
#endif
9595

96-
#ifdef CONFIG_BOARD_LATE_INIT_HOOK
96+
#if defined(CONFIG_BOARD_LATE_INIT_HOOK) || defined(__DOXYGEN__)
9797
/**
9898
* @brief Board hook executed after the kernel starts.
9999
*

0 commit comments

Comments
 (0)