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:
parent
20d85fefe9
commit
a498d46b87
1 changed files with 25 additions and 0 deletions
|
@ -38,9 +38,34 @@ extern "C" {
|
||||||
#define _SYS_INIT_LEVEL_MICROKERNEL 3
|
#define _SYS_INIT_LEVEL_MICROKERNEL 3
|
||||||
#define _SYS_INIT_LEVEL_APPLICATION 4
|
#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) \
|
#define SYS_INIT(init_fn, level, prio) \
|
||||||
DEVICE_INIT(sys_init_##init_fn, "", init_fn, NULL, NULL, 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
|
#ifdef CONFIG_DEVICE_POWER_MANAGEMENT
|
||||||
#define SYS_INIT_PM(drv_name, init_fn, device_pm_ops, level, prio) \
|
#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, \
|
DEVICE_INIT_PM(sys_init_##init_fn, drv_name, init_fn, device_pm_ops, \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue