Skip to content

Commit cd68f5f

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 0520dfe commit cd68f5f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

include/zephyr/platform/hooks.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* directly from application code but may be freely used within the OS.
2020
*/
2121

22-
#ifdef CONFIG_SOC_EARLY_RESET_HOOK
22+
#if defined(CONFIG_SOC_EARLY_RESET_HOOK) || defined(__DOXYGEN__)
2323
/**
2424
* @brief SoC hook executed before data RAM initialization, at the beginning
2525
* of the reset vector.
@@ -33,9 +33,9 @@ void soc_early_reset_hook(void);
3333
#define soc_early_reset_hook() do { } while (0)
3434
#endif
3535

36-
#ifdef CONFIG_SOC_RESET_HOOK
36+
#if defined(CONFIG_SOC_RESET_HOOK) || defined(__DOXYGEN__)
3737
/**
38-
* @brief SoC hook executed at the beginning of the reset vector.
38+
* @brief SoC hook executed at the beginning of the reset vector.
3939
*
4040
* This hook is implemented by the SoC and can be used to perform any
4141
* SoC-specific initialization.
@@ -45,7 +45,7 @@ void soc_reset_hook(void);
4545
#define soc_reset_hook() do { } while (0)
4646
#endif
4747

48-
#ifdef CONFIG_SOC_PREP_HOOK
48+
#if defined(CONFIG_SOC_PREP_HOOK) || defined(__DOXYGEN__)
4949
/**
5050
* @brief SoC hook executed after the reset vector.
5151
*
@@ -57,7 +57,7 @@ void soc_prep_hook(void);
5757
#define soc_prep_hook() do { } while (0)
5858
#endif
5959

60-
#ifdef CONFIG_SOC_EARLY_INIT_HOOK
60+
#if defined(CONFIG_SOC_EARLY_INIT_HOOK) || defined(__DOXYGEN__)
6161
/**
6262
* @brief SoC hook executed before the kernel and devices are initialized.
6363
*
@@ -69,7 +69,7 @@ void soc_early_init_hook(void);
6969
#define soc_early_init_hook() do { } while (0)
7070
#endif
7171

72-
#ifdef CONFIG_SOC_LATE_INIT_HOOK
72+
#if defined(CONFIG_SOC_LATE_INIT_HOOK) || defined(__DOXYGEN__)
7373
/**
7474
* @brief SoC hook executed after the kernel and devices are initialized.
7575
*
@@ -81,7 +81,7 @@ void soc_late_init_hook(void);
8181
#define soc_late_init_hook() do { } while (0)
8282
#endif
8383

84-
#ifdef CONFIG_SOC_PER_CORE_INIT_HOOK
84+
#if defined(CONFIG_SOC_PER_CORE_INIT_HOOK) || defined(__DOXYGEN__)
8585
/**
8686
* @brief SoC per-core initialization
8787
*
@@ -93,7 +93,7 @@ void soc_per_core_init_hook(void);
9393
#define soc_per_core_init_hook() do { } while (0)
9494
#endif
9595

96-
#ifdef CONFIG_BOARD_EARLY_INIT_HOOK
96+
#if defined(CONFIG_BOARD_EARLY_INIT_HOOK) || defined(__DOXYGEN__)
9797
/**
9898
* @brief Board hook executed before the kernel starts.
9999
*
@@ -106,7 +106,7 @@ void board_early_init_hook(void);
106106
#define board_early_init_hook() do { } while (0)
107107
#endif
108108

109-
#ifdef CONFIG_BOARD_LATE_INIT_HOOK
109+
#if defined(CONFIG_BOARD_LATE_INIT_HOOK) || defined(__DOXYGEN__)
110110
/**
111111
* @brief Board hook executed after the kernel starts.
112112
*

0 commit comments

Comments
 (0)