diff options
Diffstat (limited to 'lib/chibios/os/hal/boards/ARDUINO_LEONARDO/board.h')
-rw-r--r-- | lib/chibios/os/hal/boards/ARDUINO_LEONARDO/board.h | 127 |
1 files changed, 127 insertions, 0 deletions
diff --git a/lib/chibios/os/hal/boards/ARDUINO_LEONARDO/board.h b/lib/chibios/os/hal/boards/ARDUINO_LEONARDO/board.h new file mode 100644 index 000000000..5ebbc7ebd --- /dev/null +++ b/lib/chibios/os/hal/boards/ARDUINO_LEONARDO/board.h | |||
@@ -0,0 +1,127 @@ | |||
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 | #ifndef _BOARD_H_ | ||
18 | #define _BOARD_H_ | ||
19 | |||
20 | /* | ||
21 | * Setup for the Arduino Leonardo board. | ||
22 | */ | ||
23 | |||
24 | /* | ||
25 | * Board identifier. | ||
26 | */ | ||
27 | #define BOARD_ARDUINO_LEONARDO | ||
28 | #define BOARD_NAME "Arduino Leonardo" | ||
29 | |||
30 | /* | ||
31 | * IO pins assignments. | ||
32 | */ | ||
33 | #define BOARD_LED1 7 | ||
34 | |||
35 | /* | ||
36 | * IO lines assignments. | ||
37 | */ | ||
38 | #define LINE_LED1 PAL_LINE(IOPORT3, 7U) | ||
39 | |||
40 | /* | ||
41 | * Port A setup. | ||
42 | * All inputs with pull-ups. | ||
43 | */ | ||
44 | #define VAL_DDRA 0x00 | ||
45 | #define VAL_PORTA 0xFF | ||
46 | |||
47 | /* | ||
48 | * Port B setup. | ||
49 | * All inputs with pull-ups. | ||
50 | */ | ||
51 | #define VAL_DDRB 0x00 | ||
52 | #define VAL_PORTB 0xFF | ||
53 | |||
54 | /* | ||
55 | * Port C setup. | ||
56 | * All inputs except PC7 which has a LED connected. | ||
57 | */ | ||
58 | #define VAL_DDRC 0x80 | ||
59 | #define VAL_PORTC 0xFF | ||
60 | |||
61 | /* | ||
62 | * Port D setup. | ||
63 | * All inputs with pull-ups except PD5, TXLED. | ||
64 | */ | ||
65 | #define VAL_DDRD 0x10 | ||
66 | #define VAL_PORTD 0xFF | ||
67 | |||
68 | /* | ||
69 | * Port E setup. | ||
70 | * All inputs with pull-ups. | ||
71 | */ | ||
72 | #define VAL_DDRE 0x00 | ||
73 | #define VAL_PORTE 0xFF | ||
74 | |||
75 | /* | ||
76 | * Port F setup. | ||
77 | * All inputs with pull-ups. | ||
78 | */ | ||
79 | #define VAL_DDRF 0x00 | ||
80 | #define VAL_PORTF 0xFF | ||
81 | |||
82 | /* | ||
83 | * Port G setup. | ||
84 | * All inputs with pull-ups. | ||
85 | */ | ||
86 | #define VAL_DDRG 0x00 | ||
87 | #define VAL_PORTG 0xFF | ||
88 | |||
89 | /* | ||
90 | * Port H setup. | ||
91 | * All inputs with pull-ups. | ||
92 | */ | ||
93 | #define VAL_DDRH 0x00 | ||
94 | #define VAL_PORTH 0xFF | ||
95 | |||
96 | /* | ||
97 | * Port J setup. | ||
98 | * All inputs with pull-ups. | ||
99 | */ | ||
100 | #define VAL_DDRJ 0x00 | ||
101 | #define VAL_PORTJ 0xFF | ||
102 | |||
103 | /* | ||
104 | * Port K setup. | ||
105 | * All inputs with pull-ups. | ||
106 | */ | ||
107 | #define VAL_DDRK 0x00 | ||
108 | #define VAL_PORTK 0xFF | ||
109 | |||
110 | /* | ||
111 | * Port L setup. | ||
112 | * All inputs with pull-ups. | ||
113 | */ | ||
114 | #define VAL_DDRL 0x00 | ||
115 | #define VAL_PORTL 0xFF | ||
116 | |||
117 | #if !defined(_FROM_ASM_) | ||
118 | #ifdef __cplusplus | ||
119 | extern "C" { | ||
120 | #endif | ||
121 | void boardInit(void); | ||
122 | #ifdef __cplusplus | ||
123 | } | ||
124 | #endif | ||
125 | #endif /* _FROM_ASM_ */ | ||
126 | |||
127 | #endif /* _BOARD_H_ */ | ||