diff options
| author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-05-15 17:01:41 +0000 | 
|---|---|---|
| committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-05-15 17:01:41 +0000 | 
| commit | e0b177423e1b14ab942fbf40b79d60d13ae02eb5 (patch) | |
| tree | cf8a4b6ed8e6c67c9d541aabfba02a2dc63d4324 /boards/ST_STM32F0_DISCOVERY/board.c | |
| parent | 3654758ac274654c051e6b4f401b9a3d71326b83 (diff) | |
| download | ChibiOS-e0b177423e1b14ab942fbf40b79d60d13ae02eb5.tar.gz ChibiOS-e0b177423e1b14ab942fbf40b79d60d13ae02eb5.tar.bz2 ChibiOS-e0b177423e1b14ab942fbf40b79d60d13ae02eb5.zip | |
Initial STM32F0xx support.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4198 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'boards/ST_STM32F0_DISCOVERY/board.c')
| -rw-r--r-- | boards/ST_STM32F0_DISCOVERY/board.c | 54 | 
1 files changed, 54 insertions, 0 deletions
| diff --git a/boards/ST_STM32F0_DISCOVERY/board.c b/boards/ST_STM32F0_DISCOVERY/board.c new file mode 100644 index 000000000..025050af4 --- /dev/null +++ b/boards/ST_STM32F0_DISCOVERY/board.c @@ -0,0 +1,54 @@ +/*
 +    ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
 +                 2011,2012 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/>.
 +*/
 +
 +#include "ch.h"
 +#include "hal.h"
 +
 +/**
 + * @brief   PAL setup.
 + * @details Digital I/O ports static configuration as defined in @p board.h.
 + *          This variable is used by the HAL when initializing the PAL driver.
 + */
 +#if HAL_USE_PAL || defined(__DOXYGEN__)
 +const PALConfig pal_default_config =
 +{
 +  {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH},
 +  {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH},
 +  {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH},
 +  {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH},
 +  {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}
 +};
 +#endif
 +
 +/*
 + * Early initialization code.
 + * This initialization must be performed just after stack setup and before
 + * any other initialization.
 + */
 +void __early_init(void) {
 +
 +  stm32_clock_init();
 +}
 +
 +/*
 + * Board-specific initialization code.
 + */
 +void boardInit(void) {
 +}
 | 
