diff options
Diffstat (limited to 'lib/chibios-contrib/os/hal/boards/TI_TM4C123G_LAUNCHPAD/board.c')
-rw-r--r-- | lib/chibios-contrib/os/hal/boards/TI_TM4C123G_LAUNCHPAD/board.c | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/lib/chibios-contrib/os/hal/boards/TI_TM4C123G_LAUNCHPAD/board.c b/lib/chibios-contrib/os/hal/boards/TI_TM4C123G_LAUNCHPAD/board.c new file mode 100644 index 000000000..870b4cb71 --- /dev/null +++ b/lib/chibios-contrib/os/hal/boards/TI_TM4C123G_LAUNCHPAD/board.c | |||
@@ -0,0 +1,71 @@ | |||
1 | /* | ||
2 | Copyright (C) 2014..2017 Marco Veeneman | ||
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_DATA, VAL_GPIOA_DIR, VAL_GPIOA_AFSEL, VAL_GPIOA_DR2R, | ||
28 | VAL_GPIOA_DR4R, VAL_GPIOA_DR8R, VAL_GPIOA_ODR, VAL_GPIOA_PUR, | ||
29 | VAL_GPIOA_PDR, VAL_GPIOA_SLR, VAL_GPIOA_DEN, VAL_GPIOA_AMSEL, | ||
30 | VAL_GPIOA_PCTL}, | ||
31 | {VAL_GPIOB_DATA, VAL_GPIOB_DIR, VAL_GPIOB_AFSEL, VAL_GPIOB_DR2R, | ||
32 | VAL_GPIOB_DR4R, VAL_GPIOB_DR8R, VAL_GPIOB_ODR, VAL_GPIOB_PUR, | ||
33 | VAL_GPIOB_PDR, VAL_GPIOB_SLR, VAL_GPIOB_DEN, VAL_GPIOB_AMSEL, | ||
34 | VAL_GPIOB_PCTL}, | ||
35 | {VAL_GPIOC_DATA, VAL_GPIOC_DIR, VAL_GPIOC_AFSEL, VAL_GPIOC_DR2R, | ||
36 | VAL_GPIOC_DR4R, VAL_GPIOC_DR8R, VAL_GPIOC_ODR, VAL_GPIOC_PUR, | ||
37 | VAL_GPIOC_PDR, VAL_GPIOC_SLR, VAL_GPIOC_DEN, VAL_GPIOC_AMSEL, | ||
38 | VAL_GPIOC_PCTL}, | ||
39 | {VAL_GPIOD_DATA, VAL_GPIOD_DIR, VAL_GPIOD_AFSEL, VAL_GPIOD_DR2R, | ||
40 | VAL_GPIOD_DR4R, VAL_GPIOD_DR8R, VAL_GPIOD_ODR, VAL_GPIOD_PUR, | ||
41 | VAL_GPIOD_PDR, VAL_GPIOD_SLR, VAL_GPIOD_DEN, VAL_GPIOD_AMSEL, | ||
42 | VAL_GPIOD_PCTL}, | ||
43 | {VAL_GPIOE_DATA, VAL_GPIOE_DIR, VAL_GPIOE_AFSEL, VAL_GPIOE_DR2R, | ||
44 | VAL_GPIOE_DR4R, VAL_GPIOE_DR8R, VAL_GPIOE_ODR, VAL_GPIOE_PUR, | ||
45 | VAL_GPIOE_PDR, VAL_GPIOE_SLR, VAL_GPIOE_DEN, VAL_GPIOE_AMSEL, | ||
46 | VAL_GPIOE_PCTL}, | ||
47 | {VAL_GPIOF_DATA, VAL_GPIOF_DIR, VAL_GPIOF_AFSEL, VAL_GPIOF_DR2R, | ||
48 | VAL_GPIOF_DR4R, VAL_GPIOF_DR8R, VAL_GPIOF_ODR, VAL_GPIOF_PUR, | ||
49 | VAL_GPIOF_PDR, VAL_GPIOF_SLR, VAL_GPIOF_DEN, VAL_GPIOF_AMSEL, | ||
50 | VAL_GPIOF_PCTL} | ||
51 | }; | ||
52 | #endif | ||
53 | |||
54 | /** | ||
55 | * @brief Early initialization code. | ||
56 | * @details This initialization is performed just after reset before BSS and | ||
57 | * DATA segments initialization. | ||
58 | */ | ||
59 | void __early_init(void) | ||
60 | { | ||
61 | tiva_clock_init(); | ||
62 | } | ||
63 | |||
64 | /** | ||
65 | * @brief Late initialization code. | ||
66 | * @note This initialization is performed after BSS and DATA segments | ||
67 | * initialization and before invoking the main() function. | ||
68 | */ | ||
69 | void boardInit(void) | ||
70 | { | ||
71 | } | ||