2014-09-16 13:09:14 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2010 Freie Universität Berlin
|
|
|
|
* Copyright (C) 2010 Kaspar Schleiser
|
|
|
|
* Copyright (C) 2013 INRIA
|
|
|
|
*
|
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
* directory for more details.
|
|
|
|
*/
|
|
|
|
|
2013-11-27 16:28:31 +01:00
|
|
|
|
|
|
|
/**
|
2013-11-27 17:54:30 +01:00
|
|
|
* @defgroup sys_autoinit Auto-init
|
|
|
|
* @ingroup sys
|
2013-12-15 11:48:44 +01:00
|
|
|
* @brief Auto initialize modules
|
2014-02-10 15:28:55 +01:00
|
|
|
* @note This feature can be used by any application by adding auto_init to
|
|
|
|
* USEMODULE in the application's Makefile. auto_init will initialize
|
2013-12-15 11:48:44 +01:00
|
|
|
* any other included module that does not require a parameter in
|
|
|
|
* its init function, i.e. if the prototype looks like this: void
|
|
|
|
* MODULE_init(void). Most timer modules or simple drivers can be
|
|
|
|
* initialized by auto_init. The modules will be initialized in
|
|
|
|
* the context of the main thread right before the main function
|
|
|
|
* gets called. Be aware that most modules expect to be
|
|
|
|
* initialized only once, so do not call a module's init function
|
|
|
|
* when using auto_init unless you know what you're doing.
|
|
|
|
*
|
2013-11-27 17:54:30 +01:00
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file auto_init.h
|
2013-11-27 16:28:31 +01:00
|
|
|
*/
|
|
|
|
|
2010-09-22 15:10:42 +02:00
|
|
|
#ifndef AUTO_INIT_H
|
|
|
|
#define AUTO_INIT_H
|
|
|
|
|
2014-10-10 11:51:11 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2014-12-05 18:51:38 +01:00
|
|
|
/**
|
|
|
|
* @brief Initializes all high level modules that do not require parameters for
|
|
|
|
* initialization or uses default values.
|
|
|
|
*
|
|
|
|
* This function gets called - if not explicitely disabled - by @ref
|
|
|
|
* kernel_init right before jumping into @e main.
|
|
|
|
*/
|
2010-09-22 15:10:42 +02:00
|
|
|
void auto_init(void);
|
|
|
|
|
2014-10-10 11:51:11 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2013-11-27 17:54:30 +01:00
|
|
|
/** @} */
|
|
|
|
#endif /* AUTO_INIT_H */
|