aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/src
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/src')
-rw-r--r--os/hal/src/adc.c2
-rw-r--r--os/hal/src/can.c2
-rw-r--r--os/hal/src/hal.c60
-rw-r--r--os/hal/src/mac.c2
-rw-r--r--os/hal/src/mmc_spi.c2
-rw-r--r--os/hal/src/pal.c2
-rw-r--r--os/hal/src/serial.c2
-rw-r--r--os/hal/src/spi.c2
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.