From a498d46b87a4b6847a04fe7e1126a4b9416fef65 Mon Sep 17 00:00:00 2001 From: Andrew Boie Date: Wed, 7 Sep 2016 14:51:32 -0700 Subject: [PATCH] init: document SYS_INIT and SYS_INIT_PM Change-Id: Ia0c72e445dc8434e1162cb131e95ea136beca419 Signed-off-by: Andrew Boie --- include/init.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/include/init.h b/include/init.h index a98a78eed65..78cb780f403 100644 --- a/include/init.h +++ b/include/init.h @@ -38,9 +38,34 @@ extern "C" { #define _SYS_INIT_LEVEL_MICROKERNEL 3 #define _SYS_INIT_LEVEL_APPLICATION 4 +/** + * @def SYS_INIT + * + * @brief Run an initailization function at boot at specified priority + * + * @details This macro lets you run a function at system boot. + * + * @param init_fn Pointer to the boot function to run + * + * @param level The initialization level, See DEVICE_INIT for details. + * + * @param prio Priority within the selected initialization level. See + * DEVICE_INIT for details. + */ #define SYS_INIT(init_fn, level, prio) \ DEVICE_INIT(sys_init_##init_fn, "", init_fn, NULL, NULL, level, prio) +/** + * @def SYS_INIT_PM + * + * @brief Run an initailization function at boot at specified priority, + * and define functions to run at suspend/resume. + * + * @copydetails SYS_INIT + * @param device_pm_ops Pointer to power management functions. + * @param drv_name Name of this system device + */ + #ifdef CONFIG_DEVICE_POWER_MANAGEMENT #define SYS_INIT_PM(drv_name, init_fn, device_pm_ops, level, prio) \ DEVICE_INIT_PM(sys_init_##init_fn, drv_name, init_fn, device_pm_ops, \