init: document SYS_INIT and SYS_INIT_PM

Change-Id: Ia0c72e445dc8434e1162cb131e95ea136beca419
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2016-09-07 14:51:32 -07:00
commit a498d46b87

View file

@ -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, \