Paparazzi UAS  v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
board.c
Go to the documentation of this file.
1 /*
2  ChibiOS - Copyright (C) 2006..2015 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 
24 #if HAL_USE_PAL || defined(__DOXYGEN__)
25 const PALConfig pal_default_config =
26 {
32 };
33 #endif
34 
35 /*
36  * Early initialization code.
37  * This initialization must be performed just after stack setup and before
38  * any other initialization.
39  */
40 void __early_init(void) {
41 
42  stm32_clock_init();
43 }
44 
45 /*
46  * Board-specific initialization code.
47  */
48 void boardInit(void) {
49  /*
50  * Several I/O pins are re-mapped:
51  * JTAG TRST to LED
52  */
53  AFIO->MAPR |= AFIO_MAPR_USART3_REMAP_PARTIALREMAP | AFIO_MAPR_SWJ_CFG_NOJNTRST | AFIO_MAPR_TIM3_REMAP_FULLREMAP;
54 }
#define VAL_GPIOBCRH
Definition: board.h:125
#define VAL_GPIOAODR
Definition: board.h:101
#define VAL_GPIOECRL
Definition: board.h:178
void __early_init(void)
Early initialization code.
Definition: board.c:70
#define VAL_GPIOECRH
Definition: board.h:179
#define VAL_GPIOCODR
Definition: board.h:149
#define VAL_GPIOACRH
Definition: board.h:100
#define VAL_GPIOACRL
Definition: board.h:99
#define VAL_GPIOCCRH
Definition: board.h:148
#define VAL_GPIODCRH
Definition: board.h:171
#define VAL_GPIOBCRL
Definition: board.h:124
#define VAL_GPIODODR
Definition: board.h:172
void boardInit(void)
Board-specific initialization code.
Definition: board.c:122
#define VAL_GPIODCRL
Definition: board.h:170
#define VAL_GPIOCCRL
Definition: board.h:147
#define VAL_GPIOEODR
Definition: board.h:180
#define VAL_GPIOBODR
Definition: board.h:126