amiro-os / modules / STM32F4Discovery / board.h @ f1f56ad4
History | View | Annotate | Download (85.503 KB)
1 | 07ff44a7 | Thomas Schöpping | /*
|
---|---|---|---|
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 | /*
|
||
18 | * This file has been automatically generated using ChibiStudio board
|
||
19 | * generator plugin. Do not edit manually.
|
||
20 | */
|
||
21 | |||
22 | #ifndef BOARD_H
|
||
23 | #define BOARD_H
|
||
24 | |||
25 | /*===========================================================================*/
|
||
26 | /* Driver constants. */
|
||
27 | /*===========================================================================*/
|
||
28 | |||
29 | /*
|
||
30 | * Setup for STMicroelectronics STM32F4-Discovery board.
|
||
31 | */
|
||
32 | |||
33 | /*
|
||
34 | * Board identifier.
|
||
35 | */
|
||
36 | #define BOARD_ST_STM32F4_DISCOVERY
|
||
37 | #define BOARD_NAME "STMicroelectronics STM32F4-Discovery" |
||
38 | |||
39 | /*
|
||
40 | * Board oscillators-related settings.
|
||
41 | * NOTE: LSE not fitted.
|
||
42 | */
|
||
43 | #if !defined(STM32_LSECLK)
|
||
44 | #define STM32_LSECLK 0U |
||
45 | #endif
|
||
46 | |||
47 | #if !defined(STM32_HSECLK)
|
||
48 | #define STM32_HSECLK 8000000U |
||
49 | #endif
|
||
50 | |||
51 | /*
|
||
52 | * Board voltages.
|
||
53 | * Required for performance limits calculation.
|
||
54 | */
|
||
55 | #define STM32_VDD 300U |
||
56 | |||
57 | /*
|
||
58 | * MCU type as defined in the ST header.
|
||
59 | */
|
||
60 | #define STM32F407xx
|
||
61 | |||
62 | /*
|
||
63 | * IO pins assignments.
|
||
64 | */
|
||
65 | #define GPIOA_BUTTON 0U |
||
66 | #define GPIOA_PIN1 1U |
||
67 | #define GPIOA_PIN2 2U |
||
68 | #define GPIOA_PIN3 3U |
||
69 | #define GPIOA_LRCK 4U |
||
70 | #define GPIOA_SPC 5U |
||
71 | #define GPIOA_SDO 6U |
||
72 | #define GPIOA_SDI 7U |
||
73 | #define GPIOA_PIN8 8U |
||
74 | #define GPIOA_VBUS_FS 9U |
||
75 | #define GPIOA_OTG_FS_ID 10U |
||
76 | #define GPIOA_OTG_FS_DM 11U |
||
77 | #define GPIOA_OTG_FS_DP 12U |
||
78 | #define GPIOA_SWDIO 13U |
||
79 | #define GPIOA_SWCLK 14U |
||
80 | #define GPIOA_PIN15 15U |
||
81 | |||
82 | #define GPIOB_PIN0 0U |
||
83 | #define GPIOB_PIN1 1U |
||
84 | #define GPIOB_PIN2 2U |
||
85 | #define GPIOB_SWO 3U |
||
86 | #define GPIOB_PIN4 4U |
||
87 | #define GPIOB_PIN5 5U |
||
88 | #define GPIOB_SCL 6U |
||
89 | #define GPIOB_PIN7 7U |
||
90 | #define GPIOB_PIN8 8U |
||
91 | #define GPIOB_SDA 9U |
||
92 | #define GPIOB_CLK_IN 10U |
||
93 | #define GPIOB_PIN11 11U |
||
94 | #define GPIOB_PIN12 12U |
||
95 | #define GPIOB_PIN13 13U |
||
96 | #define GPIOB_PIN14 14U |
||
97 | #define GPIOB_PIN15 15U |
||
98 | |||
99 | #define GPIOC_OTG_FS_POWER_ON 0U |
||
100 | #define GPIOC_PIN1 1U |
||
101 | #define GPIOC_PIN2 2U |
||
102 | #define GPIOC_PDM_OUT 3U |
||
103 | #define GPIOC_PIN4 4U |
||
104 | #define GPIOC_PIN5 5U |
||
105 | #define GPIOC_PIN6 6U |
||
106 | #define GPIOC_MCLK 7U |
||
107 | #define GPIOC_PIN8 8U |
||
108 | #define GPIOC_PIN9 9U |
||
109 | #define GPIOC_SCLK 10U |
||
110 | #define GPIOC_PIN11 11U |
||
111 | #define GPIOC_SDIN 12U |
||
112 | #define GPIOC_PIN13 13U |
||
113 | #define GPIOC_PIN14 14U |
||
114 | #define GPIOC_PIN15 15U |
||
115 | |||
116 | #define GPIOD_PIN0 0U |
||
117 | #define GPIOD_PIN1 1U |
||
118 | #define GPIOD_PIN2 2U |
||
119 | #define GPIOD_PIN3 3U |
||
120 | #define GPIOD_RESET 4U |
||
121 | #define GPIOD_OVER_CURRENT 5U |
||
122 | #define GPIOD_PIN6 6U |
||
123 | #define GPIOD_PIN7 7U |
||
124 | #define GPIOD_PIN8 8U |
||
125 | #define GPIOD_PIN9 9U |
||
126 | #define GPIOD_PIN10 10U |
||
127 | #define GPIOD_PIN11 11U |
||
128 | #define GPIOD_LED4 12U |
||
129 | #define GPIOD_LED3 13U |
||
130 | #define GPIOD_LED5 14U |
||
131 | #define GPIOD_LED6 15U |
||
132 | |||
133 | #define GPIOE_INT1 0U |
||
134 | #define GPIOE_INT2 1U |
||
135 | #define GPIOE_PIN2 2U |
||
136 | #define GPIOE_CS_SPI 3U |
||
137 | #define GPIOE_PIN4 4U |
||
138 | #define GPIOE_PIN5 5U |
||
139 | #define GPIOE_PIN6 6U |
||
140 | #define GPIOE_PIN7 7U |
||
141 | #define GPIOE_PIN8 8U |
||
142 | #define GPIOE_PIN9 9U |
||
143 | #define GPIOE_PIN10 10U |
||
144 | #define GPIOE_PIN11 11U |
||
145 | #define GPIOE_PIN12 12U |
||
146 | #define GPIOE_PIN13 13U |
||
147 | #define GPIOE_PIN14 14U |
||
148 | #define GPIOE_PIN15 15U |
||
149 | |||
150 | #define GPIOF_PIN0 0U |
||
151 | #define GPIOF_PIN1 1U |
||
152 | #define GPIOF_PIN2 2U |
||
153 | #define GPIOF_PIN3 3U |
||
154 | #define GPIOF_PIN4 4U |
||
155 | #define GPIOF_PIN5 5U |
||
156 | #define GPIOF_PIN6 6U |
||
157 | #define GPIOF_PIN7 7U |
||
158 | #define GPIOF_PIN8 8U |
||
159 | #define GPIOF_PIN9 9U |
||
160 | #define GPIOF_PIN10 10U |
||
161 | #define GPIOF_PIN11 11U |
||
162 | #define GPIOF_PIN12 12U |
||
163 | #define GPIOF_PIN13 13U |
||
164 | #define GPIOF_PIN14 14U |
||
165 | #define GPIOF_PIN15 15U |
||
166 | |||
167 | #define GPIOG_PIN0 0U |
||
168 | #define GPIOG_PIN1 1U |
||
169 | #define GPIOG_PIN2 2U |
||
170 | #define GPIOG_PIN3 3U |
||
171 | #define GPIOG_PIN4 4U |
||
172 | #define GPIOG_PIN5 5U |
||
173 | #define GPIOG_PIN6 6U |
||
174 | #define GPIOG_PIN7 7U |
||
175 | #define GPIOG_PIN8 8U |
||
176 | #define GPIOG_PIN9 9U |
||
177 | #define GPIOG_PIN10 10U |
||
178 | #define GPIOG_PIN11 11U |
||
179 | #define GPIOG_PIN12 12U |
||
180 | #define GPIOG_PIN13 13U |
||
181 | #define GPIOG_PIN14 14U |
||
182 | #define GPIOG_PIN15 15U |
||
183 | |||
184 | #define GPIOH_OSC_IN 0U |
||
185 | #define GPIOH_OSC_OUT 1U |
||
186 | #define GPIOH_PIN2 2U |
||
187 | #define GPIOH_PIN3 3U |
||
188 | #define GPIOH_PIN4 4U |
||
189 | #define GPIOH_PIN5 5U |
||
190 | #define GPIOH_PIN6 6U |
||
191 | #define GPIOH_PIN7 7U |
||
192 | #define GPIOH_PIN8 8U |
||
193 | #define GPIOH_PIN9 9U |
||
194 | #define GPIOH_PIN10 10U |
||
195 | #define GPIOH_PIN11 11U |
||
196 | #define GPIOH_PIN12 12U |
||
197 | #define GPIOH_PIN13 13U |
||
198 | #define GPIOH_PIN14 14U |
||
199 | #define GPIOH_PIN15 15U |
||
200 | |||
201 | #define GPIOI_PIN0 0U |
||
202 | #define GPIOI_PIN1 1U |
||
203 | #define GPIOI_PIN2 2U |
||
204 | #define GPIOI_PIN3 3U |
||
205 | #define GPIOI_PIN4 4U |
||
206 | #define GPIOI_PIN5 5U |
||
207 | #define GPIOI_PIN6 6U |
||
208 | #define GPIOI_PIN7 7U |
||
209 | #define GPIOI_PIN8 8U |
||
210 | #define GPIOI_PIN9 9U |
||
211 | #define GPIOI_PIN10 10U |
||
212 | #define GPIOI_PIN11 11U |
||
213 | #define GPIOI_PIN12 12U |
||
214 | #define GPIOI_PIN13 13U |
||
215 | #define GPIOI_PIN14 14U |
||
216 | #define GPIOI_PIN15 15U |
||
217 | |||
218 | /*
|
||
219 | * IO lines assignments.
|
||
220 | */
|
||
221 | #define LINE_BUTTON PAL_LINE(GPIOA, 0U) |
||
222 | #define LINE_LRCK PAL_LINE(GPIOA, 4U) |
||
223 | #define LINE_SPC PAL_LINE(GPIOA, 5U) |
||
224 | #define LINE_SDO PAL_LINE(GPIOA, 6U) |
||
225 | #define LINE_SDI PAL_LINE(GPIOA, 7U) |
||
226 | #define LINE_VBUS_FS PAL_LINE(GPIOA, 9U) |
||
227 | #define LINE_OTG_FS_ID PAL_LINE(GPIOA, 10U) |
||
228 | #define LINE_OTG_FS_DM PAL_LINE(GPIOA, 11U) |
||
229 | #define LINE_OTG_FS_DP PAL_LINE(GPIOA, 12U) |
||
230 | #define LINE_SWDIO PAL_LINE(GPIOA, 13U) |
||
231 | #define LINE_SWCLK PAL_LINE(GPIOA, 14U) |
||
232 | #define LINE_S |