diff options
Diffstat (limited to 'lib/chibios/os/hal/boards/DIGISPARK_ATTINY_167/board.c')
-rw-r--r-- | lib/chibios/os/hal/boards/DIGISPARK_ATTINY_167/board.c | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/lib/chibios/os/hal/boards/DIGISPARK_ATTINY_167/board.c b/lib/chibios/os/hal/boards/DIGISPARK_ATTINY_167/board.c new file mode 100644 index 000000000..c50b440cb --- /dev/null +++ b/lib/chibios/os/hal/boards/DIGISPARK_ATTINY_167/board.c | |||
@@ -0,0 +1,72 @@ | |||
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 | #if defined(PORTA) | ||
28 | {VAL_PORTA, VAL_DDRA}, | ||
29 | #endif | ||
30 | #if defined(PORTB) | ||
31 | {VAL_PORTB, VAL_DDRB}, | ||
32 | #endif | ||
33 | #if defined(PORTC) | ||
34 | {VAL_PORTC, VAL_DDRC}, | ||
35 | #endif | ||
36 | #if defined(PORTD) | ||
37 | {VAL_PORTD, VAL_DDRD}, | ||
38 | #endif | ||
39 | #if defined(PORTE) | ||
40 | {VAL_PORTE, VAL_DDRE}, | ||
41 | #endif | ||
42 | #if defined(PORTF) | ||
43 | {VAL_PORTF, VAL_DDRF}, | ||
44 | #endif | ||
45 | #if defined(PORTG) | ||
46 | {VAL_PORTG, VAL_DDRG}, | ||
47 | #endif | ||
48 | #if defined(PORTH) | ||
49 | {VAL_PORTH, VAL_DDRH}, | ||
50 | #endif | ||
51 | #if defined(PORTJ) | ||
52 | {VAL_PORTJ, VAL_DDRJ}, | ||
53 | #endif | ||
54 | #if defined(PORTK) | ||
55 | {VAL_PORTK, VAL_DDRK}, | ||
56 | #endif | ||
57 | #if defined(PORTL) | ||
58 | {VAL_PORTL, VAL_DDRL}, | ||
59 | #endif | ||
60 | }; | ||
61 | #endif /* HAL_USE_PAL */ | ||
62 | |||
63 | /** | ||
64 | * Board-specific initialization code. | ||
65 | */ | ||
66 | void boardInit(void) { | ||
67 | |||
68 | /* | ||
69 | * External interrupts setup, all disabled initially. | ||
70 | */ | ||
71 | cli(); | ||
72 | } | ||