diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-11-29 10:37:31 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-11-29 10:37:31 +0000 |
commit | f90ae4d17df24cd6477f2557bc86ef9433e93414 (patch) | |
tree | 32ffb2543a1e07f5773278748542cc69d45f210a /os/hal/src | |
parent | d477d161e3846b0b8256995638b78c5c090ac0f2 (diff) | |
download | ChibiOS-f90ae4d17df24cd6477f2557bc86ef9433e93414.tar.gz ChibiOS-f90ae4d17df24cd6477f2557bc86ef9433e93414.tar.bz2 ChibiOS-f90ae4d17df24cd6477f2557bc86ef9433e93414.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1354 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/src')
-rw-r--r-- | os/hal/src/adc.c | 2 | ||||
-rw-r--r-- | os/hal/src/can.c | 2 | ||||
-rw-r--r-- | os/hal/src/hal.c | 60 | ||||
-rw-r--r-- | os/hal/src/mac.c | 2 | ||||
-rw-r--r-- | os/hal/src/mmc_spi.c | 2 | ||||
-rw-r--r-- | os/hal/src/pal.c | 2 | ||||
-rw-r--r-- | os/hal/src/serial.c | 2 | ||||
-rw-r--r-- | os/hal/src/spi.c | 2 |
8 files changed, 67 insertions, 7 deletions
diff --git a/os/hal/src/adc.c b/os/hal/src/adc.c index c074c0224..afa464212 100644 --- a/os/hal/src/adc.c +++ b/os/hal/src/adc.c @@ -27,7 +27,7 @@ #include "ch.h"
#include "hal.h"
-#if CH_HAL_USE_ADC
+#if CH_HAL_USE_ADC || defined(__DOXYGEN__)
/**
* @brief ADC Driver initialization.
diff --git a/os/hal/src/can.c b/os/hal/src/can.c index bb3e0d1a5..387581d8c 100644 --- a/os/hal/src/can.c +++ b/os/hal/src/can.c @@ -27,7 +27,7 @@ #include "ch.h"
#include "hal.h"
-#if CH_HAL_USE_CAN
+#if CH_HAL_USE_CAN || defined(__DOXYGEN__)
/**
* @brief CAN Driver initialization.
diff --git a/os/hal/src/hal.c b/os/hal/src/hal.c new file mode 100644 index 000000000..864789858 --- /dev/null +++ b/os/hal/src/hal.c @@ -0,0 +1,60 @@ +/*
+ ChibiOS/RT - Copyright (C) 2006-2007 Giovanni Di Sirio.
+
+ This file is part of ChibiOS/RT.
+
+ ChibiOS/RT is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ ChibiOS/RT is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/**
+ * @file hal.c
+ * @brief HAL subsystem code.
+ * @addtogroup HAL
+ * @{
+ */
+
+#include "ch.h"
+#include "hal.h"
+
+/**
+ * @brief HAL initialization. + */
+void halInit(void) {
+
+ hal_lld_init();
+
+#if CH_HAL_USE_PAL
+ palInit(&pal_default_config);
+#endif
+#if CH_HAL_USE_ADC
+ adcInit();
+#endif
+#if CH_HAL_USE_CAN
+ canInit();
+#endif
+#if CH_HAL_USE_MAC
+ macInit();
+#endif
+#if CH_HAL_USE_SERIAL
+ sdInit();
+#endif
+#if CH_HAL_USE_SPI
+ spiInit();
+#endif
+#if CH_HAL_USE_MMC_SPI
+ mmcInit();
+#endif
+}
+
+/** @} */
diff --git a/os/hal/src/mac.c b/os/hal/src/mac.c index 8dfb400aa..a18d3e4df 100644 --- a/os/hal/src/mac.c +++ b/os/hal/src/mac.c @@ -27,7 +27,7 @@ #include "ch.h"
#include "hal.h"
-#if CH_HAL_USE_MAC
+#if CH_HAL_USE_MAC || defined(__DOXYGEN__)
/**
* @brief MAC Driver initialization. diff --git a/os/hal/src/mmc_spi.c b/os/hal/src/mmc_spi.c index 7846da353..24abf2a2b 100644 --- a/os/hal/src/mmc_spi.c +++ b/os/hal/src/mmc_spi.c @@ -27,7 +27,7 @@ #include "ch.h"
#include "hal.h"
-#if CH_HAL_USE_MMC_SPI
+#if CH_HAL_USE_MMC_SPI || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver local functions. */
diff --git a/os/hal/src/pal.c b/os/hal/src/pal.c index 1f9d058d5..53cfeb1f0 100644 --- a/os/hal/src/pal.c +++ b/os/hal/src/pal.c @@ -27,7 +27,7 @@ #include "ch.h"
#include "hal.h"
-#if CH_HAL_USE_PAL
+#if CH_HAL_USE_PAL || defined(__DOXYGEN__)
/**
* @brief Read from an I/O bus.
diff --git a/os/hal/src/serial.c b/os/hal/src/serial.c index 2944a98ab..d2cb17c77 100644 --- a/os/hal/src/serial.c +++ b/os/hal/src/serial.c @@ -27,7 +27,7 @@ #include "ch.h"
#include "hal.h"
-#if CH_HAL_USE_SERIAL
+#if CH_HAL_USE_SERIAL || defined(__DOXYGEN__)
/*
* Interface implementation, the following functions just invoke the equivalent
diff --git a/os/hal/src/spi.c b/os/hal/src/spi.c index 8b8ea6f32..08113a000 100644 --- a/os/hal/src/spi.c +++ b/os/hal/src/spi.c @@ -27,7 +27,7 @@ #include "ch.h"
#include "hal.h"
-#if CH_HAL_USE_SPI
+#if CH_HAL_USE_SPI || defined(__DOXYGEN__)
/**
* @brief SPI Driver initialization.
|