2013-06-18 17:21:38 +02:00
|
|
|
/**
|
2013-06-22 05:11:53 +02:00
|
|
|
* Auto initialization for used modules
|
2013-06-18 17:21:38 +02:00
|
|
|
*
|
|
|
|
* Copyright (C) 2013 INRIA.
|
|
|
|
*
|
|
|
|
* This file subject to the terms and conditions of the GNU Lesser General
|
|
|
|
* Public License. See the file LICENSE in the top level directory for more
|
|
|
|
* details.
|
|
|
|
*
|
|
|
|
* @ingroup auto_init
|
|
|
|
* @{
|
|
|
|
* @file auto_init_c
|
|
|
|
* @brief initializes any used module that has a trivial init function
|
|
|
|
* @author Oliver Hahm <oliver.hahm@inria.fr>
|
|
|
|
* @}
|
|
|
|
*/
|
2010-09-22 15:10:42 +02:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdio.h>
|
2013-10-27 17:23:25 +01:00
|
|
|
|
|
|
|
#include "auto_init.h"
|
|
|
|
|
|
|
|
#ifdef MODULE_UART0
|
2011-12-12 17:50:22 +01:00
|
|
|
#include "board_uart0.h"
|
2013-10-27 17:23:25 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef MODULE_MCI
|
2011-12-12 17:50:22 +01:00
|
|
|
#include "diskio.h"
|
2013-10-27 17:23:25 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef MODULE_VTIMER
|
2012-05-22 15:59:36 +02:00
|
|
|
#include "vtimer.h"
|
2013-10-27 17:23:25 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef MODULE_RTC
|
|
|
|
#include "rtc.h"
|
|
|
|
#endif
|
2010-09-22 15:10:42 +02:00
|
|
|
|
2013-07-25 21:55:49 +02:00
|
|
|
#define ENABLE_DEBUG (0)
|
2013-10-27 17:23:25 +01:00
|
|
|
#include "debug.h"
|
2010-09-22 15:10:42 +02:00
|
|
|
|
2013-06-09 18:02:58 +02:00
|
|
|
extern int main(void);
|
2010-09-22 15:10:42 +02:00
|
|
|
|
2013-06-22 05:11:53 +02:00
|
|
|
void auto_init(void)
|
|
|
|
{
|
2010-12-14 16:40:47 +01:00
|
|
|
#ifdef MODULE_BOARD_DISPLAY
|
2010-12-15 12:43:15 +01:00
|
|
|
extern void lcd_init();
|
2010-12-14 16:40:47 +01:00
|
|
|
lcd_init();
|
|
|
|
DEBUG("DISP OK");
|
|
|
|
#endif
|
|
|
|
#ifdef MODULE_DISPLAY_PUTCHAR
|
2010-12-15 12:43:15 +01:00
|
|
|
extern void init_display_putchar();
|
2010-12-14 16:40:47 +01:00
|
|
|
init_display_putchar();
|
|
|
|
DEBUG("DISP OK");
|
|
|
|
#endif
|
2010-09-22 15:10:42 +02:00
|
|
|
#ifdef MODULE_HWTIMER
|
|
|
|
DEBUG("Auto init hwtimer module.\n");
|
|
|
|
hwtimer_init();
|
|
|
|
#endif
|
2012-05-22 15:59:36 +02:00
|
|
|
#ifdef MODULE_VTIMER
|
|
|
|
DEBUG("Auto init vtimer module.\n");
|
|
|
|
vtimer_init();
|
|
|
|
#endif
|
2010-11-04 14:12:05 +01:00
|
|
|
#ifdef MODULE_UART0
|
|
|
|
DEBUG("Auto init uart0 module.\n");
|
|
|
|
board_uart0_init();
|
|
|
|
#endif
|
2010-11-04 18:16:39 +01:00
|
|
|
#ifdef MODULE_RTC
|
|
|
|
DEBUG("Auto init rtc module.\n");
|
|
|
|
rtc_init();
|
|
|
|
rtc_enable();
|
|
|
|
#endif
|
2010-09-22 15:10:42 +02:00
|
|
|
#ifdef MODULE_SHT11
|
|
|
|
DEBUG("Auto init SHT11 module.\n");
|
|
|
|
sht11_init();
|
|
|
|
#endif
|
|
|
|
#ifdef MODULE_GPIOINT
|
|
|
|
DEBUG("Auto init gpioint module.\n");
|
|
|
|
gpioint_init();
|
|
|
|
#endif
|
|
|
|
#ifdef MODULE_CC110X
|
|
|
|
DEBUG("Auto init CC1100 module.\n");
|
|
|
|
cc1100_init();
|
|
|
|
#endif
|
|
|
|
#ifdef MODULE_LTC4150
|
|
|
|
DEBUG("Auto init ltc4150 module.\n");
|
|
|
|
ltc4150_init();
|
2011-01-31 18:25:20 +01:00
|
|
|
#endif
|
2011-12-12 17:50:22 +01:00
|
|
|
#ifdef MODULE_MCI
|
|
|
|
DEBUG("Auto init mci module.\n");
|
|
|
|
MCI_initialize();
|
|
|
|
#endif
|
2011-01-31 18:25:20 +01:00
|
|
|
#ifdef MODULE_PROFILING
|
|
|
|
extern void profiling_init(void);
|
|
|
|
profiling_init();
|
2010-09-22 15:10:42 +02:00
|
|
|
#endif
|
|
|
|
main();
|
|
|
|
}
|