amiro-os / modules / LightRing_1-2 / board.h @ 4e8e8462
History | View | Annotate | Download (42.997 KB)
1 |
/*
|
---|---|
2 |
AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
|
3 |
Copyright (C) 2016..2020 Thomas Schöpping et al.
|
4 |
|
5 |
This program is free software: you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License as published by
|
7 |
the Free Software Foundation, either version 3 of the License, or
|
8 |
(at your option) any later version.
|
9 |
|
10 |
This program is distributed in the hope that it will be useful,
|
11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 |
GNU General Public License for more details.
|
14 |
|
15 |
You should have received a copy of the GNU General Public License
|
16 |
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
17 |
*/
|
18 |
|
19 |
/**
|
20 |
* @file
|
21 |
* @brief LightRing v1.2 Board specific macros.
|
22 |
*
|
23 |
* @addtogroup lightring_board
|
24 |
* @{
|
25 |
*/
|
26 |
|
27 |
#ifndef BOARD_H
|
28 |
#define BOARD_H
|
29 |
|
30 |
/*===========================================================================*/
|
31 |
/* Driver constants. */
|
32 |
/*===========================================================================*/
|
33 |
|
34 |
/*
|
35 |
* Setup for AMiRo LightRing v1.2 board.
|
36 |
*/
|
37 |
|
38 |
/*
|
39 |
* Board identifier.
|
40 |
*/
|
41 |
#define BOARD_LIGHTRING_1_2
|
42 |
#define BOARD_NAME "AMiRo LightRing v1.2" |
43 |
|
44 |
/*
|
45 |
* Board oscillators-related settings.
|
46 |
* NOTE: LSE not fitted.
|
47 |
*/
|
48 |
#if !defined(STM32_LSECLK)
|
49 |
#define STM32_LSECLK 0U |
50 |
#endif
|
51 |
|
52 |
#if !defined(STM32_HSECLK)
|
53 |
#define STM32_HSECLK 8000000U |
54 |
#endif
|
55 |
|
56 |
/*
|
57 |
* Board voltages.
|
58 |
* Required for performance limits calculation.
|
59 |
*/
|
60 |
#define STM32_VDD 330U |
61 |
|
62 |
/*
|
63 |
* MCU type as defined in the ST header.
|
64 |
*/
|
65 |
#define STM32F103xE
|
66 |
|
67 |
/*
|
68 |
* Identifiers for the several breakout modules, which can be attached to the LightRing v1.2 module.
|
69 |
*/
|
70 |
#define BOARD_BREAKOUT_NONE -1 |
71 |
#define BOARD_BREAKOUT_UWBv10 1 |
72 |
|
73 |
/*
|
74 |
* Configuration macro to define which breakout module is attached.
|
75 |
*/
|
76 |
#if !defined(BOARD_BREAKOUT_MODULE) || defined(__DOXYGEN__)
|
77 |
#define BOARD_BREAKOUT_MODULE BOARD_BREAKOUT_NONE
|
78 |
#elif ((BOARD_BREAKOUT_MODULE != BOARD_BREAKOUT_NONE) && \
|
79 |
(BOARD_BREAKOUT_MODULE != BOARD_BREAKOUT_UWBv10)) |
80 |
#error "BOARD_BREAKOUT_MODULE set to invalid value" |
81 |
#endif
|
82 |
|
83 |
/*
|
84 |
* IO pins assignments.
|
85 |
*/
|
86 |
#define GPIOA_USART_CTS 0U |
87 |
#define GPIOA_USART_RTS 1U |
88 |
#define GPIOA_USART_RX 2U |
89 |
#define GPIOA_USART_TX 3U |
90 |
#define GPIOA_LIGHT_BLANK 4U |
91 |
#define GPIOA_LIGHT_SCLK 5U |
92 |
#define GPIOA_LIGHT_MISO 6U |
93 |
#define GPIOA_LIGHT_MOSI 7U |
94 |
#define GPIOA_PIN8 8U |
95 |
#define GPIOA_PROG_RX 9U |
96 |
#define GPIOA_PROG_TX 10U |
97 |
#define GPIOA_CAN_RX 11U |
98 |
#define GPIOA_CAN_TX 12U |
99 |
#define GPIOA_SWDIO 13U |
100 |
#define GPIOA_SWCLK 14U |
101 |
#define GPIOA_RS232_R_EN_N 15U |
102 |
|
103 |
#define GPIOB_SW_V33_EN 0U |
104 |
#define GPIOB_SW_V42_EN 1U |
105 |
#define GPIOB_SW_V50_EN 2U |
106 |
#define GPIOB_IO_3 3U |
107 |
#define GPIOB_IO_5 4U |
108 |
#define GPIOB_IO_6 5U |
109 |
#define GPIOB_SYS_UART_DN 6U |
110 |
#define GPIOB_PIN7 7U |
111 |
#define GPIOB_IO_7 8U |
112 |
#define GPIOB_IO_8 9U |
113 |
#define GPIOB_I2C_SCL 10U |
114 |
#define GPIOB_I2C_SDA 11U |
115 |
#define GPIOB_SPI_SS_N 12U |
116 |
#define GPIOB_SPI_SCLK 13U |
117 |
#define GPIOB_SPI_MISO 14U |
118 |
#define GPIOB_SPI_MOSI 15U |
119 |
|
120 |
#define GPIOC_IO_4 0U |
121 |
#define GPIOC_IO_1 1U |
122 |
#define GPIOC_IO_2 2U |
123 |
#define GPIOC_LED 3U |
124 |
#define GPIOC_LIGHT_XLAT 4U |
125 |
#define GPIOC_SW_V18_EN 5U |
126 |
#define GPIOC_SW_VSYS_EN 6U |
127 |
#define GPIOC_SYS_UART_UP 7U |
128 |
#define GPIOC_PIN8 8U |
129 |
#define GPIOC_PIN9 9U |
130 |
#define GPIOC_SYS_UART_RX 10U |
131 |
#define GPIOC_SYS_UART_TX 11U |
132 |
#define GPIOC_RS232_D_OFF_N 12U |
133 |
#define GPIOC_PIN13 13U |
134 |
#define GPIOC_SYS_PD_N 14U |
135 |
#define GPIOC_PIN15 15U |
136 |
|
137 |
#define GPIOD_OSC_IN 0U |
138 |
#define GPIOD_OSC_OUT 1U |
139 |
#define GPIOD_SYS_INT_N 2U |
140 |
#define GPIOD_PIN3 3U |
141 |
#define GPIOD_PIN4 4U |
142 |
#define GPIOD_PIN5 5U |
143 |
#define GPIOD_PIN6 6U |
144 |
#define GPIOD_PIN7 7U |
145 |
#define GPIOD_PIN8 8U |
146 |
#define GPIOD_PIN9 9U |
147 |
#define GPIOD_PIN10 10U |
148 |
#define GPIOD_PIN11 11U |
149 |
#define GPIOD_PIN12 12U |
150 |
#define GPIOD_PIN13 13U |
151 |
#define GPIOD_PIN14 14U |
152 |
#define GPIOD_PIN15 15U |
153 |
|
154 |
#define GPIOE_PIN0 0U |
155 |
#define GPIOE_PIN1 1U |
156 |
#define GPIOE_PIN2 2U |
157 |
#define GPIOE_PIN3 3U |
158 |
#define GPIOE_PIN4 4U |
159 |
#define GPIOE_PIN5 5U |
160 |
#define GPIOE_PIN6 6U |
161 |
#define GPIOE_PIN7 7U |
162 |
#define GPIOE_PIN8 8U |
163 |
#define GPIOE_PIN9 9U |
164 |
#define GPIOE_PIN10 10U |
165 |
#define GPIOE_PIN11 11U |
166 |
#define GPIOE_PIN12 12U |
167 |
#define GPIOE_PIN13 13U |
168 |
#define GPIOE_PIN14 14U |
169 |
#define GPIOE_PIN15 15U |
170 |
|
171 |
#define GPIOF_PIN0 0U |
172 |
#define GPIOF_PIN1 1U |
173 |
#define GPIOF_PIN2 2U |
174 |
#define GPIOF_PIN3 3U |
175 |
#define GPIOF_PIN4 4U |
176 |
#define GPIOF_PIN5 5U |
177 |
#define GPIOF_PIN6 6U |
178 |
#define GPIOF_PIN7 7U |
179 |
#define GPIOF_PIN8 8U |
180 |
#define GPIOF_PIN9 9U |
181 |
#define GPIOF_PIN10 10U |
182 |
#define GPIOF_PIN11 11U |
183 |
#define GPIOF_PIN12 12U |
184 |
#define GPIOF_PIN13 13U |
185 |
#define GPIOF_PIN14 14U |
186 |
#define GPIOF_PIN15 15U |
187 |
|
188 |
#define GPIOG_PIN0 0U |
189 |
#define GPIOG_PIN1 1U |
190 |
#define GPIOG_PIN2 2U |
191 |
#define GPIOG_PIN3 3U |
192 |
#define GPIOG_PIN4 4U |
193 |
#define GPIOG_PIN5 5U |
194 |
#define GPIOG_PIN6 6U |
195 |
#define GPIOG_PIN7 7U |
196 |
#define GPIOG_PIN8 8U |
197 |
#define GPIOG_PIN9 9U |
198 |
#define GPIOG_PIN10 10U |
199 |
#define GPIOG_PIN11 11U |
200 |
#define GPIOG_PIN12 12U |
201 |
#define GPIOG_PIN13 13U |
202 |
#define GPIOG_PIN14 14U |
203 |
#define GPIOG_PIN15 15U |
204 |
|
205 |
/*
|
206 |
* IO lines assignments.
|
207 |
*/
|
208 |
#define LINE_USART_CTS PAL_LINE(GPIOA, GPIOA_USART_CTS)
|
209 |
#define LINE_USART_RTS PAL_LINE(GPIOA, GPIOA_USART_RTS)
|
210 |
#define LINE_USART_RX PAL_LINE(GPIOA, GPIOA_USART_RX)
|
211 |
#define LINE_USART_TX PAL_LINE(GPIOA, GPIOA_USART_TX)
|
212 |
#define LINE_LIGHT_BLANK PAL_LINE(GPIOA, GPIOA_LIGHT_BLANK)
|
213 |
#define LINE_LIGHT_SCLK PAL_LINE(GPIOA, GPIOA_LIGHT_SCLK)
|
214 |
#define LINE_LIGHT_MISO PAL_LINE(GPIOA, GPIOA_LIGHT_MISO)
|
215 |
#define LINE_LIGHT_MOSI PAL_LINE(GPIOA, GPIOA_LIGHT_MOSI)
|
216 |
#define LINE_PROG_RX PAL_LINE(GPIOA, GPIOA_PROG_RX)
|
217 |
#define LINE_PROG_TX PAL_LINE(GPIOA, GPIOA_PROG_TX)
|
218 |
#define LINE_CAN_RX PAL_LINE(GPIOA, GPIOA_CAN_RX)
|
219 |
#define LINE_CAN_TX PAL_LINE(GPIOA, GPIOA_CAN_TX)
|
220 |
#define LINE_SWDIO PAL_LINE(GPIOA, GPIOA_SWDIO)
|
221 |
#define LINE_SWCLK PAL_LINE(GPIOA, GPIOA_SWCLK)
|
222 |
#define LINE_RS232_R_EN_N PAL_LINE(GPIOA, GPIOA_RS232_R_EN_N)
|
223 |
|
224 |
#define LINE_SW_V33_EN PAL_LINE(GPIOB, GPIOB_SW_V33_EN)
|
225 |
#define LINE_SW_V42_EN PAL_LINE(GPIOB, GPIOB_SW_V42_EN)
|
226 |
#define LINE_SW_V50_EN PAL_LINE(GPIOB, GPIOB_SW_V50_EN)
|
227 |
#define LINE_IO_3 PAL_LINE(GPIOB, GPIOB_IO_3)
|
228 |
#define LINE_IO_5 PAL_LINE(GPIOB, GPIOB_IO_5)
|
229 |
#define LINE_IO_6 PAL_LINE(GPIOB, GPIOB_IO_6)
|
230 |
#define LINE_SYS_UART_DN PAL_LINE(GPIOB, GPIOB_SYS_UART_DN)
|
231 |
#define LINE_IO_7 PAL_LINE(GPIOB, GPIOB_IO_7)
|
232 |
#define LINE_IO_8 PAL_LINE(GPIOB, GPIOB_IO_8)
|
233 |
#define LINE_I2C_SCL PAL_LINE(GPIOB, GPIOB_I2C_SCL)
|
234 |
#define LINE_I2C_SDA PAL_LINE(GPIOB, GPIOB_I2C_SDA)
|
235 |
#define LINE_SPI_SS_N PAL_LINE(GPIOB, GPIOB_SPI_SS_N)
|
236 |
#define LINE_SPI_SCLK PAL_LINE(GPIOB, GPIOB_SPI_SCLK)
|
237 |
#define LINE_SPI_MISO PAL_LINE(GPIOB, GPIOB_SPI_MISO)
|
238 |
#define LINE_SPI_MOSI PAL_LINE(GPIOB, GPIOB_SPI_MOSI)
|
239 |
|
240 |
#define LINE_IO_4 PAL_LINE(GPIOC, GPIOC_IO_4)
|
241 |
#define LINE_IO_1 PAL_LINE(GPIOC, GPIOC_IO_1)
|
242 |
#define LINE_IO_2 PAL_LINE(GPIOC, GPIOC_IO_2)
|
243 |
#define LINE_LED PAL_LINE(GPIOC, GPIOC_LED)
|
244 |
#define LINE_LIGHT_XLAT PAL_LINE(GPIOC, GPIOC_LIGHT_XLAT)
|
245 |
#define LINE_SW_V18_EN PAL_LINE(GPIOC, GPIOC_SW_V18_EN)
|
246 |
#define LINE_SW_VSYS_EN PAL_LINE(GPIOC, GPIOC_SW_VSYS_EN)
|
247 |
#define LINE_SYS_UART_UP PAL_LINE(GPIOC, GPIOC_SYS_UART_UP)
|
248 |
#define LINE_SYS_UART_RX PAL_LINE(GPIOC, GPIOC_SYS_UART_RX)
|
249 |
#define LINE_SYS_UART_TX PAL_LINE(GPIOC, GPIOC_SYS_UART_TX)
|
250 |
#define LINE_RS232_D_OFF_N PAL_LINE(GPIOC, GPIOC_RS232_D_OFF_N)
|
251 |
#define LINE_SYS_PD_N PAL_LINE(GPIOC, GPIOC_SYS_PD_N)
|
252 |
|
253 |
#define LINE_SYS_INT_N PAL_LINE(GPIOD, GPIOD_SYS_INT_N)
|
254 |
|
255 |
/*===========================================================================*/
|
256 |
/* Driver pre-compile time settings. */
|
257 |
/*===========================================================================*/
|
258 |
|
259 |
/*===========================================================================*/
|
260 |
/* Derived constants and error checks. */
|
261 |
/*===========================================================================*/
|
262 |
|
263 |
/*===========================================================================*/
|
264 |
/* Driver data structures and types. */
|
265 |
/*===========================================================================*/
|
266 |
|
267 |
/*===========================================================================*/
|
268 |
/* Driver macros. */
|
269 |
/*===========================================================================*/
|
270 |
|
271 |
/*
|
272 |
* I/O ports initial setup, this configuration is established soon after reset
|
273 |
* in the initialization code.
|
274 |
* Please refer to the STM32 Reference Manual for details.
|
275 |
*/
|
276 |
#define PIN_MODE_INPUT 0U |
277 |
#define PIN_MODE_OUTPUT_2M 2U |
278 |
#define PIN_MODE_OUTPUT_10M 1U |
279 |
#define PIN_MODE_OUTPUT_50M 3U |
280 |
#define PIN_CNF_INPUT_ANALOG 0U |
281 |
#define PIN_CNF_INPUT_FLOATING 1U |
282 |
#define PIN_CNF_INPUT_PULLX 2U |
283 |
#define PIN_CNF_OUTPUT_PUSHPULL 0U |
284 |
#define PIN_CNF_OUTPUT_OPENDRAIN 1U |
285 |
#define PIN_CNF_ALTERNATE_PUSHPULL 2U |
286 |
#define PIN_CNF_ALTERNATE_OPENDRAIN 3U |
287 |
#define PIN_CR(pin, mode, cnf) (((mode) | ((cnf) << 2U)) << (((pin) % 8U) * 4U)) |
288 |
#define PIN_ODR_LOW(n) (0U << (n)) |
289 |
#define PIN_ODR_HIGH(n) (1U << (n)) |
290 |
#define PIN_IGNORE(n) (1U << (n)) |
291 |
|
292 |
/*
|
293 |
* GPIOA setup:
|
294 |
*
|
295 |
* PA0 - USART_CTS (alternate pushpull 50MHz)
|
296 |
* PA1 - USART_RTS (alternate pushpull 50MHz)
|
297 |
* PA2 - USART_RX (alternate pushpull 50MHz)
|
298 |
* PA3 - USART_TX (input pullup)
|
299 |
* PA4 - LIGHT_BLANK (output pushpull high 50MHz)
|
300 |
* PA5 - LIGHT_SCLK (alternate pushpull 50MHz)
|
301 |
* PA6 - LIGHT_MISO (input pullup)
|
302 |
* PA7 - LIGHT_MOSI (alternate pushpull 50MHz)
|
303 |
* PA8 - PIN8 (input floating)
|
304 |
* PA9 - PROG_RX (alternate pushpull 50MHz)
|
305 |
* PA10 - PROG_TX (input pullup)
|
306 |
* PA11 - CAN_RX (input floating)
|
307 |
* PA12 - CAN_TX (alternate pushpull 50MHz)
|
308 |
* PA13 - SWDIO (input pullup)
|
309 |
* PA14 - SWCLK (input pullup)
|
310 |
* PA15 - RS232_R_EN_N (output opendrain low 50MHz)
|
311 |
*/
|
312 |
#define VAL_GPIOAIGN 0 |
313 |
#define VAL_GPIOACRL (PIN_CR(GPIOA_USART_CTS, PIN_MODE_OUTPUT_50M, PIN_CNF_ALTERNATE_PUSHPULL) | \
|
314 |
PIN_CR(GPIOA_USART_RTS, PIN_MODE_OUTPUT_50M, PIN_CNF_ALTERNATE_PUSHPULL) | \ |
315 |
PIN_CR(GPIOA_USART_RX, PIN_MODE_OUTPUT_50M, PIN_CNF_ALTERNATE_PUSHPULL) | \ |
316 |
PIN_CR(GPIOA_USART_TX, PIN_MODE_INPUT, PIN_CNF_INPUT_PULLX) | \ |
317 |
PIN_CR(GPIOA_LIGHT_BLANK, PIN_MODE_OUTPUT_50M, PIN_CNF_OUTPUT_PUSHPULL) | \ |
318 |
PIN_CR(GPIOA_LIGHT_SCLK, PIN_MODE_OUTPUT_50M, PIN_CNF_ALTERNATE_PUSHPULL) | \ |
319 |
PIN_CR(GPIOA_LIGHT_MISO, PIN_MODE_INPUT, PIN_CNF_INPUT_PULLX) | \ |
320 |
PIN_CR(GPIOA_LIGHT_MOSI, PIN_MODE_OUTPUT_50M, PIN_CNF_ALTERNATE_PUSHPULL)) |
321 |
#define VAL_GPIOACRH (PIN_CR(GPIOA_PIN8, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \
|
322 |
PIN_CR(GPIOA_PROG_RX, PIN_MODE_OUTPUT_50M, PIN_CNF_ALTERNATE_PUSHPULL) | \ |
323 |
PIN_CR(GPIOA_PROG_TX, PIN_MODE_INPUT, PIN_CNF_INPUT_PULLX) | \ |
324 |
PIN_CR(GPIOA_CAN_RX, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
325 |
PIN_CR(GPIOA_CAN_TX, PIN_MODE_OUTPUT_50M, PIN_CNF_ALTERNATE_PUSHPULL) | \ |
326 |
PIN_CR(GPIOA_SWDIO, PIN_MODE_INPUT, PIN_CNF_INPUT_PULLX) | \ |
327 |
PIN_CR(GPIOA_SWCLK, PIN_MODE_INPUT, PIN_CNF_INPUT_PULLX) | \ |
328 |
PIN_CR(GPIOA_RS232_R_EN_N, PIN_MODE_OUTPUT_50M, PIN_CNF_OUTPUT_OPENDRAIN)) |
329 |
#define VAL_GPIOAODR (PIN_ODR_LOW(GPIOA_USART_CTS) | \
|
330 |
PIN_ODR_LOW(GPIOA_USART_RTS) | \ |
331 |
PIN_ODR_HIGH(GPIOA_USART_RX) | \ |
332 |
PIN_ODR_HIGH(GPIOA_USART_TX) | \ |
333 |
PIN_ODR_HIGH(GPIOA_LIGHT_BLANK) | \ |
334 |
PIN_ODR_HIGH(GPIOA_LIGHT_SCLK) | \ |
335 |
PIN_ODR_HIGH(GPIOA_LIGHT_MISO) | \ |
336 |
PIN_ODR_HIGH(GPIOA_LIGHT_MOSI) | \ |
337 |
PIN_ODR_LOW(GPIOA_PIN8) | \ |
338 |
PIN_ODR_HIGH(GPIOA_PROG_RX) | \ |
339 |
PIN_ODR_HIGH(GPIOA_PROG_TX) | \ |
340 |
PIN_ODR_HIGH(GPIOA_CAN_RX) | \ |
341 |
PIN_ODR_HIGH(GPIOA_CAN_TX) | \ |
342 |
PIN_ODR_HIGH(GPIOA_SWDIO) | \ |
343 |
PIN_ODR_HIGH(GPIOA_SWCLK) | \ |
344 |
PIN_ODR_LOW(GPIOA_RS232_R_EN_N)) |
345 |
|
346 |
/*
|
347 |
* GPIOB setup:
|
348 |
*
|
349 |
* PB0 - SW_V33_EN (output pushpull low 50MHz)
|
350 |
* PB1 - SW_V42_EN (output pushpull low 50MHz)
|
351 |
* PB2 - SW_V50_EN (output pushpull low 50MHz)
|
352 |
* PB3 - IO_3 (input floating)
|
353 |
* PB4 - IO_5 (input floating)
|
354 |
* PB5 - IO_6 (input floating)
|
355 |
* PB6 - SYS_UART_DN (output opendrain high 50MHz)
|
356 |
* PB7 - PIN7 (input foating)
|
357 |
* PB8 - IO_7 (input floating)
|
358 |
* PB9 - IO_8 (input floating)
|
359 |
* PB10 - I2C_SCL (alternate opendrain 50MHz)
|
360 |
* PB11 - I2C_SDA (alternate opendrain 50MHz)
|
361 |
* PB12 - SPI_SS_N (output pushpull high 50MHz)
|
362 |
* PB13 - SPI_SCLK (alternate pushpull 50MHz)
|
363 |
* PB14 - SPI_MISO (input pullup)
|
364 |
* PB15 - SPI_MOSI (alternate pushpull 50MHz)
|
365 |
*/
|
366 |
#define VAL_GPIOBIGN (PIN_IGNORE(GPIOB_SYS_UART_DN)) & 0 |
367 |
#define VAL_GPIOBCRL (PIN_CR(GPIOB_SW_V33_EN, PIN_MODE_OUTPUT_50M, PIN_CNF_OUTPUT_PUSHPULL) | \
|
368 |
PIN_CR(GPIOB_SW_V42_EN, PIN_MODE_OUTPUT_50M, PIN_CNF_OUTPUT_PUSHPULL) | \ |
369 |
PIN_CR(GPIOB_SW_V50_EN, PIN_MODE_OUTPUT_50M, PIN_CNF_OUTPUT_PUSHPULL) | \ |
370 |
PIN_CR(GPIOB_IO_3, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
371 |
PIN_CR(GPIOB_IO_5, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
372 |
PIN_CR(GPIOB_IO_6, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
373 |
PIN_CR(GPIOB_SYS_UART_DN, PIN_MODE_OUTPUT_50M, PIN_CNF_OUTPUT_OPENDRAIN) | \ |
374 |
PIN_CR(GPIOB_PIN7, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING)) |
375 |
#define VAL_GPIOBCRH (PIN_CR(GPIOB_IO_7, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \
|
376 |
PIN_CR(GPIOB_IO_8, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
377 |
PIN_CR(GPIOB_I2C_SCL, PIN_MODE_OUTPUT_50M, PIN_CNF_ALTERNATE_OPENDRAIN) | \ |
378 |
PIN_CR(GPIOB_I2C_SDA, PIN_MODE_OUTPUT_50M, PIN_CNF_ALTERNATE_OPENDRAIN) | \ |
379 |
PIN_CR(GPIOB_SPI_SS_N, PIN_MODE_OUTPUT_50M, PIN_CNF_OUTPUT_PUSHPULL) | \ |
380 |
PIN_CR(GPIOB_SPI_SCLK, PIN_MODE_OUTPUT_50M, PIN_CNF_ALTERNATE_PUSHPULL) | \ |
381 |
PIN_CR(GPIOB_SPI_MISO, PIN_MODE_INPUT, PIN_CNF_INPUT_PULLX) | \ |
382 |
PIN_CR(GPIOB_SPI_MOSI, PIN_MODE_OUTPUT_50M, PIN_CNF_ALTERNATE_PUSHPULL)) |
383 |
#define VAL_GPIOBODR (PIN_ODR_LOW(GPIOB_SW_V33_EN) | \
|
384 |
PIN_ODR_LOW(GPIOB_SW_V42_EN) | \ |
385 |
PIN_ODR_LOW(GPIOB_SW_V50_EN) | \ |
386 |
PIN_ODR_LOW(GPIOB_IO_3) | \ |
387 |
PIN_ODR_LOW(GPIOB_IO_5) | \ |
388 |
PIN_ODR_LOW(GPIOB_IO_6) | \ |
389 |
PIN_ODR_HIGH(GPIOB_SYS_UART_DN) | \ |
390 |
PIN_ODR_LOW(GPIOB_PIN7) | \ |
391 |
PIN_ODR_LOW(GPIOB_IO_7) | \ |
392 |
PIN_ODR_LOW(GPIOB_IO_8) | \ |
393 |
PIN_ODR_HIGH(GPIOB_I2C_SCL) | \ |
394 |
PIN_ODR_HIGH(GPIOB_I2C_SDA) | \ |
395 |
PIN_ODR_HIGH(GPIOB_SPI_SS_N) | \ |
396 |
PIN_ODR_HIGH(GPIOB_SPI_SCLK) | \ |
397 |
PIN_ODR_HIGH(GPIOB_SPI_MISO) | \ |
398 |
PIN_ODR_HIGH(GPIOB_SPI_MOSI)) |
399 |
|
400 |
/*
|
401 |
* GPIOC setup:
|
402 |
*
|
403 |
* PC0 - IO_4 (input floating)
|
404 |
* PC1 - IO_1 (input floating)
|
405 |
* PC2 - IO_2 (input floating)
|
406 |
* PC3 - LED (output opendrain high 50MHz)
|
407 |
* PC4 - LIGHT_XLAT (output pushpull low 50MHz)
|
408 |
* PC5 - SW_V18_EN (output pushpull low 50MHz)
|
409 |
* PC6 - SW_VSYS_EN (output pushpull low 50MHz)
|
410 |
* PC7 - SYS_UART_UP (output opendrain high 50MHz)
|
411 |
* PC8 - PIN8 (input floating)
|
412 |
* PC9 - PIN9 (input floating)
|
413 |
* PC10 - SYS_UART_RX (input pullup)
|
414 |
* PC11 - SYS_UART_TX (input pullup)
|
415 |
* PC12 - RS232_D_OFF_N (output puspull low 50MHz)
|
416 |
* PC13 - PIN13 (input floating)
|
417 |
* PC14 - SYS_PD_N (output opendrain high 50MHz)
|
418 |
* PC15 - PIN15 (input floating)
|
419 |
*/
|
420 |
#define VAL_GPIOCIGN (PIN_IGNORE(GPIOC_SYS_PD_N)) & 0 |
421 |
#define VAL_GPIOCCRL (PIN_CR(GPIOC_IO_4, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \
|
422 |
PIN_CR(GPIOC_IO_1, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
423 |
PIN_CR(GPIOC_IO_2, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
424 |
PIN_CR(GPIOC_LED, PIN_MODE_OUTPUT_50M, PIN_CNF_OUTPUT_OPENDRAIN) | \ |
425 |
PIN_CR(GPIOC_LIGHT_XLAT, PIN_MODE_OUTPUT_50M, PIN_CNF_OUTPUT_PUSHPULL) | \ |
426 |
PIN_CR(GPIOC_SW_V18_EN, PIN_MODE_OUTPUT_50M, PIN_CNF_OUTPUT_PUSHPULL) | \ |
427 |
PIN_CR(GPIOC_SW_VSYS_EN, PIN_MODE_OUTPUT_50M, PIN_CNF_OUTPUT_PUSHPULL) | \ |
428 |
PIN_CR(GPIOC_SYS_UART_UP, PIN_MODE_OUTPUT_50M, PIN_CNF_OUTPUT_OPENDRAIN)) |
429 |
#define VAL_GPIOCCRH (PIN_CR(GPIOC_PIN8, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \
|
430 |
PIN_CR(GPIOC_PIN9, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
431 |
PIN_CR(GPIOC_SYS_UART_RX, PIN_MODE_INPUT, PIN_CNF_INPUT_PULLX) | \ |
432 |
PIN_CR(GPIOC_SYS_UART_TX, PIN_MODE_INPUT, PIN_CNF_INPUT_PULLX) | \ |
433 |
PIN_CR(GPIOC_RS232_D_OFF_N, PIN_MODE_OUTPUT_50M, PIN_CNF_OUTPUT_PUSHPULL) | \ |
434 |
PIN_CR(GPIOC_PIN13, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
435 |
PIN_CR(GPIOC_SYS_PD_N, PIN_MODE_OUTPUT_50M, PIN_CNF_OUTPUT_OPENDRAIN) | \ |
436 |
PIN_CR(GPIOC_PIN15, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING)) |
437 |
#define VAL_GPIOCODR (PIN_ODR_LOW(GPIOC_IO_4) | \
|
438 |
PIN_ODR_LOW(GPIOC_IO_1) | \ |
439 |
PIN_ODR_LOW(GPIOC_IO_2) | \ |
440 |
PIN_ODR_HIGH(GPIOC_LED) | \ |
441 |
PIN_ODR_LOW(GPIOC_LIGHT_XLAT) | \ |
442 |
PIN_ODR_LOW(GPIOC_SW_V18_EN) | \ |
443 |
PIN_ODR_LOW(GPIOC_SW_VSYS_EN) | \ |
444 |
PIN_ODR_HIGH(GPIOC_SYS_UART_UP) | \ |
445 |
PIN_ODR_LOW(GPIOC_PIN8) | \ |
446 |
PIN_ODR_LOW(GPIOC_PIN9) | \ |
447 |
PIN_ODR_HIGH(GPIOC_SYS_UART_RX) | \ |
448 |
PIN_ODR_HIGH(GPIOC_SYS_UART_TX) | \ |
449 |
PIN_ODR_LOW(GPIOC_RS232_D_OFF_N) | \ |
450 |
PIN_ODR_LOW(GPIOC_PIN13) | \ |
451 |
PIN_ODR_HIGH(GPIOC_SYS_PD_N) | \ |
452 |
PIN_ODR_LOW(GPIOC_PIN15)) |
453 |
|
454 |
/*
|
455 |
* GPIOD setup:
|
456 |
*
|
457 |
* PD0 - OSC_IN (input floating)
|
458 |
* PD1 - OSC_OUT (input floating)
|
459 |
* PD2 - SYS_INT_N (output opendrain low 50MHz)
|
460 |
* PD3 - PIN3 (input floating)
|
461 |
* PD4 - PIN4 (input floating)
|
462 |
* PD5 - PIN5 (input floating)
|
463 |
* PD6 - PIN6 (input floating)
|
464 |
* PD7 - PIN7 (input floating)
|
465 |
* PD8 - PIN8 (input floating)
|
466 |
* PD9 - PIN9 (input floating)
|
467 |
* PD10 - PIN10 (input floating)
|
468 |
* PD11 - PIN11 (input floating)
|
469 |
* PD12 - PIN12 (input floating)
|
470 |
* PD13 - PIN13 (input floating)
|
471 |
* PD14 - PIN14 (input floating)
|
472 |
* PD15 - PIN15 (input floating)
|
473 |
*/
|
474 |
#define VAL_GPIODIGN (PIN_IGNORE(GPIOD_SYS_INT_N)) & 0 |
475 |
#define VAL_GPIODCRL (PIN_CR(GPIOD_OSC_IN, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \
|
476 |
PIN_CR(GPIOD_OSC_OUT, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
477 |
PIN_CR(GPIOD_SYS_INT_N, PIN_MODE_OUTPUT_50M, PIN_CNF_OUTPUT_OPENDRAIN) | \ |
478 |
PIN_CR(GPIOD_PIN3, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
479 |
PIN_CR(GPIOD_PIN4, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
480 |
PIN_CR(GPIOD_PIN5, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
481 |
PIN_CR(GPIOD_PIN6, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
482 |
PIN_CR(GPIOD_PIN7, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING)) |
483 |
#define VAL_GPIODCRH (PIN_CR(GPIOD_PIN8, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \
|
484 |
PIN_CR(GPIOD_PIN9, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
485 |
PIN_CR(GPIOD_PIN10, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
486 |
PIN_CR(GPIOD_PIN11, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
487 |
PIN_CR(GPIOD_PIN12, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
488 |
PIN_CR(GPIOD_PIN13, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
489 |
PIN_CR(GPIOD_PIN14, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
490 |
PIN_CR(GPIOD_PIN15, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING)) |
491 |
#define VAL_GPIODODR (PIN_ODR_HIGH(GPIOD_OSC_IN) | \
|
492 |
PIN_ODR_HIGH(GPIOD_OSC_OUT) | \ |
493 |
PIN_ODR_LOW(GPIOD_SYS_INT_N) | \ |
494 |
PIN_ODR_LOW(GPIOD_PIN3) | \ |
495 |
PIN_ODR_LOW(GPIOD_PIN4) | \ |
496 |
PIN_ODR_LOW(GPIOD_PIN5) | \ |
497 |
PIN_ODR_LOW(GPIOD_PIN6) | \ |
498 |
PIN_ODR_LOW(GPIOD_PIN7) | \ |
499 |
PIN_ODR_LOW(GPIOD_PIN8) | \ |
500 |
PIN_ODR_LOW(GPIOD_PIN9) | \ |
501 |
PIN_ODR_LOW(GPIOD_PIN10) | \ |
502 |
PIN_ODR_LOW(GPIOD_PIN11) | \ |
503 |
PIN_ODR_LOW(GPIOD_PIN12) | \ |
504 |
PIN_ODR_LOW(GPIOD_PIN13) | \ |
505 |
PIN_ODR_LOW(GPIOD_PIN14) | \ |
506 |
PIN_ODR_LOW(GPIOD_PIN15)) |
507 |
|
508 |
/*
|
509 |
* GPIOE setup:
|
510 |
*
|
511 |
* PE0 - PIN0 (input floating)
|
512 |
* PE1 - PIN1 (input floating)
|
513 |
* PE2 - PIN2 (input floating)
|
514 |
* PE3 - PIN3 (input floating)
|
515 |
* PE4 - PIN4 (input floating)
|
516 |
* PE5 - PIN5 (input floating)
|
517 |
* PE6 - PIN6 (input floating)
|
518 |
* PE7 - PIN7 (input floating)
|
519 |
* PE8 - PIN8 (input floating)
|
520 |
* PE9 - PIN9 (input floating)
|
521 |
* PE10 - PIN10 (input floating)
|
522 |
* PE11 - PIN11 (input floating)
|
523 |
* PE12 - PIN12 (input floating)
|
524 |
* PE13 - PIN13 (input floating)
|
525 |
* PE14 - PIN14 (input floating)
|
526 |
* PE15 - PIN15 (input floating)
|
527 |
*/
|
528 |
#define VAL_GPIOEIGN 0 |
529 |
#define VAL_GPIOECRL (PIN_CR(GPIOE_PIN0, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \
|
530 |
PIN_CR(GPIOE_PIN1, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
531 |
PIN_CR(GPIOE_PIN2, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
532 |
PIN_CR(GPIOE_PIN3, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
533 |
PIN_CR(GPIOE_PIN4, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
534 |
PIN_CR(GPIOE_PIN5, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
535 |
PIN_CR(GPIOE_PIN6, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
536 |
PIN_CR(GPIOE_PIN7, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING)) |
537 |
#define VAL_GPIOECRH (PIN_CR(GPIOE_PIN8, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \
|
538 |
PIN_CR(GPIOE_PIN9, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
539 |
PIN_CR(GPIOE_PIN10, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
540 |
PIN_CR(GPIOE_PIN11, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
541 |
PIN_CR(GPIOE_PIN12, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
542 |
PIN_CR(GPIOE_PIN13, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
543 |
PIN_CR(GPIOE_PIN14, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
544 |
PIN_CR(GPIOE_PIN15, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING)) |
545 |
#define VAL_GPIOEODR (PIN_ODR_LOW(GPIOE_PIN0) | \
|
546 |
PIN_ODR_LOW(GPIOE_PIN1) | \ |
547 |
PIN_ODR_LOW(GPIOE_PIN2) | \ |
548 |
PIN_ODR_LOW(GPIOE_PIN3) | \ |
549 |
PIN_ODR_LOW(GPIOE_PIN4) | \ |
550 |
PIN_ODR_LOW(GPIOE_PIN5) | \ |
551 |
PIN_ODR_LOW(GPIOE_PIN6) | \ |
552 |
PIN_ODR_LOW(GPIOE_PIN7) | \ |
553 |
PIN_ODR_LOW(GPIOE_PIN8) | \ |
554 |
PIN_ODR_LOW(GPIOE_PIN9) | \ |
555 |
PIN_ODR_LOW(GPIOE_PIN10) | \ |
556 |
PIN_ODR_LOW(GPIOE_PIN11) | \ |
557 |
PIN_ODR_LOW(GPIOE_PIN12) | \ |
558 |
PIN_ODR_LOW(GPIOE_PIN13) | \ |
559 |
PIN_ODR_LOW(GPIOE_PIN14) | \ |
560 |
PIN_ODR_LOW(GPIOE_PIN15)) |
561 |
|
562 |
/*
|
563 |
* GPIOF setup:
|
564 |
*
|
565 |
* PF0 - PIN0 (input floating)
|
566 |
* PF1 - PIN1 (input floating)
|
567 |
* PF2 - PIN2 (input floating)
|
568 |
* PF3 - PIN3 (input floating)
|
569 |
* PF4 - PIN4 (input floating)
|
570 |
* PF5 - PIN5 (input floating)
|
571 |
* PF6 - PIN6 (input floating)
|
572 |
* PF7 - PIN7 (input floating)
|
573 |
* PF8 - PIN8 (input floating)
|
574 |
* PF9 - PIN9 (input floating)
|
575 |
* PF10 - PIN10 (input floating)
|
576 |
* PF11 - PIN11 (input floating)
|
577 |
* PF12 - PIN12 (input floating)
|
578 |
* PF13 - PIN13 (input floating)
|
579 |
* PF14 - PIN14 (input floating)
|
580 |
* PF15 - PIN15 (input floating)
|
581 |
*/
|
582 |
#define VAL_GPIOFIGN 0 |
583 |
#define VAL_GPIOFCRL (PIN_CR(GPIOF_PIN0, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \
|
584 |
PIN_CR(GPIOF_PIN1, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
585 |
PIN_CR(GPIOF_PIN2, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
586 |
PIN_CR(GPIOF_PIN3, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
587 |
PIN_CR(GPIOF_PIN4, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
588 |
PIN_CR(GPIOF_PIN5, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
589 |
PIN_CR(GPIOF_PIN6, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
590 |
PIN_CR(GPIOF_PIN7, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING)) |
591 |
#define VAL_GPIOFCRH (PIN_CR(GPIOF_PIN8, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \
|
592 |
PIN_CR(GPIOF_PIN9, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
593 |
PIN_CR(GPIOF_PIN10, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
594 |
PIN_CR(GPIOF_PIN11, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
595 |
PIN_CR(GPIOF_PIN12, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
596 |
PIN_CR(GPIOF_PIN13, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
597 |
PIN_CR(GPIOF_PIN14, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
598 |
PIN_CR(GPIOF_PIN15, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING)) |
599 |
#define VAL_GPIOFODR (PIN_ODR_LOW(GPIOF_PIN0) | \
|
600 |
PIN_ODR_LOW(GPIOF_PIN1) | \ |
601 |
PIN_ODR_LOW(GPIOF_PIN2) | \ |
602 |
PIN_ODR_LOW(GPIOF_PIN3) | \ |
603 |
PIN_ODR_LOW(GPIOF_PIN4) | \ |
604 |
PIN_ODR_LOW(GPIOF_PIN5) | \ |
605 |
PIN_ODR_LOW(GPIOF_PIN6) | \ |
606 |
PIN_ODR_LOW(GPIOF_PIN7) | \ |
607 |
PIN_ODR_LOW(GPIOF_PIN8) | \ |
608 |
PIN_ODR_LOW(GPIOF_PIN9) | \ |
609 |
PIN_ODR_LOW(GPIOF_PIN10) | \ |
610 |
PIN_ODR_LOW(GPIOF_PIN11) | \ |
611 |
PIN_ODR_LOW(GPIOF_PIN12) | \ |
612 |
PIN_ODR_LOW(GPIOF_PIN13) | \ |
613 |
PIN_ODR_LOW(GPIOF_PIN14) | \ |
614 |
PIN_ODR_LOW(GPIOF_PIN15)) |
615 |
|
616 |
/*
|
617 |
* GPIOG setup:
|
618 |
*
|
619 |
* PG0 - PIN0 (input floating)
|
620 |
* PG1 - PIN1 (input floating)
|
621 |
* PG2 - PIN2 (input floating)
|
622 |
* PG3 - PIN3 (input floating)
|
623 |
* PG4 - PIN4 (input floating)
|
624 |
* PG5 - PIN5 (input floating)
|
625 |
* PG6 - PIN6 (input floating)
|
626 |
* PG7 - PIN7 (input floating)
|
627 |
* PG8 - PIN8 (input floating)
|
628 |
* PG9 - PIN9 (input floating)
|
629 |
* PG10 - PIN10 (input floating)
|
630 |
* PG11 - PIN11 (input floating)
|
631 |
* PG12 - PIN12 (input floating)
|
632 |
* PG13 - PIN13 (input floating)
|
633 |
* PG14 - PIN14 (input floating)
|
634 |
* PG15 - PIN15 (input floating)
|
635 |
*/
|
636 |
#define VAL_GPIOGIGN 0 |
637 |
#define VAL_GPIOGCRL (PIN_CR(GPIOG_PIN0, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \
|
638 |
PIN_CR(GPIOG_PIN1, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
639 |
PIN_CR(GPIOG_PIN2, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
640 |
PIN_CR(GPIOG_PIN3, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
641 |
PIN_CR(GPIOG_PIN4, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
642 |
PIN_CR(GPIOG_PIN5, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
643 |
PIN_CR(GPIOG_PIN6, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
644 |
PIN_CR(GPIOG_PIN7, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING)) |
645 |
#define VAL_GPIOGCRH (PIN_CR(GPIOG_PIN8, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \
|
646 |
PIN_CR(GPIOG_PIN9, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
647 |
PIN_CR(GPIOG_PIN10, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
648 |
PIN_CR(GPIOG_PIN11, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
649 |
PIN_CR(GPIOG_PIN12, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
650 |
PIN_CR(GPIOG_PIN13, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
651 |
PIN_CR(GPIOG_PIN14, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING) | \ |
652 |
PIN_CR(GPIOG_PIN15, PIN_MODE_INPUT, PIN_CNF_INPUT_FLOATING)) |
653 |
#define VAL_GPIOGODR (PIN_ODR_LOW(GPIOG_PIN0) | \
|
654 |
PIN_ODR_LOW(GPIOG_PIN1) | \ |
655 |
PIN_ODR_LOW(GPIOG_PIN2) | \ |
656 |
PIN_ODR_LOW(GPIOG_PIN3) | \ |
657 |
PIN_ODR_LOW(GPIOG_PIN4) | \ |
658 |
PIN_ODR_LOW(GPIOG_PIN5) | \ |
659 |
PIN_ODR_LOW(GPIOG_PIN6) | \ |
660 |
PIN_ODR_LOW(GPIOG_PIN7) | \ |
661 |
PIN_ODR_LOW(GPIOG_PIN8) | \ |
662 |
PIN_ODR_LOW(GPIOG_PIN9) | \ |
663 |
PIN_ODR_LOW(GPIOG_PIN10) | \ |
664 |
PIN_ODR_LOW(GPIOG_PIN11) | \ |
665 |
PIN_ODR_LOW(GPIOG_PIN12) | \ |
666 |
PIN_ODR_LOW(GPIOG_PIN13) | \ |
667 |
PIN_ODR_LOW(GPIOG_PIN14) | \ |
668 |
PIN_ODR_LOW(GPIOG_PIN15)) |
669 |
|
670 |
/*===========================================================================*/
|
671 |
/* External declarations. */
|
672 |
/*===========================================================================*/
|
673 |
|
674 |
#if !defined(_FROM_ASM_)
|
675 |
#ifdef __cplusplus
|
676 |
extern "C" { |
677 |
#endif
|
678 |
void boardInit(void); |
679 |
#ifdef __cplusplus
|
680 |
} |
681 |
#endif
|
682 |
#endif /* _FROM_ASM_ */ |
683 |
|
684 |
#endif /* BOARD_H */ |
685 |
|
686 |
/** @} */
|