diff options
Diffstat (limited to 'lib/chibios/os/hal/boards/OLIMEX_LPC_P1227/board.c')
-rw-r--r-- | lib/chibios/os/hal/boards/OLIMEX_LPC_P1227/board.c | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/lib/chibios/os/hal/boards/OLIMEX_LPC_P1227/board.c b/lib/chibios/os/hal/boards/OLIMEX_LPC_P1227/board.c new file mode 100644 index 000000000..81656d4e3 --- /dev/null +++ b/lib/chibios/os/hal/boards/OLIMEX_LPC_P1227/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 | {VAL_GPIO0DATA, VAL_GPIO0DIR}, | ||
27 | {VAL_GPIO1DATA, VAL_GPIO1DIR}, | ||
28 | {VAL_GPIO2DATA, VAL_GPIO2DIR}, | ||
29 | }; | ||
30 | #endif | ||
31 | |||
32 | /* | ||
33 | * Early initialization code. | ||
34 | * This initialization must be performed just after stack setup and before | ||
35 | * any other initialization. | ||
36 | */ | ||
37 | void __early_init(void) { | ||
38 | |||
39 | lpc122x_clock_init(); | ||
40 | } | ||
41 | |||
42 | /* | ||
43 | * Board-specific initialization code. | ||
44 | */ | ||
45 | void boardInit(void) { | ||
46 | |||
47 | /* | ||
48 | * Extra, board-specific, initializations. | ||
49 | */ | ||
50 | LPC_IOCON->PIO1_4 = 0x80; /* Disables pull-up on LED2 output. */ | ||
51 | LPC_IOCON->PIO1_5 = 0x80; /* Disables pull-up on LED1 output */ | ||
52 | LPC_IOCON->PIO1_6 = 0x80; /* Disables pull-up on Buzzer output */ | ||
53 | } | ||