ChibiOS/RT Architecture - Reference Manual - Guides |
00001 /* 00002 ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio. 00003 00004 This file is part of ChibiOS/RT. 00005 00006 ChibiOS/RT is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 3 of the License, or 00009 (at your option) any later version. 00010 00011 ChibiOS/RT is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program. If not, see <http://www.gnu.org/licenses/>. 00018 00019 --- 00020 00021 A special exception to the GPL can be applied should you wish to distribute 00022 a combined work that includes ChibiOS/RT, without being obliged to provide 00023 the source code for any proprietary components. See the file exception.txt 00024 for full details of how and when the exception can be applied. 00025 */ 00026 00027 /** 00028 * @file hal.c 00029 * @brief HAL subsystem code. 00030 * 00031 * @addtogroup HAL 00032 * @{ 00033 */ 00034 00035 #include "ch.h" 00036 #include "hal.h" 00037 00038 /*===========================================================================*/ 00039 /* Driver exported variables. */ 00040 /*===========================================================================*/ 00041 00042 /*===========================================================================*/ 00043 /* Driver local variables. */ 00044 /*===========================================================================*/ 00045 00046 /*===========================================================================*/ 00047 /* Driver local functions. */ 00048 /*===========================================================================*/ 00049 00050 /*===========================================================================*/ 00051 /* Driver exported functions. */ 00052 /*===========================================================================*/ 00053 00054 /** 00055 * @brief HAL initialization. 00056 */ 00057 void halInit(void) { 00058 00059 hal_lld_init(); 00060 00061 #if CH_HAL_USE_PAL 00062 palInit(&pal_default_config); 00063 #endif 00064 #if CH_HAL_USE_ADC 00065 adcInit(); 00066 #endif 00067 #if CH_HAL_USE_CAN 00068 canInit(); 00069 #endif 00070 #if CH_HAL_USE_MAC 00071 macInit(); 00072 #endif 00073 #if CH_HAL_USE_PWM 00074 pwmInit(); 00075 #endif 00076 #if CH_HAL_USE_SERIAL 00077 sdInit(); 00078 #endif 00079 #if CH_HAL_USE_SPI 00080 spiInit(); 00081 #endif 00082 #if CH_HAL_USE_MMC_SPI 00083 mmcInit(); 00084 #endif 00085 } 00086 00087 /** @} */