diff options
Diffstat (limited to 'lib/chibios/os/hal/boards/ST_STM3220G_EVAL/board.c')
-rw-r--r-- | lib/chibios/os/hal/boards/ST_STM3220G_EVAL/board.c | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/lib/chibios/os/hal/boards/ST_STM3220G_EVAL/board.c b/lib/chibios/os/hal/boards/ST_STM3220G_EVAL/board.c new file mode 100644 index 000000000..64f137830 --- /dev/null +++ b/lib/chibios/os/hal/boards/ST_STM3220G_EVAL/board.c | |||
@@ -0,0 +1,53 @@ | |||
1 | /* | ||
2 | ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio | ||
3 | |||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | you may not use this file except in compliance with the License. | ||
6 | You may obtain a copy of the License at | ||
7 | |||
8 | http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | |||
10 | Unless required by applicable law or agreed to in writing, software | ||
11 | distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | See the License for the specific language governing permissions and | ||
14 | limitations under the License. | ||
15 | */ | ||
16 | |||
17 | #include "hal.h" | ||
18 | |||
19 | /** | ||
20 | * @brief PAL setup. | ||
21 | * @details Digital I/O ports static configuration as defined in @p board.h. | ||
22 | * This variable is used by the HAL when initializing the PAL driver. | ||
23 | */ | ||
24 | #if HAL_USE_PAL || defined(__DOXYGEN__) | ||
25 | const PALConfig pal_default_config = | ||
26 | { | ||
27 | {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, | ||
28 | {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, | ||
29 | {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, | ||
30 | {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, | ||
31 | {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, | ||
32 | {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, | ||
33 | {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, | ||
34 | {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, | ||
35 | {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} | ||
36 | }; | ||
37 | #endif | ||
38 | |||
39 | /* | ||
40 | * Early initialization code. | ||
41 | * This initialization must be performed just after stack setup and before | ||
42 | * any other initialization. | ||
43 | */ | ||
44 | void __early_init(void) { | ||
45 | |||
46 | stm32_clock_init(); | ||
47 | } | ||
48 | |||
49 | /* | ||
50 | * Board-specific initialization code. | ||
51 | */ | ||
52 | void boardInit(void) { | ||
53 | } | ||