diff options
Diffstat (limited to 'lib/chibios/os/hal/boards/ST_NUCLEO64_L476RG')
5 files changed, 3130 insertions, 0 deletions
diff --git a/lib/chibios/os/hal/boards/ST_NUCLEO64_L476RG/board.c b/lib/chibios/os/hal/boards/ST_NUCLEO64_L476RG/board.c new file mode 100644 index 000000000..fceb3fdec --- /dev/null +++ b/lib/chibios/os/hal/boards/ST_NUCLEO64_L476RG/board.c | |||
@@ -0,0 +1,281 @@ | |||
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 | /* | ||
18 | * This file has been automatically generated using ChibiStudio board | ||
19 | * generator plugin. Do not edit manually. | ||
20 | */ | ||
21 | |||
22 | #include "hal.h" | ||
23 | #include "stm32_gpio.h" | ||
24 | |||
25 | /*===========================================================================*/ | ||
26 | /* Driver local definitions. */ | ||
27 | /*===========================================================================*/ | ||
28 | |||
29 | /*===========================================================================*/ | ||
30 | /* Driver exported variables. */ | ||
31 | /*===========================================================================*/ | ||
32 | |||
33 | /*===========================================================================*/ | ||
34 | /* Driver local variables and types. */ | ||
35 | /*===========================================================================*/ | ||
36 | |||
37 | /** | ||
38 | * @brief Type of STM32 GPIO port setup. | ||
39 | */ | ||
40 | typedef struct { | ||
41 | uint32_t moder; | ||
42 | uint32_t otyper; | ||
43 | uint32_t ospeedr; | ||
44 | uint32_t pupdr; | ||
45 | uint32_t odr; | ||
46 | uint32_t afrl; | ||
47 | uint32_t afrh; | ||
48 | uint32_t ascr; | ||
49 | uint32_t lockr; | ||
50 | } gpio_setup_t; | ||
51 | |||
52 | /** | ||
53 | * @brief Type of STM32 GPIO initialization data. | ||
54 | */ | ||
55 | typedef struct { | ||
56 | #if STM32_HAS_GPIOA || defined(__DOXYGEN__) | ||
57 | gpio_setup_t PAData; | ||
58 | #endif | ||
59 | #if STM32_HAS_GPIOB || defined(__DOXYGEN__) | ||
60 | gpio_setup_t PBData; | ||
61 | #endif | ||
62 | #if STM32_HAS_GPIOC || defined(__DOXYGEN__) | ||
63 | gpio_setup_t PCData; | ||
64 | #endif | ||
65 | #if STM32_HAS_GPIOD || defined(__DOXYGEN__) | ||
66 | gpio_setup_t PDData; | ||
67 | #endif | ||
68 | #if STM32_HAS_GPIOE || defined(__DOXYGEN__) | ||
69 | gpio_setup_t PEData; | ||
70 | #endif | ||
71 | #if STM32_HAS_GPIOF || defined(__DOXYGEN__) | ||
72 | gpio_setup_t PFData; | ||
73 | #endif | ||
74 | #if STM32_HAS_GPIOG || defined(__DOXYGEN__) | ||
75 | gpio_setup_t PGData; | ||
76 | #endif | ||
77 | #if STM32_HAS_GPIOH || defined(__DOXYGEN__) | ||
78 | gpio_setup_t PHData; | ||
79 | #endif | ||
80 | #if STM32_HAS_GPIOI || defined(__DOXYGEN__) | ||
81 | gpio_setup_t PIData; | ||
82 | #endif | ||
83 | #if STM32_HAS_GPIOJ || defined(__DOXYGEN__) | ||
84 | gpio_setup_t PJData; | ||
85 | #endif | ||
86 | #if STM32_HAS_GPIOK || defined(__DOXYGEN__) | ||
87 | gpio_setup_t PKData; | ||
88 | #endif | ||
89 | } gpio_config_t; | ||
90 | |||
91 | /** | ||
92 | * @brief STM32 GPIO static initialization data. | ||
93 | */ | ||
94 | static const gpio_config_t gpio_default_config = { | ||
95 | #if STM32_HAS_GPIOA | ||
96 | {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, | ||
97 | VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH, VAL_GPIOA_ASCR, | ||
98 | VAL_GPIOA_LOCKR}, | ||
99 | #endif | ||
100 | #if STM32_HAS_GPIOB | ||
101 | {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, | ||
102 | VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH, VAL_GPIOB_ASCR, | ||
103 | VAL_GPIOB_LOCKR}, | ||
104 | #endif | ||
105 | #if STM32_HAS_GPIOC | ||
106 | {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, | ||
107 | VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH, VAL_GPIOC_ASCR, | ||
108 | VAL_GPIOC_LOCKR}, | ||
109 | #endif | ||
110 | #if STM32_HAS_GPIOD | ||
111 | {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, | ||
112 | VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH, VAL_GPIOD_ASCR, | ||
113 | VAL_GPIOD_LOCKR}, | ||
114 | #endif | ||
115 | #if STM32_HAS_GPIOE | ||
116 | {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, | ||
117 | VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH, VAL_GPIOE_ASCR, | ||
118 | VAL_GPIOE_LOCKR}, | ||
119 | #endif | ||
120 | #if STM32_HAS_GPIOF | ||
121 | {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, | ||
122 | VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH, VAL_GPIOF_ASCR, | ||
123 | VAL_GPIOF_LOCKR}, | ||
124 | #endif | ||
125 | #if STM32_HAS_GPIOG | ||
126 | {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, | ||
127 | VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH, VAL_GPIOG_ASCR, | ||
128 | VAL_GPIOG_LOCKR}, | ||
129 | #endif | ||
130 | #if STM32_HAS_GPIOH | ||
131 | {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, | ||
132 | VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH, VAL_GPIOH_ASCR, | ||
133 | VAL_GPIOH_LOCKR}, | ||
134 | #endif | ||
135 | #if STM32_HAS_GPIOI | ||
136 | {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, | ||
137 | VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH, VAL_GPIOI_ASCR, | ||
138 | VAL_GPIOI_LOCKR}, | ||
139 | #endif | ||
140 | #if STM32_HAS_GPIOJ | ||
141 | {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR, | ||
142 | VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH, VAL_GPIOJ_ASCR, | ||
143 | VAL_GPIOJ_LOCKR}, | ||
144 | #endif | ||
145 | #if STM32_HAS_GPIOK | ||
146 | {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR, | ||
147 | VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH, VAL_GPIOK_ASCR, | ||
148 | VAL_GPIOK_LOCKR} | ||
149 | #endif | ||
150 | }; | ||
151 | |||
152 | /*===========================================================================*/ | ||
153 | /* Driver local functions. */ | ||
154 | /*===========================================================================*/ | ||
155 | |||
156 | static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) { | ||
157 | |||
158 | gpiop->OTYPER = config->otyper; | ||
159 | gpiop->ASCR = config->ascr; | ||
160 | gpiop->OSPEEDR = config->ospeedr; | ||
161 | gpiop->PUPDR = config->pupdr; | ||
162 | gpiop->ODR = config->odr; | ||
163 | gpiop->AFRL = config->afrl; | ||
164 | gpiop->AFRH = config->afrh; | ||
165 | gpiop->MODER = config->moder; | ||
166 | gpiop->LOCKR = config->lockr; | ||
167 | } | ||
168 | |||
169 | static void stm32_gpio_init(void) { | ||
170 | |||
171 | /* Enabling GPIO-related clocks, the mask comes from the | ||
172 | registry header file.*/ | ||
173 | rccResetAHB2(STM32_GPIO_EN_MASK); | ||
174 | rccEnableAHB2(STM32_GPIO_EN_MASK, true); | ||
175 | |||
176 | /* Initializing all the defined GPIO ports.*/ | ||
177 | #if STM32_HAS_GPIOA | ||
178 | gpio_init(GPIOA, &gpio_default_config.PAData); | ||
179 | #endif | ||
180 | #if STM32_HAS_GPIOB | ||
181 | gpio_init(GPIOB, &gpio_default_config.PBData); | ||
182 | #endif | ||
183 | #if STM32_HAS_GPIOC | ||
184 | gpio_init(GPIOC, &gpio_default_config.PCData); | ||
185 | #endif | ||
186 | #if STM32_HAS_GPIOD | ||
187 | gpio_init(GPIOD, &gpio_default_config.PDData); | ||
188 | #endif | ||
189 | #if STM32_HAS_GPIOE | ||
190 | gpio_init(GPIOE, &gpio_default_config.PEData); | ||
191 | #endif | ||
192 | #if STM32_HAS_GPIOF | ||
193 | gpio_init(GPIOF, &gpio_default_config.PFData); | ||
194 | #endif | ||
195 | #if STM32_HAS_GPIOG | ||
196 | gpio_init(GPIOG, &gpio_default_config.PGData); | ||
197 | #endif | ||
198 | #if STM32_HAS_GPIOH | ||
199 | gpio_init(GPIOH, &gpio_default_config.PHData); | ||
200 | #endif | ||
201 | #if STM32_HAS_GPIOI | ||
202 | gpio_init(GPIOI, &gpio_default_config.PIData); | ||
203 | #endif | ||
204 | #if STM32_HAS_GPIOJ | ||
205 | gpio_init(GPIOJ, &gpio_default_config.PJData); | ||
206 | #endif | ||
207 | #if STM32_HAS_GPIOK | ||
208 | gpio_init(GPIOK, &gpio_default_config.PKData); | ||
209 | #endif | ||
210 | } | ||
211 | |||
212 | /*===========================================================================*/ | ||
213 | /* Driver interrupt handlers. */ | ||
214 | /*===========================================================================*/ | ||
215 | |||
216 | /*===========================================================================*/ | ||
217 | /* Driver exported functions. */ | ||
218 | /*===========================================================================*/ | ||
219 | |||
220 | /** | ||
221 | * @brief Early initialization code. | ||
222 | * @details GPIO ports and system clocks are initialized before everything | ||
223 | * else. | ||
224 | */ | ||
225 | void __early_init(void) { | ||
226 | |||
227 | stm32_gpio_init(); | ||
228 | stm32_clock_init(); | ||
229 | } | ||
230 | |||
231 | #if HAL_USE_SDC || defined(__DOXYGEN__) | ||
232 | /** | ||
233 | * @brief SDC card detection. | ||
234 | */ | ||
235 | bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { | ||
236 | |||
237 | (void)sdcp; | ||
238 | /* CHTODO: Fill the implementation.*/ | ||
239 | return true; | ||
240 | } | ||
241 | |||
242 | /** | ||
243 | * @brief SDC card write protection detection. | ||
244 | */ | ||
245 | bool sdc_lld_is_write_protected(SDCDriver *sdcp) { | ||
246 | |||
247 | (void)sdcp; | ||
248 | /* CHTODO: Fill the implementation.*/ | ||
249 | return false; | ||
250 | } | ||
251 | #endif /* HAL_USE_SDC */ | ||
252 | |||
253 | #if HAL_USE_MMC_SPI || defined(__DOXYGEN__) | ||
254 | /** | ||
255 | * @brief MMC_SPI card detection. | ||
256 | */ | ||
257 | bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { | ||
258 | |||
259 | (void)mmcp; | ||
260 | /* CHTODO: Fill the implementation.*/ | ||
261 | return true; | ||
262 | } | ||
263 | |||
264 | /** | ||
265 | * @brief MMC_SPI card write protection detection. | ||
266 | */ | ||
267 | bool mmc_lld_is_write_protected(MMCDriver *mmcp) { | ||
268 | |||
269 | (void)mmcp; | ||
270 | /* CHTODO: Fill the implementation.*/ | ||
271 | return false; | ||
272 | } | ||
273 | #endif | ||
274 | |||
275 | /** | ||
276 | * @brief Board-specific initialization code. | ||
277 | * @note You can add your board-specific code here. | ||
278 | */ | ||
279 | void boardInit(void) { | ||
280 | |||
281 | } | ||
diff --git a/lib/chibios/os/hal/boards/ST_NUCLEO64_L476RG/board.h b/lib/chibios/os/hal/boards/ST_NUCLEO64_L476RG/board.h new file mode 100644 index 000000000..6ca4a6f5a --- /dev/null +++ b/lib/chibios/os/hal/boards/ST_NUCLEO64_L476RG/board.h | |||
@@ -0,0 +1,1505 @@ | |||
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 | /* | ||
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 STM32 Nucleo64-L476RG board. | ||
31 | */ | ||
32 | |||
33 | /* | ||
34 | * Board identifier. | ||
35 | */ | ||
36 | #define BOARD_ST_NUCLEO64_L476RG | ||
37 | #define BOARD_NAME "STMicroelectronics STM32 Nucleo64-L476RG" | ||
38 | |||
39 | /* | ||
40 | * Board oscillators-related settings. | ||
41 | */ | ||
42 | #if !defined(STM32_LSECLK) | ||
43 | #define STM32_LSECLK 32768U | ||
44 | #endif | ||
45 | |||
46 | #define STM32_LSEDRV (3U << 3U) | ||
47 | |||
48 | #if !defined(STM32_HSECLK) | ||
49 | #define STM32_HSECLK 8000000U | ||
50 | #endif | ||
51 | |||
52 | #define STM32_HSE_BYPASS | ||
53 | |||
54 | /* | ||
55 | * Board voltages. | ||
56 | * Required for performance limits calculation. | ||
57 | */ | ||
58 | #define STM32_VDD 300U | ||
59 | |||
60 | /* | ||
61 | * MCU type as defined in the ST header. | ||
62 | */ | ||
63 | #define STM32L476xx | ||
64 | |||
65 | /* | ||
66 | * IO pins assignments. | ||
67 | */ | ||
68 | #define GPIOA_ARD_A0 0U | ||
69 | #define GPIOA_ACD12_IN5 0U | ||
70 | #define GPIOA_ARD_A1 1U | ||
71 | #define GPIOA_ACD12_IN6 1U | ||
72 | #define GPIOA_ARD_D1 2U | ||
73 | #define GPIOA_USART2_TX 2U | ||
74 | #define GPIOA_ARD_D0 3U | ||
75 | #define GPIOA_USART2_RX 3U | ||
76 | #define GPIOA_ARD_A2 4U | ||
77 | #define GPIOA_ACD12_IN9 4U | ||
78 | #define GPIOA_ARD_D13 5U | ||
79 | #define GPIOA_LED_GREEN 5U | ||
80 | #define GPIOA_ARD_D12 6U | ||
81 | #define GPIOA_ARD_D11 7U | ||
82 | #define GPIOA_ARD_D7 8U | ||
83 | #define GPIOA_ARD_D8 9U | ||
84 | #define GPIOA_ARD_D2 10U | ||
85 | #define GPIOA_PIN11 11U | ||
86 | #define GPIOA_PIN12 12U | ||
87 | #define GPIOA_SWDIO 13U | ||
88 | #define GPIOA_SWCLK 14U | ||
89 | #define GPIOA_PIN15 15U | ||
90 | |||
91 | #define GPIOB_ARD_A3 0U | ||
92 | #define GPIOB_ACD12_IN15 0U | ||
93 | #define GPIOB_PIN1 1U | ||
94 | #define GPIOB_PIN2 2U | ||
95 | #define GPIOB_ARD_D3 3U | ||
96 | #define GPIOB_SWO 3U | ||
97 | #define GPIOB_ARD_D5 4U | ||
98 | #define GPIOB_ARD_D4 5U | ||
99 | #define GPIOB_ARD_D10 6U | ||
100 | #define GPIOB_PIN7 7U | ||
101 | #define GPIOB_ARD_D15 8U | ||
102 | #define GPIOB_ARD_D14 9U | ||
103 | #define GPIOB_ARD_D6 10U | ||
104 | #define GPIOB_PIN11 11U | ||
105 | #define GPIOB_PIN12 12U | ||
106 | #define GPIOB_PIN13 13U | ||
107 | #define GPIOB_PIN14 14U | ||
108 | #define GPIOB_PIN15 15U | ||
109 | |||
110 | #define GPIOC_ARD_A5 0U | ||
111 | #define GPIOC_ACD123_IN1 0U | ||
112 | #define GPIOC_ARD_A4 1U | ||
113 | #define GPIOC_ACD123_IN2 1U | ||
114 | #define GPIOC_PIN2 2U | ||
115 | #define GPIOC_PIN3 3U | ||
116 | #define GPIOC_PIN4 4U | ||
117 | #define GPIOC_PIN5 5U | ||
118 | #define GPIOC_PIN6 6U | ||
119 | #define GPIOC_ARD_D9 7U | ||
120 | #define GPIOC_PIN8 8U | ||
121 | #define GPIOC_PIN9 9U | ||
122 | #define GPIOC_PIN10 10U | ||
123 | #define GPIOC_PIN11 11U | ||
124 | #define GPIOC_PIN12 12U | ||
125 | #define GPIOC_BUTTON 13U | ||
126 | #define GPIOC_OSC32_IN 14U | ||
127 | #define GPIOC_OSC32_OUT 15U | ||
128 | |||
129 | #define GPIOD_PIN0 0U | ||
130 | #define GPIOD_PIN1 1U | ||
131 | #define GPIOD_PIN2 2U | ||
132 | #define GPIOD_PIN3 3U | ||
133 | #define GPIOD_PIN4 4U | ||
134 | #define GPIOD_PIN5 5U | ||
135 | #define GPIOD_PIN6 6U | ||
136 | #define GPIOD_PIN7 7U | ||
137 | #define GPIOD_PIN8 8U | ||
138 | #define GPIOD_PIN9 9U | ||
139 | #define GPIOD_PIN10 10U | ||
140 | #define GPIOD_PIN11 11U | ||
141 | #define GPIOD_PIN12 12U | ||
142 | #define GPIOD_PIN13 13U | ||
143 | #define GPIOD_PIN14 14U | ||
144 | #define GPIOD_PIN15 15U | ||
145 | |||
146 | #define GPIOE_PIN0 0U | ||
147 | #define GPIOE_PIN1 1U | ||
148 | #define GPIOE_PIN2 2U | ||
149 | #define GPIOE_PIN3 3U | ||
150 | #define GPIOE_PIN4 4U | ||
151 | #define GPIOE_PIN5 5U | ||
152 | #define GPIOE_PIN6 6U | ||
153 | #define GPIOE_PIN7 7U | ||
154 | #define GPIOE_PIN8 8U | ||
155 | #define GPIOE_PIN9 9U | ||
156 | #define GPIOE_PIN10 10U | ||
157 | #define GPIOE_PIN11 11U | ||
158 | #define GPIOE_PIN12 12U | ||
159 | #define GPIOE_PIN13 13U | ||
160 | #define GPIOE_PIN14 14U | ||
161 | #define GPIOE_PIN15 15U | ||
162 | |||
163 | #define GPIOF_PIN0 0U | ||
164 | #define GPIOF_PIN1 1U | ||
165 | #define GPIOF_PIN2 2U | ||
166 | #define GPIOF_PIN3 3U | ||
167 | #define GPIOF_PIN4 4U | ||
168 | #define GPIOF_PIN5 5U | ||
169 | #define GPIOF_PIN6 6U | ||
170 | #define GPIOF_PIN7 7U | ||
171 | #define GPIOF_PIN8 8U | ||
172 | #define GPIOF_PIN9 9U | ||
173 | #define GPIOF_PIN10 10U | ||
174 | #define GPIOF_PIN11 11U | ||
175 | #define GPIOF_PIN12 12U | ||
176 | #define GPIOF_PIN13 13U | ||
177 | #define GPIOF_PIN14 14U | ||
178 | #define GPIOF_PIN15 15U | ||
179 | |||
180 | #define GPIOG_PIN0 0U | ||
181 | #define GPIOG_PIN1 1U | ||
182 | #define GPIOG_PIN2 2U | ||
183 | #define GPIOG_PIN3 3U | ||
184 | #define GPIOG_PIN4 4U | ||
185 | #define GPIOG_PIN5 5U | ||
186 | #define GPIOG_PIN6 6U | ||
187 | #define GPIOG_PIN7 7U | ||
188 | #define GPIOG_PIN8 8U | ||
189 | #define GPIOG_PIN9 9U | ||
190 | #define GPIOG_PIN10 10U | ||
191 | #define GPIOG_PIN11 11U | ||
192 | #define GPIOG_PIN12 12U | ||
193 | #define GPIOG_PIN13 13U | ||
194 | #define GPIOG_PIN14 14U | ||
195 | #define GPIOG_PIN15 15U | ||
196 | |||
197 | #define GPIOH_OSC_IN 0U | ||
198 | #define GPIOH_OSC_OUT 1U | ||
199 | #define GPIOH_PIN2 2U | ||
200 | #define GPIOH_PIN3 3U | ||
201 | #define GPIOH_PIN4 4U | ||
202 | #define GPIOH_PIN5 5U | ||
203 | #define GPIOH_PIN6 6U | ||
204 | #define GPIOH_PIN7 7U | ||
205 | #define GPIOH_PIN8 8U | ||
206 | #define GPIOH_PIN9 9U | ||
207 | #define GPIOH_PIN10 10U | ||
208 | #define GPIOH_PIN11 11U | ||
209 | #define GPIOH_PIN12 12U | ||
210 | #define GPIOH_PIN13 13U | ||
211 | #define GPIOH_PIN14 14U | ||
212 | #define GPIOH_PIN15 15U | ||
213 | |||
214 | /* | ||
215 | * IO lines assignments. | ||
216 | */ | ||
217 | #define LINE_ARD_A0 PAL_LINE(GPIOA, 0U) | ||
218 | #define LINE_ACD12_IN5 PAL_LINE(GPIOA, 0U) | ||
219 | #define LINE_ARD_A1 PAL_LINE(GPIOA, 1U) | ||
220 | #define LINE_ACD12_IN6 PAL_LINE(GPIOA, 1U) | ||
221 | #define LINE_ARD_D1 PAL_LINE(GPIOA, 2U) | ||
222 | #define LINE_USART2_TX PAL_LINE(GPIOA, 2U) | ||
223 | #define LINE_ARD_D0 PAL_LINE(GPIOA, 3U) | ||
224 | #define LINE_USART2_RX PAL_LINE(GPIOA, 3U) | ||
225 | #define LINE_ARD_A2 PAL_LINE(GPIOA, 4U) | ||
226 | #define LINE_ACD12_IN9 PAL_LINE(GPIOA, 4U) | ||
227 | #define LINE_ARD_D13 PAL_LINE(GPIOA, 5U) | ||
228 | #define LINE_LED_GREEN PAL_LINE(GPIOA, 5U) | ||
229 | #define LINE_ARD_D12 PAL_LINE(GPIOA, 6U) | ||
230 | #define LINE_ARD_D11 PAL_LINE(GPIOA, 7U) | ||
231 | #define LINE_ARD_D7 PAL_LINE(GPIOA, 8U) | ||
232 | #define LINE_ARD_D8 PAL_LINE(GPIOA, 9U) | ||
233 | #define LINE_ARD_D2 PAL_LINE(GPIOA, 10U) | ||
234 | #define LINE_SWDIO PAL_LINE(GPIOA, 13U) | ||
235 | #define LINE_SWCLK PAL_LINE(GPIOA, 14U) | ||
236 | #define LINE_ARD_A3 PAL_LINE(GPIOB, 0U) | ||
237 | #define LINE_ACD12_IN15 PAL_LINE(GPIOB, 0U) | ||
238 | #define LINE_ARD_D3 PAL_LINE(GPIOB, 3U) | ||
239 | #define LINE_SWO PAL_LINE(GPIOB, 3U) | ||
240 | #define LINE_ARD_D5 PAL_LINE(GPIOB, 4U) | ||
241 | #define LINE_ARD_D4 PAL_LINE(GPIOB, 5U) | ||
242 | #define LINE_ARD_D10 PAL_LINE(GPIOB, 6U) | ||
243 | #define LINE_ARD_D15 PAL_LINE(GPIOB, 8U) | ||
244 | #define LINE_ARD_D14 PAL_LINE(GPIOB, 9U) | ||
245 | #define LINE_ARD_D6 PAL_LINE(GPIOB, 10U) | ||
246 | #define LINE_ARD_A5 PAL_LINE(GPIOC, 0U) | ||
247 | #define LINE_ACD123_IN1 PAL_LINE(GPIOC, 0U) | ||
248 | #define LINE_ARD_A4 PAL_LINE(GPIOC, 1U) | ||
249 | #define LINE_ACD123_IN2 PAL_LINE(GPIOC, 1U) | ||
250 | #define LINE_ARD_D9 PAL_LINE(GPIOC, 7U) | ||
251 | #define LINE_BUTTON PAL_LINE(GPIOC, 13U) | ||
252 | #define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) | ||
253 | #define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) | ||
254 | #define LINE_OSC_IN PAL_LINE(GPIOH, 0U) | ||
255 | #define LINE_OSC_OUT PAL_LINE(GPIOH, 1U) | ||
256 | |||
257 | /*===========================================================================*/ | ||
258 | /* Driver pre-compile time settings. */ | ||
259 | /*===========================================================================*/ | ||
260 | |||
261 | /*===========================================================================*/ | ||
262 | /* Derived constants and error checks. */ | ||
263 | /*===========================================================================*/ | ||
264 | |||
265 | /*===========================================================================*/ | ||
266 | /* Driver data structures and types. */ | ||
267 | /*===========================================================================*/ | ||
268 | |||
269 | /*===========================================================================*/ | ||
270 | /* Driver macros. */ | ||
271 | /*===========================================================================*/ | ||
272 | |||
273 | /* | ||
274 | * I/O ports initial setup, this configuration is established soon after reset | ||
275 | * in the initialization code. | ||
276 | * Please refer to the STM32 Reference Manual for details. | ||
277 | */ | ||
278 | #define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) | ||
279 | #define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) | ||
280 | #define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) | ||
281 | #define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) | ||
282 | #define PIN_ODR_LOW(n) (0U << (n)) | ||
283 | #define PIN_ODR_HIGH(n) (1U << (n)) | ||
284 | #define PIN_OTYPE_PUSHPULL(n) (0U << (n)) | ||
285 | #define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) | ||
286 | #define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) | ||
287 | #define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) | ||
288 | #define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) | ||
289 | #define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) | ||
290 | #define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) | ||
291 | #define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) | ||
292 | #define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) | ||
293 | #define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) | ||
294 | #define PIN_ASCR_DISABLED(n) (0U << (n)) | ||
295 | #define PIN_ASCR_ENABLED(n) (1U << (n)) | ||
296 | #define PIN_LOCKR_DISABLED(n) (0U << (n)) | ||
297 | #define PIN_LOCKR_ENABLED(n) (1U << (n)) | ||
298 | |||
299 | /* | ||
300 | * GPIOA setup: | ||
301 | * | ||
302 | * PA0 - ARD_A0 ACD12_IN5 (analog). | ||
303 | * PA1 - ARD_A1 ACD12_IN6 (analog). | ||
304 | * PA2 - ARD_D1 USART2_TX (alternate 7). | ||
305 | * PA3 - ARD_D0 USART2_RX (alternate 7). | ||
306 | * PA4 - ARD_A2 ACD12_IN9 (analog). | ||
307 | * PA5 - ARD_D13 LED_GREEN (output pushpull maximum). | ||
308 | * PA6 - ARD_D12 (analog). | ||
309 | * PA7 - ARD_D11 (analog). | ||
310 | * PA8 - ARD_D7 (analog). | ||
311 | * PA9 - ARD_D8 (analog). | ||
312 | * PA10 - ARD_D2 (analog). | ||
313 | * PA11 - PIN11 (analog). | ||
314 | * PA12 - PIN12 (analog). | ||
315 | * PA13 - SWDIO (alternate 0). | ||
316 | * PA14 - SWCLK (alternate 0). | ||
317 | * PA15 - PIN15 (analog). | ||
318 | */ | ||
319 | #define VAL_GPIOA_MODER (PIN_MODE_ANALOG(GPIOA_ARD_A0) | \ | ||
320 | PIN_MODE_ANALOG(GPIOA_ARD_A1) | \ | ||
321 | PIN_MODE_ALTERNATE(GPIOA_ARD_D1) | \ | ||
322 | PIN_MODE_ALTERNATE(GPIOA_ARD_D0) | \ | ||
323 | PIN_MODE_ANALOG(GPIOA_ARD_A2) | \ | ||
324 | PIN_MODE_OUTPUT(GPIOA_ARD_D13) | \ | ||
325 | PIN_MODE_ANALOG(GPIOA_ARD_D12) | \ | ||
326 | PIN_MODE_ANALOG(GPIOA_ARD_D11) | \ | ||
327 | PIN_MODE_ANALOG(GPIOA_ARD_D7) | \ | ||
328 | PIN_MODE_ANALOG(GPIOA_ARD_D8) | \ | ||
329 | PIN_MODE_ANALOG(GPIOA_ARD_D2) | \ | ||
330 | PIN_MODE_ANALOG(GPIOA_PIN11) | \ | ||
331 | PIN_MODE_ANALOG(GPIOA_PIN12) | \ | ||
332 | PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ | ||
333 | PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ | ||
334 | PIN_MODE_ANALOG(GPIOA_PIN15)) | ||
335 | #define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_ARD_A0) | \ | ||
336 | PIN_OTYPE_PUSHPULL(GPIOA_ARD_A1) | \ | ||
337 | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D1) | \ | ||
338 | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D0) | \ | ||
339 | PIN_OTYPE_PUSHPULL(GPIOA_ARD_A2) | \ | ||
340 | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D13) | \ | ||
341 | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D12) | \ | ||
342 | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D11) | \ | ||
343 | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D7) | \ | ||
344 | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D8) | \ | ||
345 | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D2) | \ | ||
346 | PIN_OTYPE_PUSHPULL(GPIOA_PIN11) | \ | ||
347 | PIN_OTYPE_PUSHPULL(GPIOA_PIN12) | \ | ||
348 | PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ | ||
349 | PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ | ||
350 | PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) | ||
351 | #define VAL_GPIOA_OSPEEDR (PIN_OSPEED_HIGH(GPIOA_ARD_A0) | \ | ||
352 | PIN_OSPEED_HIGH(GPIOA_ARD_A1) | \ | ||
353 | PIN_OSPEED_MEDIUM(GPIOA_ARD_D1) | \ | ||
354 | PIN_OSPEED_MEDIUM(GPIOA_ARD_D0) | \ | ||
355 | PIN_OSPEED_HIGH(GPIOA_ARD_A2) | \ | ||
356 | PIN_OSPEED_HIGH(GPIOA_ARD_D13) | \ | ||
357 | PIN_OSPEED_HIGH(GPIOA_ARD_D12) | \ | ||
358 | PIN_OSPEED_HIGH(GPIOA_ARD_D11) | \ | ||
359 | PIN_OSPEED_HIGH(GPIOA_ARD_D7) | \ | ||
360 | PIN_OSPEED_HIGH(GPIOA_ARD_D8) | \ | ||
361 | PIN_OSPEED_HIGH(GPIOA_ARD_D2) | \ | ||
362 | PIN_OSPEED_HIGH(GPIOA_PIN11) | \ | ||
363 | PIN_OSPEED_HIGH(GPIOA_PIN12) | \ | ||
364 | PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ | ||
365 | PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ | ||
366 | PIN_OSPEED_HIGH(GPIOA_PIN15)) | ||
367 | #define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_ARD_A0) | \ | ||
368 | PIN_PUPDR_FLOATING(GPIOA_ARD_A1) | \ | ||
369 | PIN_PUPDR_FLOATING(GPIOA_ARD_D1) | \ | ||
370 | PIN_PUPDR_FLOATING(GPIOA_ARD_D0) | \ | ||
371 | PIN_PUPDR_FLOATING(GPIOA_ARD_A2) | \ | ||
372 | PIN_PUPDR_FLOATING(GPIOA_ARD_D13) | \ | ||
373 | PIN_PUPDR_FLOATING(GPIOA_ARD_D12) | \ | ||
374 | PIN_PUPDR_FLOATING(GPIOA_ARD_D11) | \ | ||
375 | PIN_PUPDR_FLOATING(GPIOA_ARD_D7) | \ | ||
376 | PIN_PUPDR_FLOATING(GPIOA_ARD_D8) | \ | ||
377 | PIN_PUPDR_FLOATING(GPIOA_ARD_D2) | \ | ||
378 | PIN_PUPDR_FLOATING(GPIOA_PIN11) | \ | ||
379 | PIN_PUPDR_FLOATING(GPIOA_PIN12) | \ | ||
380 | PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \ | ||
381 | PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ | ||
382 | PIN_PUPDR_FLOATING(GPIOA_PIN15)) | ||
383 | #define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_ARD_A0) | \ | ||
384 | PIN_ODR_HIGH(GPIOA_ARD_A1) | \ | ||
385 | PIN_ODR_HIGH(GPIOA_ARD_D1) | \ | ||
386 | PIN_ODR_HIGH(GPIOA_ARD_D0) | \ | ||
387 | PIN_ODR_HIGH(GPIOA_ARD_A2) | \ | ||
388 | PIN_ODR_LOW(GPIOA_ARD_D13) | \ | ||
389 | PIN_ODR_HIGH(GPIOA_ARD_D12) | \ | ||
390 | PIN_ODR_HIGH(GPIOA_ARD_D11) | \ | ||
391 | PIN_ODR_HIGH(GPIOA_ARD_D7) | \ | ||
392 | PIN_ODR_HIGH(GPIOA_ARD_D8) | \ | ||
393 | PIN_ODR_HIGH(GPIOA_ARD_D2) | \ | ||
394 | PIN_ODR_HIGH(GPIOA_PIN11) | \ | ||
395 | PIN_ODR_HIGH(GPIOA_PIN12) | \ | ||
396 | PIN_ODR_HIGH(GPIOA_SWDIO) | \ | ||
397 | PIN_ODR_HIGH(GPIOA_SWCLK) | \ | ||
398 | PIN_ODR_HIGH(GPIOA_PIN15)) | ||
399 | #define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_ARD_A0, 0U) | \ | ||
400 | PIN_AFIO_AF(GPIOA_ARD_A1, 0U) | \ | ||
401 | PIN_AFIO_AF(GPIOA_ARD_D1, 7U) | \ | ||
402 | PIN_AFIO_AF(GPIOA_ARD_D0, 7U) | \ | ||
403 | PIN_AFIO_AF(GPIOA_ARD_A2, 0U) | \ | ||
404 | PIN_AFIO_AF(GPIOA_ARD_D13, 0U) | \ | ||
405 | PIN_AFIO_AF(GPIOA_ARD_D12, 0U) | \ | ||
406 | PIN_AFIO_AF(GPIOA_ARD_D11, 0U)) | ||
407 | #define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_ARD_D7, 0U) | \ | ||
408 | PIN_AFIO_AF(GPIOA_ARD_D8, 0U) | \ | ||
409 | PIN_AFIO_AF(GPIOA_ARD_D2, 0U) | \ | ||
410 | PIN_AFIO_AF(GPIOA_PIN11, 0U) | \ | ||
411 | PIN_AFIO_AF(GPIOA_PIN12, 0U) | \ | ||
412 | PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \ | ||
413 | PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \ | ||
414 | PIN_AFIO_AF(GPIOA_PIN15, 0U)) | ||
415 | #define VAL_GPIOA_ASCR (PIN_ASCR_DISABLED(GPIOA_ARD_A0) | \ | ||
416 | PIN_ASCR_DISABLED(GPIOA_ARD_A1) | \ | ||
417 | PIN_ASCR_DISABLED(GPIOA_ARD_D1) | \ | ||
418 | PIN_ASCR_DISABLED(GPIOA_ARD_D0) | \ | ||
419 | PIN_ASCR_DISABLED(GPIOA_ARD_A2) | \ | ||
420 | PIN_ASCR_DISABLED(GPIOA_ARD_D13) | \ | ||
421 | PIN_ASCR_DISABLED(GPIOA_ARD_D12) | \ | ||
422 | PIN_ASCR_DISABLED(GPIOA_ARD_D11) | \ | ||
423 | PIN_ASCR_DISABLED(GPIOA_ARD_D7) | \ | ||
424 | PIN_ASCR_DISABLED(GPIOA_ARD_D8) | \ | ||
425 | PIN_ASCR_DISABLED(GPIOA_ARD_D2) | \ | ||
426 | PIN_ASCR_DISABLED(GPIOA_PIN11) | \ | ||
427 | PIN_ASCR_DISABLED(GPIOA_PIN12) | \ | ||
428 | PIN_ASCR_DISABLED(GPIOA_SWDIO) | \ | ||
429 | PIN_ASCR_DISABLED(GPIOA_SWCLK) | \ | ||
430 | PIN_ASCR_DISABLED(GPIOA_PIN15)) | ||
431 | #define VAL_GPIOA_LOCKR (PIN_LOCKR_DISABLED(GPIOA_ARD_A0) | \ | ||
432 | PIN_LOCKR_DISABLED(GPIOA_ARD_A1) | \ | ||
433 | PIN_LOCKR_DISABLED(GPIOA_ARD_D1) | \ | ||
434 | PIN_LOCKR_DISABLED(GPIOA_ARD_D0) | \ | ||
435 | PIN_LOCKR_DISABLED(GPIOA_ARD_A2) | \ | ||
436 | PIN_LOCKR_DISABLED(GPIOA_ARD_D13) | \ | ||
437 | PIN_LOCKR_DISABLED(GPIOA_ARD_D12) | \ | ||
438 | PIN_LOCKR_DISABLED(GPIOA_ARD_D11) | \ | ||
439 | PIN_LOCKR_DISABLED(GPIOA_ARD_D7) | \ | ||
440 | PIN_LOCKR_DISABLED(GPIOA_ARD_D8) | \ | ||
441 | PIN_LOCKR_DISABLED(GPIOA_ARD_D2) | \ | ||
442 | PIN_LOCKR_DISABLED(GPIOA_PIN11) | \ | ||
443 | PIN_LOCKR_DISABLED(GPIOA_PIN12) | \ | ||
444 | PIN_LOCKR_DISABLED(GPIOA_SWDIO) | \ | ||
445 | PIN_LOCKR_DISABLED(GPIOA_SWCLK) | \ | ||
446 | PIN_LOCKR_DISABLED(GPIOA_PIN15)) | ||
447 | |||
448 | /* | ||
449 | * GPIOB setup: | ||
450 | * | ||
451 | * PB0 - ARD_A3 ACD12_IN15 (analog). | ||
452 | * PB1 - PIN1 (analog). | ||
453 | * PB2 - PIN2 (analog). | ||
454 | * PB3 - ARD_D3 SWO (analog). | ||
455 | * PB4 - ARD_D5 (analog). | ||
456 | * PB5 - ARD_D4 (analog). | ||
457 | * PB6 - ARD_D10 (analog). | ||
458 | * PB7 - PIN7 (analog). | ||
459 | * PB8 - ARD_D15 (analog). | ||
460 | * PB9 - ARD_D14 (analog). | ||
461 | * PB10 - ARD_D6 (analog). | ||
462 | * PB11 - PIN11 (analog). | ||
463 | * PB12 - PIN12 (analog). | ||
464 | * PB13 - PIN13 (analog). | ||
465 | * PB14 - PIN14 (analog). | ||
466 | * PB15 - PIN15 (analog). | ||
467 | */ | ||
468 | #define VAL_GPIOB_MODER (PIN_MODE_ANALOG(GPIOB_ARD_A3) | \ | ||
469 | PIN_MODE_ANALOG(GPIOB_PIN1) | \ | ||
470 | PIN_MODE_ANALOG(GPIOB_PIN2) | \ | ||
471 | PIN_MODE_ANALOG(GPIOB_ARD_D3) | \ | ||
472 | PIN_MODE_ANALOG(GPIOB_ARD_D5) | \ | ||
473 | PIN_MODE_ANALOG(GPIOB_ARD_D4) | \ | ||
474 | PIN_MODE_ANALOG(GPIOB_ARD_D10) | \ | ||
475 | PIN_MODE_ANALOG(GPIOB_PIN7) | \ | ||
476 | PIN_MODE_ANALOG(GPIOB_ARD_D15) | \ | ||
477 | PIN_MODE_ANALOG(GPIOB_ARD_D14) | \ | ||
478 | PIN_MODE_ANALOG(GPIOB_ARD_D6) | \ | ||
479 | PIN_MODE_ANALOG(GPIOB_PIN11) | \ | ||
480 | PIN_MODE_ANALOG(GPIOB_PIN12) | \ | ||
481 | PIN_MODE_ANALOG(GPIOB_PIN13) | \ | ||
482 | PIN_MODE_ANALOG(GPIOB_PIN14) | \ | ||
483 | PIN_MODE_ANALOG(GPIOB_PIN15)) | ||
484 | #define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_ARD_A3) | \ | ||
485 | PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ | ||
486 | PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ | ||
487 | PIN_OTYPE_PUSHPULL(GPIOB_ARD_D3) | \ | ||
488 | PIN_OTYPE_PUSHPULL(GPIOB_ARD_D5) | \ | ||
489 | PIN_OTYPE_PUSHPULL(GPIOB_ARD_D4) | \ | ||
490 | PIN_OTYPE_PUSHPULL(GPIOB_ARD_D10) | \ | ||
491 | PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ | ||
492 | PIN_OTYPE_PUSHPULL(GPIOB_ARD_D15) | \ | ||
493 | PIN_OTYPE_PUSHPULL(GPIOB_ARD_D14) | \ | ||
494 | PIN_OTYPE_PUSHPULL(GPIOB_ARD_D6) | \ | ||
495 | PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ | ||
496 | PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ | ||
497 | PIN_OTYPE_PUSHPULL(GPIOB_PIN13) | \ | ||
498 | PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | \ | ||
499 | PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) | ||
500 | #define VAL_GPIOB_OSPEEDR (PIN_OSPEED_HIGH(GPIOB_ARD_A3) | \ | ||
501 | PIN_OSPEED_HIGH(GPIOB_PIN1) | \ | ||
502 | PIN_OSPEED_HIGH(GPIOB_PIN2) | \ | ||
503 | PIN_OSPEED_HIGH(GPIOB_ARD_D3) | \ | ||
504 | PIN_OSPEED_HIGH(GPIOB_ARD_D5) | \ | ||
505 | PIN_OSPEED_HIGH(GPIOB_ARD_D4) | \ | ||
506 | PIN_OSPEED_HIGH(GPIOB_ARD_D10) | \ | ||
507 | PIN_OSPEED_HIGH(GPIOB_PIN7) | \ | ||
508 | PIN_OSPEED_HIGH(GPIOB_ARD_D15) | \ | ||
509 | PIN_OSPEED_HIGH(GPIOB_ARD_D14) | \ | ||
510 | PIN_OSPEED_HIGH(GPIOB_ARD_D6) | \ | ||
511 | PIN_OSPEED_HIGH(GPIOB_PIN11) | \ | ||
512 | PIN_OSPEED_HIGH(GPIOB_PIN12) | \ | ||
513 | PIN_OSPEED_HIGH(GPIOB_PIN13) | \ | ||
514 | PIN_OSPEED_HIGH(GPIOB_PIN14) | \ | ||
515 | PIN_OSPEED_HIGH(GPIOB_PIN15)) | ||
516 | #define VAL_GPIOB_PUPDR (PIN_PUPDR_FLOATING(GPIOB_ARD_A3) | \ | ||
517 | PIN_PUPDR_FLOATING(GPIOB_PIN1) | \ | ||
518 | PIN_PUPDR_FLOATING(GPIOB_PIN2) | \ | ||
519 | PIN_PUPDR_FLOATING(GPIOB_ARD_D3) | \ | ||
520 | PIN_PUPDR_FLOATING(GPIOB_ARD_D5) | \ | ||
521 | PIN_PUPDR_FLOATING(GPIOB_ARD_D4) | \ | ||
522 | PIN_PUPDR_FLOATING(GPIOB_ARD_D10) | \ | ||
523 | PIN_PUPDR_FLOATING(GPIOB_PIN7) | \ | ||
524 | PIN_PUPDR_FLOATING(GPIOB_ARD_D15) | \ | ||
525 | PIN_PUPDR_FLOATING(GPIOB_ARD_D14) | \ | ||
526 | PIN_PUPDR_FLOATING(GPIOB_ARD_D6) | \ | ||
527 | PIN_PUPDR_FLOATING(GPIOB_PIN11) | \ | ||
528 | PIN_PUPDR_FLOATING(GPIOB_PIN12) | \ | ||
529 | PIN_PUPDR_FLOATING(GPIOB_PIN13) | \ | ||
530 | PIN_PUPDR_FLOATING(GPIOB_PIN14) | \ | ||
531 | PIN_PUPDR_FLOATING(GPIOB_PIN15)) | ||
532 | #define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_ARD_A3) | \ | ||
533 | PIN_ODR_HIGH(GPIOB_PIN1) | \ | ||
534 | PIN_ODR_HIGH(GPIOB_PIN2) | \ | ||
535 | PIN_ODR_HIGH(GPIOB_ARD_D3) | \ | ||
536 | PIN_ODR_HIGH(GPIOB_ARD_D5) | \ | ||
537 | PIN_ODR_HIGH(GPIOB_ARD_D4) | \ | ||
538 | PIN_ODR_HIGH(GPIOB_ARD_D10) | \ | ||
539 | PIN_ODR_HIGH(GPIOB_PIN7) | \ | ||
540 | PIN_ODR_HIGH(GPIOB_ARD_D15) | \ | ||
541 | PIN_ODR_HIGH(GPIOB_ARD_D14) | \ | ||
542 | PIN_ODR_HIGH(GPIOB_ARD_D6) | \ | ||
543 | PIN_ODR_HIGH(GPIOB_PIN11) | \ | ||
544 | PIN_ODR_HIGH(GPIOB_PIN12) | \ | ||
545 | PIN_ODR_HIGH(GPIOB_PIN13) | \ | ||
546 | PIN_ODR_HIGH(GPIOB_PIN14) | \ | ||
547 | PIN_ODR_HIGH(GPIOB_PIN15)) | ||
548 | #define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_ARD_A3, 0U) | \ | ||
549 | PIN_AFIO_AF(GPIOB_PIN1, 0U) | \ | ||
550 | PIN_AFIO_AF(GPIOB_PIN2, 0U) | \ | ||
551 | PIN_AFIO_AF(GPIOB_ARD_D3, 0U) | \ | ||
552 | PIN_AFIO_AF(GPIOB_ARD_D5, 0U) | \ | ||
553 | PIN_AFIO_AF(GPIOB_ARD_D4, 0U) | \ | ||
554 | PIN_AFIO_AF(GPIOB_ARD_D10, 0U) | \ | ||
555 | PIN_AFIO_AF(GPIOB_PIN7, 0U)) | ||
556 | #define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_ARD_D15, 0U) | \ | ||
557 | PIN_AFIO_AF(GPIOB_ARD_D14, 0U) | \ | ||
558 | PIN_AFIO_AF(GPIOB_ARD_D6, 0U) | \ | ||
559 | PIN_AFIO_AF(GPIOB_PIN11, 0U) | \ | ||
560 | PIN_AFIO_AF(GPIOB_PIN12, 0U) | \ | ||
561 | PIN_AFIO_AF(GPIOB_PIN13, 0U) | \ | ||
562 | PIN_AFIO_AF(GPIOB_PIN14, 0U) | \ | ||
563 | PIN_AFIO_AF(GPIOB_PIN15, 0U)) | ||
564 | #define VAL_GPIOB_ASCR (PIN_ASCR_DISABLED(GPIOB_ARD_A3) | \ | ||
565 | PIN_ASCR_DISABLED(GPIOB_PIN1) | \ | ||
566 | PIN_ASCR_DISABLED(GPIOB_PIN2) | \ | ||
567 | PIN_ASCR_DISABLED(GPIOB_ARD_D3) | \ | ||
568 | PIN_ASCR_DISABLED(GPIOB_ARD_D5) | \ | ||
569 | PIN_ASCR_DISABLED(GPIOB_ARD_D4) | \ | ||
570 | PIN_ASCR_DISABLED(GPIOB_ARD_D10) | \ | ||
571 | PIN_ASCR_DISABLED(GPIOB_PIN7) | \ | ||
572 | PIN_ASCR_DISABLED(GPIOB_ARD_D15) | \ | ||
573 | PIN_ASCR_DISABLED(GPIOB_ARD_D14) | \ | ||
574 | PIN_ASCR_DISABLED(GPIOB_ARD_D6) | \ | ||
575 | PIN_ASCR_DISABLED(GPIOB_PIN11) | \ | ||
576 | PIN_ASCR_DISABLED(GPIOB_PIN12) | \ | ||
577 | PIN_ASCR_DISABLED(GPIOB_PIN13) | \ | ||
578 | PIN_ASCR_DISABLED(GPIOB_PIN14) | \ | ||
579 | PIN_ASCR_DISABLED(GPIOB_PIN15)) | ||
580 | #define VAL_GPIOB_LOCKR (PIN_LOCKR_DISABLED(GPIOB_ARD_A3) | \ | ||
581 | PIN_LOCKR_DISABLED(GPIOB_PIN1) | \ | ||
582 | PIN_LOCKR_DISABLED(GPIOB_PIN2) | \ | ||
583 | PIN_LOCKR_DISABLED(GPIOB_ARD_D3) | \ | ||
584 | PIN_LOCKR_DISABLED(GPIOB_ARD_D5) | \ | ||
585 | PIN_LOCKR_DISABLED(GPIOB_ARD_D4) | \ | ||
586 | PIN_LOCKR_DISABLED(GPIOB_ARD_D10) | \ | ||
587 | PIN_LOCKR_DISABLED(GPIOB_PIN7) | \ | ||
588 | PIN_LOCKR_DISABLED(GPIOB_ARD_D15) | \ | ||
589 | PIN_LOCKR_DISABLED(GPIOB_ARD_D14) | \ | ||
590 | PIN_LOCKR_DISABLED(GPIOB_ARD_D6) | \ | ||
591 | PIN_LOCKR_DISABLED(GPIOB_PIN11) | \ | ||
592 | PIN_LOCKR_DISABLED(GPIOB_PIN12) | \ | ||
593 | PIN_LOCKR_DISABLED(GPIOB_PIN13) | \ | ||
594 | PIN_LOCKR_DISABLED(GPIOB_PIN14) | \ | ||
595 | PIN_LOCKR_DISABLED(GPIOB_PIN15)) | ||
596 | |||
597 | /* | ||
598 | * GPIOC setup: | ||
599 | * | ||
600 | * PC0 - ARD_A5 ACD123_IN1 (analog). | ||
601 | * PC1 - ARD_A4 ACD123_IN2 (analog). | ||
602 | * PC2 - PIN2 (analog). | ||
603 | * PC3 - PIN3 (analog). | ||
604 | * PC4 - PIN4 (analog). | ||
605 | * PC5 - PIN5 (analog). | ||
606 | * PC6 - PIN6 (analog). | ||
607 | * PC7 - ARD_D9 (analog). | ||
608 | * PC8 - PIN8 (analog). | ||
609 | * PC9 - PIN9 (analog). | ||
610 | * PC10 - PIN10 (analog). | ||
611 | * PC11 - PIN11 (analog). | ||
612 | * PC12 - PIN12 (analog). | ||
613 | * PC13 - BUTTON (input floating). | ||
614 | * PC14 - OSC32_IN (input floating). | ||
615 | * PC15 - OSC32_OUT (input floating). | ||
616 | */ | ||
617 | #define VAL_GPIOC_MODER (PIN_MODE_ANALOG(GPIOC_ARD_A5) | \ | ||
618 | PIN_MODE_ANALOG(GPIOC_ARD_A4) | \ | ||
619 | PIN_MODE_ANALOG(GPIOC_PIN2) | \ | ||
620 | PIN_MODE_ANALOG(GPIOC_PIN3) | \ | ||
621 | PIN_MODE_ANALOG(GPIOC_PIN4) | \ | ||
622 | PIN_MODE_ANALOG(GPIOC_PIN5) | \ | ||
623 | PIN_MODE_ANALOG(GPIOC_PIN6) | \ | ||
624 | PIN_MODE_ANALOG(GPIOC_ARD_D9) | \ | ||
625 | PIN_MODE_ANALOG(GPIOC_PIN8) | \ | ||
626 | PIN_MODE_ANALOG(GPIOC_PIN9) | \ | ||
627 | PIN_MODE_ANALOG(GPIOC_PIN10) | \ | ||
628 | PIN_MODE_ANALOG(GPIOC_PIN11) | \ | ||
629 | PIN_MODE_ANALOG(GPIOC_PIN12) | \ | ||
630 | PIN_MODE_INPUT(GPIOC_BUTTON) | \ | ||
631 | PIN_MODE_INPUT(GPIOC_OSC32_IN) | \ | ||
632 | PIN_MODE_INPUT(GPIOC_OSC32_OUT)) | ||
633 | #define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_ARD_A5) | \ | ||
634 | PIN_OTYPE_PUSHPULL(GPIOC_ARD_A4) | \ | ||
635 | PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ | ||
636 | PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ | ||
637 | PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ | ||
638 | PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ | ||
639 | PIN_OTYPE_PUSHPULL(GPIOC_PIN6) | \ | ||
640 | PIN_OTYPE_PUSHPULL(GPIOC_ARD_D9) | \ | ||
641 | PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | \ | ||
642 | PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | \ | ||
643 | PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ | ||
644 | PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ | ||
645 | PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ | ||
646 | PIN_OTYPE_PUSHPULL(GPIOC_BUTTON) | \ | ||
647 | PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \ | ||
648 | PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT)) | ||
649 | #define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_ARD_A5) | \ | ||
650 | PIN_OSPEED_HIGH(GPIOC_ARD_A4) | \ | ||
651 | PIN_OSPEED_HIGH(GPIOC_PIN2) | \ | ||
652 | PIN_OSPEED_HIGH(GPIOC_PIN3) | \ | ||
653 | PIN_OSPEED_HIGH(GPIOC_PIN4) | \ | ||
654 | PIN_OSPEED_HIGH(GPIOC_PIN5) | \ | ||
655 | PIN_OSPEED_HIGH(GPIOC_PIN6) | \ | ||
656 | PIN_OSPEED_HIGH(GPIOC_ARD_D9) | \ | ||
657 | PIN_OSPEED_HIGH(GPIOC_PIN8) | \ | ||
658 | PIN_OSPEED_HIGH(GPIOC_PIN9) | \ | ||
659 | PIN_OSPEED_HIGH(GPIOC_PIN10) | \ | ||
660 | PIN_OSPEED_HIGH(GPIOC_PIN11) | \ | ||
661 | PIN_OSPEED_HIGH(GPIOC_PIN12) | \ | ||
662 | PIN_OSPEED_HIGH(GPIOC_BUTTON) | \ | ||
663 | PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \ | ||
664 | PIN_OSPEED_HIGH(GPIOC_OSC32_OUT)) | ||
665 | #define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_ARD_A5) | \ | ||
666 | PIN_PUPDR_FLOATING(GPIOC_ARD_A4) | \ | ||
667 | PIN_PUPDR_FLOATING(GPIOC_PIN2) | \ | ||
668 | PIN_PUPDR_FLOATING(GPIOC_PIN3) | \ | ||
669 | PIN_PUPDR_FLOATING(GPIOC_PIN4) | \ | ||
670 | PIN_PUPDR_FLOATING(GPIOC_PIN5) | \ | ||
671 | PIN_PUPDR_FLOATING(GPIOC_PIN6) | \ | ||
672 | PIN_PUPDR_FLOATING(GPIOC_ARD_D9) | \ | ||
673 | PIN_PUPDR_FLOATING(GPIOC_PIN8) | \ | ||
674 | PIN_PUPDR_FLOATING(GPIOC_PIN9) | \ | ||
675 | PIN_PUPDR_FLOATING(GPIOC_PIN10) | \ | ||
676 | PIN_PUPDR_FLOATING(GPIOC_PIN11) | \ | ||
677 | PIN_PUPDR_FLOATING(GPIOC_PIN12) | \ | ||
678 | PIN_PUPDR_FLOATING(GPIOC_BUTTON) | \ | ||
679 | PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \ | ||
680 | PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT)) | ||
681 | #define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_ARD_A5) | \ | ||
682 | PIN_ODR_HIGH(GPIOC_ARD_A4) | \ | ||
683 | PIN_ODR_HIGH(GPIOC_PIN2) | \ | ||
684 | PIN_ODR_HIGH(GPIOC_PIN3) | \ | ||
685 | PIN_ODR_HIGH(GPIOC_PIN4) | \ | ||
686 | PIN_ODR_HIGH(GPIOC_PIN5) | \ | ||
687 | PIN_ODR_HIGH(GPIOC_PIN6) | \ | ||
688 | PIN_ODR_HIGH(GPIOC_ARD_D9) | \ | ||
689 | PIN_ODR_HIGH(GPIOC_PIN8) | \ | ||
690 | PIN_ODR_HIGH(GPIOC_PIN9) | \ | ||
691 | PIN_ODR_HIGH(GPIOC_PIN10) | \ | ||
692 | PIN_ODR_HIGH(GPIOC_PIN11) | \ | ||
693 | PIN_ODR_HIGH(GPIOC_PIN12) | \ | ||
694 | PIN_ODR_HIGH(GPIOC_BUTTON) | \ | ||
695 | PIN_ODR_HIGH(GPIOC_OSC32_IN) | \ | ||
696 | PIN_ODR_HIGH(GPIOC_OSC32_OUT)) | ||
697 | #define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_ARD_A5, 0U) | \ | ||
698 | PIN_AFIO_AF(GPIOC_ARD_A4, 0U) | \ | ||
699 | PIN_AFIO_AF(GPIOC_PIN2, 0U) | \ | ||
700 | PIN_AFIO_AF(GPIOC_PIN3, 0U) | \ | ||
701 | PIN_AFIO_AF(GPIOC_PIN4, 0U) | \ | ||
702 | PIN_AFIO_AF(GPIOC_PIN5, 0U) | \ | ||
703 | PIN_AFIO_AF(GPIOC_PIN6, 0U) | \ | ||
704 | PIN_AFIO_AF(GPIOC_ARD_D9, 0U)) | ||
705 | #define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0U) | \ | ||
706 | PIN_AFIO_AF(GPIOC_PIN9, 0U) | \ | ||
707 | PIN_AFIO_AF(GPIOC_PIN10, 0U) | \ | ||
708 | PIN_AFIO_AF(GPIOC_PIN11, 0U) | \ | ||
709 | PIN_AFIO_AF(GPIOC_PIN12, 0U) | \ | ||
710 | PIN_AFIO_AF(GPIOC_BUTTON, 0U) | \ | ||
711 | PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \ | ||
712 | PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U)) | ||
713 | #define VAL_GPIOC_ASCR (PIN_ASCR_DISABLED(GPIOC_ARD_A5) | \ | ||
714 | PIN_ASCR_DISABLED(GPIOC_ARD_A4) | \ | ||
715 | PIN_ASCR_DISABLED(GPIOC_PIN2) | \ | ||
716 | PIN_ASCR_DISABLED(GPIOC_PIN3) | \ | ||
717 | PIN_ASCR_DISABLED(GPIOC_PIN4) | \ | ||
718 | PIN_ASCR_DISABLED(GPIOC_PIN5) | \ | ||
719 | PIN_ASCR_DISABLED(GPIOC_PIN6) | \ | ||
720 | PIN_ASCR_DISABLED(GPIOC_ARD_D9) | \ | ||
721 | PIN_ASCR_DISABLED(GPIOC_PIN8) | \ | ||
722 | PIN_ASCR_DISABLED(GPIOC_PIN9) | \ | ||
723 | PIN_ASCR_DISABLED(GPIOC_PIN10) | \ | ||
724 | PIN_ASCR_DISABLED(GPIOC_PIN11) | \ | ||
725 | PIN_ASCR_DISABLED(GPIOC_PIN12) | \ | ||
726 | PIN_ASCR_DISABLED(GPIOC_BUTTON) | \ | ||
727 | PIN_ASCR_DISABLED(GPIOC_OSC32_IN) | \ | ||
728 | PIN_ASCR_DISABLED(GPIOC_OSC32_OUT)) | ||
729 | #define VAL_GPIOC_LOCKR (PIN_LOCKR_DISABLED(GPIOC_ARD_A5) | \ | ||
730 | PIN_LOCKR_DISABLED(GPIOC_ARD_A4) | \ | ||
731 | PIN_LOCKR_DISABLED(GPIOC_PIN2) | \ | ||
732 | PIN_LOCKR_DISABLED(GPIOC_PIN3) | \ | ||
733 | PIN_LOCKR_DISABLED(GPIOC_PIN4) | \ | ||
734 | PIN_LOCKR_DISABLED(GPIOC_PIN5) | \ | ||
735 | PIN_LOCKR_DISABLED(GPIOC_PIN6) | \ | ||
736 | PIN_LOCKR_DISABLED(GPIOC_ARD_D9) | \ | ||
737 | PIN_LOCKR_DISABLED(GPIOC_PIN8) | \ | ||
738 | PIN_LOCKR_DISABLED(GPIOC_PIN9) | \ | ||
739 | PIN_LOCKR_DISABLED(GPIOC_PIN10) | \ | ||
740 | PIN_LOCKR_DISABLED(GPIOC_PIN11) | \ | ||
741 | PIN_LOCKR_DISABLED(GPIOC_PIN12) | \ | ||
742 | PIN_LOCKR_DISABLED(GPIOC_BUTTON) | \ | ||
743 | PIN_LOCKR_DISABLED(GPIOC_OSC32_IN) | \ | ||
744 | PIN_LOCKR_DISABLED(GPIOC_OSC32_OUT)) | ||
745 | |||
746 | /* | ||
747 | * GPIOD setup: | ||
748 | * | ||
749 | * PD0 - PIN0 (analog). | ||
750 | * PD1 - PIN1 (analog). | ||
751 | * PD2 - PIN2 (analog). | ||
752 | * PD3 - PIN3 (analog). | ||
753 | * PD4 - PIN4 (analog). | ||
754 | * PD5 - PIN5 (analog). | ||
755 | * PD6 - PIN6 (analog). | ||
756 | * PD7 - PIN7 (analog). | ||
757 | * PD8 - PIN8 (analog). | ||
758 | * PD9 - PIN9 (analog). | ||
759 | * PD10 - PIN10 (analog). | ||
760 | * PD11 - PIN11 (analog). | ||
761 | * PD12 - PIN12 (analog). | ||
762 | * PD13 - PIN13 (analog). | ||
763 | * PD14 - PIN14 (analog). | ||
764 | * PD15 - PIN15 (analog). | ||
765 | */ | ||
766 | #define VAL_GPIOD_MODER (PIN_MODE_ANALOG(GPIOD_PIN0) | \ | ||
767 | PIN_MODE_ANALOG(GPIOD_PIN1) | \ | ||
768 | PIN_MODE_ANALOG(GPIOD_PIN2) | \ | ||
769 | PIN_MODE_ANALOG(GPIOD_PIN3) | \ | ||
770 | PIN_MODE_ANALOG(GPIOD_PIN4) | \ | ||
771 | PIN_MODE_ANALOG(GPIOD_PIN5) | \ | ||
772 | PIN_MODE_ANALOG(GPIOD_PIN6) | \ | ||
773 | PIN_MODE_ANALOG(GPIOD_PIN7) | \ | ||
774 | PIN_MODE_ANALOG(GPIOD_PIN8) | \ | ||
775 | PIN_MODE_ANALOG(GPIOD_PIN9) | \ | ||
776 | PIN_MODE_ANALOG(GPIOD_PIN10) | \ | ||
777 | PIN_MODE_ANALOG(GPIOD_PIN11) | \ | ||
778 | PIN_MODE_ANALOG(GPIOD_PIN12) | \ | ||
779 | PIN_MODE_ANALOG(GPIOD_PIN13) | \ | ||
780 | PIN_MODE_ANALOG(GPIOD_PIN14) | \ | ||
781 | PIN_MODE_ANALOG(GPIOD_PIN15)) | ||
782 | #define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ | ||
783 | PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ | ||
784 | PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ | ||
785 | PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ | ||
786 | PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ | ||
787 | PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ | ||
788 | PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ | ||
789 | PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ | ||
790 | PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ | ||
791 | PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ | ||
792 | PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ | ||
793 | PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ | ||
794 | PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ | ||
795 | PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ | ||
796 | PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ | ||
797 | PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) | ||
798 | #define VAL_GPIOD_OSPEEDR (PIN_OSPEED_HIGH(GPIOD_PIN0) | \ | ||
799 | PIN_OSPEED_HIGH(GPIOD_PIN1) | \ | ||
800 | PIN_OSPEED_HIGH(GPIOD_PIN2) | \ | ||
801 | PIN_OSPEED_HIGH(GPIOD_PIN3) | \ | ||
802 | PIN_OSPEED_HIGH(GPIOD_PIN4) | \ | ||
803 | PIN_OSPEED_HIGH(GPIOD_PIN5) | \ | ||
804 | PIN_OSPEED_HIGH(GPIOD_PIN6) | \ | ||
805 | PIN_OSPEED_HIGH(GPIOD_PIN7) | \ | ||
806 | PIN_OSPEED_HIGH(GPIOD_PIN8) | \ | ||
807 | PIN_OSPEED_HIGH(GPIOD_PIN9) | \ | ||
808 | PIN_OSPEED_HIGH(GPIOD_PIN10) | \ | ||
809 | PIN_OSPEED_HIGH(GPIOD_PIN11) | \ | ||
810 | PIN_OSPEED_HIGH(GPIOD_PIN12) | \ | ||
811 | PIN_OSPEED_HIGH(GPIOD_PIN13) | \ | ||
812 | PIN_OSPEED_HIGH(GPIOD_PIN14) | \ | ||
813 | PIN_OSPEED_HIGH(GPIOD_PIN15)) | ||
814 | #define VAL_GPIOD_PUPDR (PIN_PUPDR_FLOATING(GPIOD_PIN0) | \ | ||
815 | PIN_PUPDR_FLOATING(GPIOD_PIN1) | \ | ||
816 | PIN_PUPDR_FLOATING(GPIOD_PIN2) | \ | ||
817 | PIN_PUPDR_FLOATING(GPIOD_PIN3) | \ | ||
818 | PIN_PUPDR_FLOATING(GPIOD_PIN4) | \ | ||
819 | PIN_PUPDR_FLOATING(GPIOD_PIN5) | \ | ||
820 | PIN_PUPDR_FLOATING(GPIOD_PIN6) | \ | ||
821 | PIN_PUPDR_FLOATING(GPIOD_PIN7) | \ | ||
822 | PIN_PUPDR_FLOATING(GPIOD_PIN8) | \ | ||
823 | PIN_PUPDR_FLOATING(GPIOD_PIN9) | \ | ||
824 | PIN_PUPDR_FLOATING(GPIOD_PIN10) | \ | ||
825 | PIN_PUPDR_FLOATING(GPIOD_PIN11) | \ | ||
826 | PIN_PUPDR_FLOATING(GPIOD_PIN12) | \ | ||
827 | PIN_PUPDR_FLOATING(GPIOD_PIN13) | \ | ||
828 | PIN_PUPDR_FLOATING(GPIOD_PIN14) | \ | ||
829 | PIN_PUPDR_FLOATING(GPIOD_PIN15)) | ||
830 | #define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ | ||
831 | PIN_ODR_HIGH(GPIOD_PIN1) | \ | ||
832 | PIN_ODR_HIGH(GPIOD_PIN2) | \ | ||
833 | PIN_ODR_HIGH(GPIOD_PIN3) | \ | ||
834 | PIN_ODR_HIGH(GPIOD_PIN4) | \ | ||
835 | PIN_ODR_HIGH(GPIOD_PIN5) | \ | ||
836 | PIN_ODR_HIGH(GPIOD_PIN6) | \ | ||
837 | PIN_ODR_HIGH(GPIOD_PIN7) | \ | ||
838 | PIN_ODR_HIGH(GPIOD_PIN8) | \ | ||
839 | PIN_ODR_HIGH(GPIOD_PIN9) | \ | ||
840 | PIN_ODR_HIGH(GPIOD_PIN10) | \ | ||
841 | PIN_ODR_HIGH(GPIOD_PIN11) | \ | ||
842 | PIN_ODR_HIGH(GPIOD_PIN12) | \ | ||
843 | PIN_ODR_HIGH(GPIOD_PIN13) | \ | ||
844 | PIN_ODR_HIGH(GPIOD_PIN14) | \ | ||
845 | PIN_ODR_HIGH(GPIOD_PIN15)) | ||
846 | #define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \ | ||
847 | PIN_AFIO_AF(GPIOD_PIN1, 0U) | \ | ||
848 | PIN_AFIO_AF(GPIOD_PIN2, 0U) | \ | ||
849 | PIN_AFIO_AF(GPIOD_PIN3, 0U) | \ | ||
850 | PIN_AFIO_AF(GPIOD_PIN4, 0U) | \ | ||
851 | PIN_AFIO_AF(GPIOD_PIN5, 0U) | \ | ||
852 | PIN_AFIO_AF(GPIOD_PIN6, 0U) | \ | ||
853 | PIN_AFIO_AF(GPIOD_PIN7, 0U)) | ||
854 | #define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \ | ||
855 | PIN_AFIO_AF(GPIOD_PIN9, 0U) | \ | ||
856 | PIN_AFIO_AF(GPIOD_PIN10, 0U) | \ | ||
857 | PIN_AFIO_AF(GPIOD_PIN11, 0U) | \ | ||
858 | PIN_AFIO_AF(GPIOD_PIN12, 0U) | \ | ||
859 | PIN_AFIO_AF(GPIOD_PIN13, 0U) | \ | ||
860 | PIN_AFIO_AF(GPIOD_PIN14, 0U) | \ | ||
861 | PIN_AFIO_AF(GPIOD_PIN15, 0U)) | ||
862 | #define VAL_GPIOD_ASCR (PIN_ASCR_DISABLED(GPIOD_PIN0) | \ | ||
863 | PIN_ASCR_DISABLED(GPIOD_PIN1) | \ | ||
864 | PIN_ASCR_DISABLED(GPIOD_PIN2) | \ | ||
865 | PIN_ASCR_DISABLED(GPIOD_PIN3) | \ | ||
866 | PIN_ASCR_DISABLED(GPIOD_PIN4) | \ | ||
867 | PIN_ASCR_DISABLED(GPIOD_PIN5) | \ | ||
868 | PIN_ASCR_DISABLED(GPIOD_PIN6) | \ | ||
869 | PIN_ASCR_DISABLED(GPIOD_PIN7) | \ | ||
870 | PIN_ASCR_DISABLED(GPIOD_PIN8) | \ | ||
871 | PIN_ASCR_DISABLED(GPIOD_PIN9) | \ | ||
872 | PIN_ASCR_DISABLED(GPIOD_PIN10) | \ | ||
873 | PIN_ASCR_DISABLED(GPIOD_PIN11) | \ | ||
874 | PIN_ASCR_DISABLED(GPIOD_PIN12) | \ | ||
875 | PIN_ASCR_DISABLED(GPIOD_PIN13) | \ | ||
876 | PIN_ASCR_DISABLED(GPIOD_PIN14) | \ | ||
877 | PIN_ASCR_DISABLED(GPIOD_PIN15)) | ||
878 | #define VAL_GPIOD_LOCKR (PIN_LOCKR_DISABLED(GPIOD_PIN0) | \ | ||
879 | PIN_LOCKR_DISABLED(GPIOD_PIN1) | \ | ||
880 | PIN_LOCKR_DISABLED(GPIOD_PIN2) | \ | ||
881 | PIN_LOCKR_DISABLED(GPIOD_PIN3) | \ | ||
882 | PIN_LOCKR_DISABLED(GPIOD_PIN4) | \ | ||
883 | PIN_LOCKR_DISABLED(GPIOD_PIN5) | \ | ||
884 | PIN_LOCKR_DISABLED(GPIOD_PIN6) | \ | ||
885 | PIN_LOCKR_DISABLED(GPIOD_PIN7) | \ | ||
886 | PIN_LOCKR_DISABLED(GPIOD_PIN8) | \ | ||
887 | PIN_LOCKR_DISABLED(GPIOD_PIN9) | \ | ||
888 | PIN_LOCKR_DISABLED(GPIOD_PIN10) | \ | ||
889 | PIN_LOCKR_DISABLED(GPIOD_PIN11) | \ | ||
890 | PIN_LOCKR_DISABLED(GPIOD_PIN12) | \ | ||
891 | PIN_LOCKR_DISABLED(GPIOD_PIN13) | \ | ||
892 | PIN_LOCKR_DISABLED(GPIOD_PIN14) | \ | ||
893 | PIN_LOCKR_DISABLED(GPIOD_PIN15)) | ||
894 | |||
895 | /* | ||
896 | * GPIOE setup: | ||
897 | * | ||
898 | * PE0 - PIN0 (analog). | ||
899 | * PE1 - PIN1 (analog). | ||
900 | * PE2 - PIN2 (analog). | ||
901 | * PE3 - PIN3 (analog). | ||
902 | * PE4 - PIN4 (analog). | ||
903 | * PE5 - PIN5 (analog). | ||
904 | * PE6 - PIN6 (analog). | ||
905 | * PE7 - PIN7 (analog). | ||
906 | * PE8 - PIN8 (analog). | ||
907 | * PE9 - PIN9 (analog). | ||
908 | * PE10 - PIN10 (analog). | ||
909 | * PE11 - PIN11 (analog). | ||
910 | * PE12 - PIN12 (analog). | ||
911 | * PE13 - PIN13 (analog). | ||
912 | * PE14 - PIN14 (analog). | ||
913 | * PE15 - PIN15 (analog). | ||
914 | */ | ||
915 | #define VAL_GPIOE_MODER (PIN_MODE_ANALOG(GPIOE_PIN0) | \ | ||
916 | PIN_MODE_ANALOG(GPIOE_PIN1) | \ | ||
917 | PIN_MODE_ANALOG(GPIOE_PIN2) | \ | ||
918 | PIN_MODE_ANALOG(GPIOE_PIN3) | \ | ||
919 | PIN_MODE_ANALOG(GPIOE_PIN4) | \ | ||
920 | PIN_MODE_ANALOG(GPIOE_PIN5) | \ | ||
921 | PIN_MODE_ANALOG(GPIOE_PIN6) | \ | ||
922 | PIN_MODE_ANALOG(GPIOE_PIN7) | \ | ||
923 | PIN_MODE_ANALOG(GPIOE_PIN8) | \ | ||
924 | PIN_MODE_ANALOG(GPIOE_PIN9) | \ | ||
925 | PIN_MODE_ANALOG(GPIOE_PIN10) | \ | ||
926 | PIN_MODE_ANALOG(GPIOE_PIN11) | \ | ||
927 | PIN_MODE_ANALOG(GPIOE_PIN12) | \ | ||
928 | PIN_MODE_ANALOG(GPIOE_PIN13) | \ | ||
929 | PIN_MODE_ANALOG(GPIOE_PIN14) | \ | ||
930 | PIN_MODE_ANALOG(GPIOE_PIN15)) | ||
931 | #define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \ | ||
932 | PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \ | ||
933 | PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \ | ||
934 | PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ | ||
935 | PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \ | ||
936 | PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \ | ||
937 | PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ | ||
938 | PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ | ||
939 | PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ | ||
940 | PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ | ||
941 | PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \ | ||
942 | PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ | ||
943 | PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ | ||
944 | PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ | ||
945 | PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \ | ||
946 | PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) | ||
947 | #define VAL_GPIOE_OSPEEDR (PIN_OSPEED_HIGH(GPIOE_PIN0) | \ | ||
948 | PIN_OSPEED_HIGH(GPIOE_PIN1) | \ | ||
949 | PIN_OSPEED_HIGH(GPIOE_PIN2) | \ | ||
950 | PIN_OSPEED_HIGH(GPIOE_PIN3) | \ | ||
951 | PIN_OSPEED_HIGH(GPIOE_PIN4) | \ | ||
952 | PIN_OSPEED_HIGH(GPIOE_PIN5) | \ | ||
953 | PIN_OSPEED_HIGH(GPIOE_PIN6) | \ | ||
954 | PIN_OSPEED_HIGH(GPIOE_PIN7) | \ | ||
955 | PIN_OSPEED_HIGH(GPIOE_PIN8) | \ | ||
956 | PIN_OSPEED_HIGH(GPIOE_PIN9) | \ | ||
957 | PIN_OSPEED_HIGH(GPIOE_PIN10) | \ | ||
958 | PIN_OSPEED_HIGH(GPIOE_PIN11) | \ | ||
959 | PIN_OSPEED_HIGH(GPIOE_PIN12) | \ | ||
960 | PIN_OSPEED_HIGH(GPIOE_PIN13) | \ | ||
961 | PIN_OSPEED_HIGH(GPIOE_PIN14) | \ | ||
962 | PIN_OSPEED_HIGH(GPIOE_PIN15)) | ||
963 | #define VAL_GPIOE_PUPDR (PIN_PUPDR_FLOATING(GPIOE_PIN0) | \ | ||
964 | PIN_PUPDR_FLOATING(GPIOE_PIN1) | \ | ||
965 | PIN_PUPDR_FLOATING(GPIOE_PIN2) | \ | ||
966 | PIN_PUPDR_FLOATING(GPIOE_PIN3) | \ | ||
967 | PIN_PUPDR_FLOATING(GPIOE_PIN4) | \ | ||
968 | PIN_PUPDR_FLOATING(GPIOE_PIN5) | \ | ||
969 | PIN_PUPDR_FLOATING(GPIOE_PIN6) | \ | ||
970 | PIN_PUPDR_FLOATING(GPIOE_PIN7) | \ | ||
971 | PIN_PUPDR_FLOATING(GPIOE_PIN8) | \ | ||
972 | PIN_PUPDR_FLOATING(GPIOE_PIN9) | \ | ||
973 | PIN_PUPDR_FLOATING(GPIOE_PIN10) | \ | ||
974 | PIN_PUPDR_FLOATING(GPIOE_PIN11) | \ | ||
975 | PIN_PUPDR_FLOATING(GPIOE_PIN12) | \ | ||
976 | PIN_PUPDR_FLOATING(GPIOE_PIN13) | \ | ||
977 | PIN_PUPDR_FLOATING(GPIOE_PIN14) | \ | ||
978 | PIN_PUPDR_FLOATING(GPIOE_PIN15)) | ||
979 | #define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ | ||
980 | PIN_ODR_HIGH(GPIOE_PIN1) | \ | ||
981 | PIN_ODR_HIGH(GPIOE_PIN2) | \ | ||
982 | PIN_ODR_HIGH(GPIOE_PIN3) | \ | ||
983 | PIN_ODR_HIGH(GPIOE_PIN4) | \ | ||
984 | PIN_ODR_HIGH(GPIOE_PIN5) | \ | ||
985 | PIN_ODR_HIGH(GPIOE_PIN6) | \ | ||
986 | PIN_ODR_HIGH(GPIOE_PIN7) | \ | ||
987 | PIN_ODR_HIGH(GPIOE_PIN8) | \ | ||
988 | PIN_ODR_HIGH(GPIOE_PIN9) | \ | ||
989 | PIN_ODR_HIGH(GPIOE_PIN10) | \ | ||
990 | PIN_ODR_HIGH(GPIOE_PIN11) | \ | ||
991 | PIN_ODR_HIGH(GPIOE_PIN12) | \ | ||
992 | PIN_ODR_HIGH(GPIOE_PIN13) | \ | ||
993 | PIN_ODR_HIGH(GPIOE_PIN14) | \ | ||
994 | PIN_ODR_HIGH(GPIOE_PIN15)) | ||
995 | #define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \ | ||
996 | PIN_AFIO_AF(GPIOE_PIN1, 0U) | \ | ||
997 | PIN_AFIO_AF(GPIOE_PIN2, 0U) | \ | ||
998 | PIN_AFIO_AF(GPIOE_PIN3, 0U) | \ | ||
999 | PIN_AFIO_AF(GPIOE_PIN4, 0U) | \ | ||
1000 | PIN_AFIO_AF(GPIOE_PIN5, 0U) | \ | ||
1001 | PIN_AFIO_AF(GPIOE_PIN6, 0U) | \ | ||
1002 | PIN_AFIO_AF(GPIOE_PIN7, 0U)) | ||
1003 | #define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \ | ||
1004 | PIN_AFIO_AF(GPIOE_PIN9, 0U) | \ | ||
1005 | PIN_AFIO_AF(GPIOE_PIN10, 0U) | \ | ||
1006 | PIN_AFIO_AF(GPIOE_PIN11, 0U) | \ | ||
1007 | PIN_AFIO_AF(GPIOE_PIN12, 0U) | \ | ||
1008 | PIN_AFIO_AF(GPIOE_PIN13, 0U) | \ | ||
1009 | PIN_AFIO_AF(GPIOE_PIN14, 0U) | \ | ||
1010 | PIN_AFIO_AF(GPIOE_PIN15, 0U)) | ||
1011 | #define VAL_GPIOE_ASCR (PIN_ASCR_DISABLED(GPIOE_PIN0) | \ | ||
1012 | PIN_ASCR_DISABLED(GPIOE_PIN1) | \ | ||
1013 | PIN_ASCR_DISABLED(GPIOE_PIN2) | \ | ||
1014 | PIN_ASCR_DISABLED(GPIOE_PIN3) | \ | ||
1015 | PIN_ASCR_DISABLED(GPIOE_PIN4) | \ | ||
1016 | PIN_ASCR_DISABLED(GPIOE_PIN5) | \ | ||
1017 | PIN_ASCR_DISABLED(GPIOE_PIN6) | \ | ||
1018 | PIN_ASCR_DISABLED(GPIOE_PIN7) | \ | ||
1019 | PIN_ASCR_DISABLED(GPIOE_PIN8) | \ | ||
1020 | PIN_ASCR_DISABLED(GPIOE_PIN9) | \ | ||
1021 | PIN_ASCR_DISABLED(GPIOE_PIN10) | \ | ||
1022 | PIN_ASCR_DISABLED(GPIOE_PIN11) | \ | ||
1023 | PIN_ASCR_DISABLED(GPIOE_PIN12) | \ | ||
1024 | PIN_ASCR_DISABLED(GPIOE_PIN13) | \ | ||
1025 | PIN_ASCR_DISABLED(GPIOE_PIN14) | \ | ||
1026 | PIN_ASCR_DISABLED(GPIOE_PIN15)) | ||
1027 | #define VAL_GPIOE_LOCKR (PIN_LOCKR_DISABLED(GPIOE_PIN0) | \ | ||
1028 | PIN_LOCKR_DISABLED(GPIOE_PIN1) | \ | ||
1029 | PIN_LOCKR_DISABLED(GPIOE_PIN2) | \ | ||
1030 | PIN_LOCKR_DISABLED(GPIOE_PIN3) | \ | ||
1031 | PIN_LOCKR_DISABLED(GPIOE_PIN4) | \ | ||
1032 | PIN_LOCKR_DISABLED(GPIOE_PIN5) | \ | ||
1033 | PIN_LOCKR_DISABLED(GPIOE_PIN6) | \ | ||
1034 | PIN_LOCKR_DISABLED(GPIOE_PIN7) | \ | ||
1035 | PIN_LOCKR_DISABLED(GPIOE_PIN8) | \ | ||
1036 | PIN_LOCKR_DISABLED(GPIOE_PIN9) | \ | ||
1037 | PIN_LOCKR_DISABLED(GPIOE_PIN10) | \ | ||
1038 | PIN_LOCKR_DISABLED(GPIOE_PIN11) | \ | ||
1039 | PIN_LOCKR_DISABLED(GPIOE_PIN12) | \ | ||
1040 | PIN_LOCKR_DISABLED(GPIOE_PIN13) | \ | ||
1041 | PIN_LOCKR_DISABLED(GPIOE_PIN14) | \ | ||
1042 | PIN_LOCKR_DISABLED(GPIOE_PIN15)) | ||
1043 | |||
1044 | /* | ||
1045 | * GPIOF setup: | ||
1046 | * | ||
1047 | * PF0 - PIN0 (analog). | ||
1048 | * PF1 - PIN1 (analog). | ||
1049 | * PF2 - PIN2 (analog). | ||
1050 | * PF3 - PIN3 (analog). | ||
1051 | * PF4 - PIN4 (analog). | ||
1052 | * PF5 - PIN5 (analog). | ||
1053 | * PF6 - PIN6 (analog). | ||
1054 | * PF7 - PIN7 (analog). | ||
1055 | * PF8 - PIN8 (analog). | ||
1056 | * PF9 - PIN9 (analog). | ||
1057 | * PF10 - PIN10 (analog). | ||
1058 | * PF11 - PIN11 (analog). | ||
1059 | * PF12 - PIN12 (analog). | ||
1060 | * PF13 - PIN13 (analog). | ||
1061 | * PF14 - PIN14 (analog). | ||
1062 | * PF15 - PIN15 (analog). | ||
1063 | */ | ||
1064 | #define VAL_GPIOF_MODER (PIN_MODE_ANALOG(GPIOF_PIN0) | \ | ||
1065 | PIN_MODE_ANALOG(GPIOF_PIN1) | \ | ||
1066 | PIN_MODE_ANALOG(GPIOF_PIN2) | \ | ||
1067 | PIN_MODE_ANALOG(GPIOF_PIN3) | \ | ||
1068 | PIN_MODE_ANALOG(GPIOF_PIN4) | \ | ||
1069 | PIN_MODE_ANALOG(GPIOF_PIN5) | \ | ||
1070 | PIN_MODE_ANALOG(GPIOF_PIN6) | \ | ||
1071 | PIN_MODE_ANALOG(GPIOF_PIN7) | \ | ||
1072 | PIN_MODE_ANALOG(GPIOF_PIN8) | \ | ||
1073 | PIN_MODE_ANALOG(GPIOF_PIN9) | \ | ||
1074 | PIN_MODE_ANALOG(GPIOF_PIN10) | \ | ||
1075 | PIN_MODE_ANALOG(GPIOF_PIN11) | \ | ||
1076 | PIN_MODE_ANALOG(GPIOF_PIN12) | \ | ||
1077 | PIN_MODE_ANALOG(GPIOF_PIN13) | \ | ||
1078 | PIN_MODE_ANALOG(GPIOF_PIN14) | \ | ||
1079 | PIN_MODE_ANALOG(GPIOF_PIN15)) | ||
1080 | #define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_PIN0) | \ | ||
1081 | PIN_OTYPE_PUSHPULL(GPIOF_PIN1) | \ | ||
1082 | PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ | ||
1083 | PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ | ||
1084 | PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ | ||
1085 | PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ | ||
1086 | PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ | ||
1087 | PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ | ||
1088 | PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ | ||
1089 | PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ | ||
1090 | PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ | ||
1091 | PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ | ||
1092 | PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ | ||
1093 | PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ | ||
1094 | PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ | ||
1095 | PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) | ||
1096 | #define VAL_GPIOF_OSPEEDR (PIN_OSPEED_HIGH(GPIOF_PIN0) | \ | ||
1097 | PIN_OSPEED_HIGH(GPIOF_PIN1) | \ | ||
1098 | PIN_OSPEED_HIGH(GPIOF_PIN2) | \ | ||
1099 | PIN_OSPEED_HIGH(GPIOF_PIN3) | \ | ||
1100 | PIN_OSPEED_HIGH(GPIOF_PIN4) | \ | ||
1101 | PIN_OSPEED_HIGH(GPIOF_PIN5) | \ | ||
1102 | PIN_OSPEED_HIGH(GPIOF_PIN6) | \ | ||
1103 | PIN_OSPEED_HIGH(GPIOF_PIN7) | \ | ||
1104 | PIN_OSPEED_HIGH(GPIOF_PIN8) | \ | ||
1105 | PIN_OSPEED_HIGH(GPIOF_PIN9) | \ | ||
1106 | PIN_OSPEED_HIGH(GPIOF_PIN10) | \ | ||
1107 | PIN_OSPEED_HIGH(GPIOF_PIN11) | \ | ||
1108 | PIN_OSPEED_HIGH(GPIOF_PIN12) | \ | ||
1109 | PIN_OSPEED_HIGH(GPIOF_PIN13) | \ | ||
1110 | PIN_OSPEED_HIGH(GPIOF_PIN14) | \ | ||
1111 | PIN_OSPEED_HIGH(GPIOF_PIN15)) | ||
1112 | #define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_PIN0) | \ | ||
1113 | PIN_PUPDR_FLOATING(GPIOF_PIN1) | \ | ||
1114 | PIN_PUPDR_FLOATING(GPIOF_PIN2) | \ | ||
1115 | PIN_PUPDR_FLOATING(GPIOF_PIN3) | \ | ||
1116 | PIN_PUPDR_FLOATING(GPIOF_PIN4) | \ | ||
1117 | PIN_PUPDR_FLOATING(GPIOF_PIN5) | \ | ||
1118 | PIN_PUPDR_FLOATING(GPIOF_PIN6) | \ | ||
1119 | PIN_PUPDR_FLOATING(GPIOF_PIN7) | \ | ||
1120 | PIN_PUPDR_FLOATING(GPIOF_PIN8) | \ | ||
1121 | PIN_PUPDR_FLOATING(GPIOF_PIN9) | \ | ||
1122 | PIN_PUPDR_FLOATING(GPIOF_PIN10) | \ | ||
1123 | PIN_PUPDR_FLOATING(GPIOF_PIN11) | \ | ||
1124 | PIN_PUPDR_FLOATING(GPIOF_PIN12) | \ | ||
1125 | PIN_PUPDR_FLOATING(GPIOF_PIN13) | \ | ||
1126 | PIN_PUPDR_FLOATING(GPIOF_PIN14) | \ | ||
1127 | PIN_PUPDR_FLOATING(GPIOF_PIN15)) | ||
1128 | #define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_PIN0) | \ | ||
1129 | PIN_ODR_HIGH(GPIOF_PIN1) | \ | ||
1130 | PIN_ODR_HIGH(GPIOF_PIN2) | \ | ||
1131 | PIN_ODR_HIGH(GPIOF_PIN3) | \ | ||
1132 | PIN_ODR_HIGH(GPIOF_PIN4) | \ | ||
1133 | PIN_ODR_HIGH(GPIOF_PIN5) | \ | ||
1134 | PIN_ODR_HIGH(GPIOF_PIN6) | \ | ||
1135 | PIN_ODR_HIGH(GPIOF_PIN7) | \ | ||
1136 | PIN_ODR_HIGH(GPIOF_PIN8) | \ | ||
1137 | PIN_ODR_HIGH(GPIOF_PIN9) | \ | ||
1138 | PIN_ODR_HIGH(GPIOF_PIN10) | \ | ||
1139 | PIN_ODR_HIGH(GPIOF_PIN11) | \ | ||
1140 | PIN_ODR_HIGH(GPIOF_PIN12) | \ | ||
1141 | PIN_ODR_HIGH(GPIOF_PIN13) | \ | ||
1142 | PIN_ODR_HIGH(GPIOF_PIN14) | \ | ||
1143 | PIN_ODR_HIGH(GPIOF_PIN15)) | ||
1144 | #define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_PIN0, 0U) | \ | ||
1145 | PIN_AFIO_AF(GPIOF_PIN1, 0U) | \ | ||
1146 | PIN_AFIO_AF(GPIOF_PIN2, 0U) | \ | ||
1147 | PIN_AFIO_AF(GPIOF_PIN3, 0U) | \ | ||
1148 | PIN_AFIO_AF(GPIOF_PIN4, 0U) | \ | ||
1149 | PIN_AFIO_AF(GPIOF_PIN5, 0U) | \ | ||
1150 | PIN_AFIO_AF(GPIOF_PIN6, 0U) | \ | ||
1151 | PIN_AFIO_AF(GPIOF_PIN7, 0U)) | ||
1152 | #define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \ | ||
1153 | PIN_AFIO_AF(GPIOF_PIN9, 0U) | \ | ||
1154 | PIN_AFIO_AF(GPIOF_PIN10, 0U) | \ | ||
1155 | PIN_AFIO_AF(GPIOF_PIN11, 0U) | \ | ||
1156 | PIN_AFIO_AF(GPIOF_PIN12, 0U) | \ | ||
1157 | PIN_AFIO_AF(GPIOF_PIN13, 0U) | \ | ||
1158 | PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ | ||
1159 | PIN_AFIO_AF(GPIOF_PIN15, 0U)) | ||
1160 | #define VAL_GPIOF_ASCR (PIN_ASCR_DISABLED(GPIOF_PIN0) | \ | ||
1161 | PIN_ASCR_DISABLED(GPIOF_PIN1) | \ | ||
1162 | PIN_ASCR_DISABLED(GPIOF_PIN2) | \ | ||
1163 | PIN_ASCR_DISABLED(GPIOF_PIN3) | \ | ||
1164 | PIN_ASCR_DISABLED(GPIOF_PIN4) | \ | ||
1165 | PIN_ASCR_DISABLED(GPIOF_PIN5) | \ | ||
1166 | PIN_ASCR_DISABLED(GPIOF_PIN6) | \ | ||
1167 | PIN_ASCR_DISABLED(GPIOF_PIN7) | \ | ||
1168 | PIN_ASCR_DISABLED(GPIOF_PIN8) | \ | ||
1169 | PIN_ASCR_DISABLED(GPIOF_PIN9) | \ | ||
1170 | PIN_ASCR_DISABLED(GPIOF_PIN10) | \ | ||
1171 | PIN_ASCR_DISABLED(GPIOF_PIN11) | \ | ||
1172 | PIN_ASCR_DISABLED(GPIOF_PIN12) | \ | ||
1173 | PIN_ASCR_DISABLED(GPIOF_PIN13) | \ | ||
1174 | PIN_ASCR_DISABLED(GPIOF_PIN14) | \ | ||
1175 | PIN_ASCR_DISABLED(GPIOF_PIN15)) | ||
1176 | #define VAL_GPIOF_LOCKR (PIN_LOCKR_DISABLED(GPIOF_PIN0) | \ | ||
1177 | PIN_LOCKR_DISABLED(GPIOF_PIN1) | \ | ||
1178 | PIN_LOCKR_DISABLED(GPIOF_PIN2) | \ | ||
1179 | PIN_LOCKR_DISABLED(GPIOF_PIN3) | \ | ||
1180 | PIN_LOCKR_DISABLED(GPIOF_PIN4) | \ | ||
1181 | PIN_LOCKR_DISABLED(GPIOF_PIN5) | \ | ||
1182 | PIN_LOCKR_DISABLED(GPIOF_PIN6) | \ | ||
1183 | PIN_LOCKR_DISABLED(GPIOF_PIN7) | \ | ||
1184 | PIN_LOCKR_DISABLED(GPIOF_PIN8) | \ | ||
1185 | PIN_LOCKR_DISABLED(GPIOF_PIN9) | \ | ||
1186 | PIN_LOCKR_DISABLED(GPIOF_PIN10) | \ | ||
1187 | PIN_LOCKR_DISABLED(GPIOF_PIN11) | \ | ||
1188 | PIN_LOCKR_DISABLED(GPIOF_PIN12) | \ | ||
1189 | PIN_LOCKR_DISABLED(GPIOF_PIN13) | \ | ||
1190 | PIN_LOCKR_DISABLED(GPIOF_PIN14) | \ | ||
1191 | PIN_LOCKR_DISABLED(GPIOF_PIN15)) | ||
1192 | |||
1193 | /* | ||
1194 | * GPIOG setup: | ||
1195 | * | ||
1196 | * PG0 - PIN0 (analog). | ||
1197 | * PG1 - PIN1 (analog). | ||
1198 | * PG2 - PIN2 (analog). | ||
1199 | * PG3 - PIN3 (analog). | ||
1200 | * PG4 - PIN4 (analog). | ||
1201 | * PG5 - PIN5 (analog). | ||
1202 | * PG6 - PIN6 (analog). | ||
1203 | * PG7 - PIN7 (analog). | ||
1204 | * PG8 - PIN8 (analog). | ||
1205 | * PG9 - PIN9 (analog). | ||
1206 | * PG10 - PIN10 (analog). | ||
1207 | * PG11 - PIN11 (analog). | ||
1208 | * PG12 - PIN12 (analog). | ||
1209 | * PG13 - PIN13 (analog). | ||
1210 | * PG14 - PIN14 (analog). | ||
1211 | * PG15 - PIN15 (analog). | ||
1212 | */ | ||
1213 | #define VAL_GPIOG_MODER (PIN_MODE_ANALOG(GPIOG_PIN0) | \ | ||
1214 | PIN_MODE_ANALOG(GPIOG_PIN1) | \ | ||
1215 | PIN_MODE_ANALOG(GPIOG_PIN2) | \ | ||
1216 | PIN_MODE_ANALOG(GPIOG_PIN3) | \ | ||
1217 | PIN_MODE_ANALOG(GPIOG_PIN4) | \ | ||
1218 | PIN_MODE_ANALOG(GPIOG_PIN5) | \ | ||
1219 | PIN_MODE_ANALOG(GPIOG_PIN6) | \ | ||
1220 | PIN_MODE_ANALOG(GPIOG_PIN7) | \ | ||
1221 | PIN_MODE_ANALOG(GPIOG_PIN8) | \ | ||
1222 | PIN_MODE_ANALOG(GPIOG_PIN9) | \ | ||
1223 | PIN_MODE_ANALOG(GPIOG_PIN10) | \ | ||
1224 | PIN_MODE_ANALOG(GPIOG_PIN11) | \ | ||
1225 | PIN_MODE_ANALOG(GPIOG_PIN12) | \ | ||
1226 | PIN_MODE_ANALOG(GPIOG_PIN13) | \ | ||
1227 | PIN_MODE_ANALOG(GPIOG_PIN14) | \ | ||
1228 | PIN_MODE_ANALOG(GPIOG_PIN15)) | ||
1229 | #define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_PIN0) | \ | ||
1230 | PIN_OTYPE_PUSHPULL(GPIOG_PIN1) | \ | ||
1231 | PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | \ | ||
1232 | PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | \ | ||
1233 | PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | \ | ||
1234 | PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | \ | ||
1235 | PIN_OTYPE_PUSHPULL(GPIOG_PIN6) | \ | ||
1236 | PIN_OTYPE_PUSHPULL(GPIOG_PIN7) | \ | ||
1237 | PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | \ | ||
1238 | PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | \ | ||
1239 | PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | \ | ||
1240 | PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | \ | ||
1241 | PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | \ | ||
1242 | PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | \ | ||
1243 | PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | \ | ||
1244 | PIN_OTYPE_PUSHPULL(GPIOG_PIN15)) | ||
1245 | #define VAL_GPIOG_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOG_PIN0) | \ | ||
1246 | PIN_OSPEED_VERYLOW(GPIOG_PIN1) | \ | ||
1247 | PIN_OSPEED_VERYLOW(GPIOG_PIN2) | \ | ||
1248 | PIN_OSPEED_VERYLOW(GPIOG_PIN3) | \ | ||
1249 | PIN_OSPEED_VERYLOW(GPIOG_PIN4) | \ | ||
1250 | PIN_OSPEED_VERYLOW(GPIOG_PIN5) | \ | ||
1251 | PIN_OSPEED_VERYLOW(GPIOG_PIN6) | \ | ||
1252 | PIN_OSPEED_VERYLOW(GPIOG_PIN7) | \ | ||
1253 | PIN_OSPEED_VERYLOW(GPIOG_PIN8) | \ | ||
1254 | PIN_OSPEED_VERYLOW(GPIOG_PIN9) | \ | ||
1255 | PIN_OSPEED_VERYLOW(GPIOG_PIN10) | \ | ||
1256 | PIN_OSPEED_VERYLOW(GPIOG_PIN11) | \ | ||
1257 | PIN_OSPEED_VERYLOW(GPIOG_PIN12) | \ | ||
1258 | PIN_OSPEED_VERYLOW(GPIOG_PIN13) | \ | ||
1259 | PIN_OSPEED_VERYLOW(GPIOG_PIN14) | \ | ||
1260 | PIN_OSPEED_VERYLOW(GPIOG_PIN15)) | ||
1261 | #define VAL_GPIOG_PUPDR (PIN_PUPDR_FLOATING(GPIOG_PIN0) | \ | ||
1262 | PIN_PUPDR_FLOATING(GPIOG_PIN1) | \ | ||
1263 | PIN_PUPDR_FLOATING(GPIOG_PIN2) | \ | ||
1264 | PIN_PUPDR_FLOATING(GPIOG_PIN3) | \ | ||
1265 | PIN_PUPDR_FLOATING(GPIOG_PIN4) | \ | ||
1266 | PIN_PUPDR_FLOATING(GPIOG_PIN5) | \ | ||
1267 | PIN_PUPDR_FLOATING(GPIOG_PIN6) | \ | ||
1268 | PIN_PUPDR_FLOATING(GPIOG_PIN7) | \ | ||
1269 | PIN_PUPDR_FLOATING(GPIOG_PIN8) | \ | ||
1270 | PIN_PUPDR_FLOATING(GPIOG_PIN9) | \ | ||
1271 | PIN_PUPDR_FLOATING(GPIOG_PIN10) | \ | ||
1272 | PIN_PUPDR_FLOATING(GPIOG_PIN11) | \ | ||
1273 | PIN_PUPDR_FLOATING(GPIOG_PIN12) | \ | ||
1274 | PIN_PUPDR_FLOATING(GPIOG_PIN13) | \ | ||
1275 | PIN_PUPDR_FLOATING(GPIOG_PIN14) | \ | ||
1276 | PIN_PUPDR_FLOATING(GPIOG_PIN15)) | ||
1277 | #define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_PIN0) | \ | ||
1278 | PIN_ODR_HIGH(GPIOG_PIN1) | \ | ||
1279 | PIN_ODR_HIGH(GPIOG_PIN2) | \ | ||
1280 | PIN_ODR_HIGH(GPIOG_PIN3) | \ | ||
1281 | PIN_ODR_HIGH(GPIOG_PIN4) | \ | ||
1282 | PIN_ODR_HIGH(GPIOG_PIN5) | \ | ||
1283 | PIN_ODR_HIGH(GPIOG_PIN6) | \ | ||
1284 | PIN_ODR_HIGH(GPIOG_PIN7) | \ | ||
1285 | PIN_ODR_HIGH(GPIOG_PIN8) | \ | ||
1286 | PIN_ODR_HIGH(GPIOG_PIN9) | \ | ||
1287 | PIN_ODR_HIGH(GPIOG_PIN10) | \ | ||
1288 | PIN_ODR_HIGH(GPIOG_PIN11) | \ | ||
1289 | PIN_ODR_HIGH(GPIOG_PIN12) | \ | ||
1290 | PIN_ODR_HIGH(GPIOG_PIN13) | \ | ||
1291 | PIN_ODR_HIGH(GPIOG_PIN14) | \ | ||
1292 | PIN_ODR_HIGH(GPIOG_PIN15)) | ||
1293 | #define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_PIN0, 0U) | \ | ||
1294 | PIN_AFIO_AF(GPIOG_PIN1, 0U) | \ | ||
1295 | PIN_AFIO_AF(GPIOG_PIN2, 0U) | \ | ||
1296 | PIN_AFIO_AF(GPIOG_PIN3, 0U) | \ | ||
1297 | PIN_AFIO_AF(GPIOG_PIN4, 0U) | \ | ||
1298 | PIN_AFIO_AF(GPIOG_PIN5, 0U) | \ | ||
1299 | PIN_AFIO_AF(GPIOG_PIN6, 0U) | \ | ||
1300 | PIN_AFIO_AF(GPIOG_PIN7, 0U)) | ||
1301 | #define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0U) | \ | ||
1302 | PIN_AFIO_AF(GPIOG_PIN9, 0U) | \ | ||
1303 | PIN_AFIO_AF(GPIOG_PIN10, 0U) | \ | ||
1304 | PIN_AFIO_AF(GPIOG_PIN11, 0U) | \ | ||
1305 | PIN_AFIO_AF(GPIOG_PIN12, 0U) | \ | ||
1306 | PIN_AFIO_AF(GPIOG_PIN13, 0U) | \ | ||
1307 | PIN_AFIO_AF(GPIOG_PIN14, 0U) | \ | ||
1308 | PIN_AFIO_AF(GPIOG_PIN15, 0U)) | ||
1309 | #define VAL_GPIOG_ASCR (PIN_ASCR_DISABLED(GPIOG_PIN0) | \ | ||
1310 | PIN_ASCR_DISABLED(GPIOG_PIN1) | \ | ||
1311 | PIN_ASCR_DISABLED(GPIOG_PIN2) | \ | ||
1312 | PIN_ASCR_DISABLED(GPIOG_PIN3) | \ | ||
1313 | PIN_ASCR_DISABLED(GPIOG_PIN4) | \ | ||
1314 | PIN_ASCR_DISABLED(GPIOG_PIN5) | \ | ||
1315 | PIN_ASCR_DISABLED(GPIOG_PIN6) | \ | ||
1316 | PIN_ASCR_DISABLED(GPIOG_PIN7) | \ | ||
1317 | PIN_ASCR_DISABLED(GPIOG_PIN8) | \ | ||
1318 | PIN_ASCR_DISABLED(GPIOG_PIN9) | \ | ||
1319 | PIN_ASCR_DISABLED(GPIOG_PIN10) | \ | ||
1320 | PIN_ASCR_DISABLED(GPIOG_PIN11) | \ | ||
1321 | PIN_ASCR_DISABLED(GPIOG_PIN12) | \ | ||
1322 | PIN_ASCR_DISABLED(GPIOG_PIN13) | \ | ||
1323 | PIN_ASCR_DISABLED(GPIOG_PIN14) | \ | ||
1324 | PIN_ASCR_DISABLED(GPIOG_PIN15)) | ||
1325 | #define VAL_GPIOG_LOCKR (PIN_LOCKR_DISABLED(GPIOG_PIN0) | \ | ||
1326 | PIN_LOCKR_DISABLED(GPIOG_PIN1) | \ | ||
1327 | PIN_LOCKR_DISABLED(GPIOG_PIN2) | \ | ||
1328 | PIN_LOCKR_DISABLED(GPIOG_PIN3) | \ | ||
1329 | PIN_LOCKR_DISABLED(GPIOG_PIN4) | \ | ||
1330 | PIN_LOCKR_DISABLED(GPIOG_PIN5) | \ | ||
1331 | PIN_LOCKR_DISABLED(GPIOG_PIN6) | \ | ||
1332 | PIN_LOCKR_DISABLED(GPIOG_PIN7) | \ | ||
1333 | PIN_LOCKR_DISABLED(GPIOG_PIN8) | \ | ||
1334 | PIN_LOCKR_DISABLED(GPIOG_PIN9) | \ | ||
1335 | PIN_LOCKR_DISABLED(GPIOG_PIN10) | \ | ||
1336 | PIN_LOCKR_DISABLED(GPIOG_PIN11) | \ | ||
1337 | PIN_LOCKR_DISABLED(GPIOG_PIN12) | \ | ||
1338 | PIN_LOCKR_DISABLED(GPIOG_PIN13) | \ | ||
1339 | PIN_LOCKR_DISABLED(GPIOG_PIN14) | \ | ||
1340 | PIN_LOCKR_DISABLED(GPIOG_PIN15)) | ||
1341 | |||
1342 | /* | ||
1343 | * GPIOH setup: | ||
1344 | * | ||
1345 | * PH0 - OSC_IN (input floating). | ||
1346 | * PH1 - OSC_OUT (input floating). | ||
1347 | * PH2 - PIN2 (analog). | ||
1348 | * PH3 - PIN3 (analog). | ||
1349 | * PH4 - PIN4 (analog). | ||
1350 | * PH5 - PIN5 (analog). | ||
1351 | * PH6 - PIN6 (analog). | ||
1352 | * PH7 - PIN7 (analog). | ||
1353 | * PH8 - PIN8 (analog). | ||
1354 | * PH9 - PIN9 (analog). | ||
1355 | * PH10 - PIN10 (analog). | ||
1356 | * PH11 - PIN11 (analog). | ||
1357 | * PH12 - PIN12 (analog). | ||
1358 | * PH13 - PIN13 (analog). | ||
1359 | * PH14 - PIN14 (analog). | ||
1360 | * PH15 - PIN15 (analog). | ||
1361 | */ | ||
1362 | #define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_OSC_IN) | \ | ||
1363 | PIN_MODE_INPUT(GPIOH_OSC_OUT) | \ | ||
1364 | PIN_MODE_ANALOG(GPIOH_PIN2) | \ | ||
1365 | PIN_MODE_ANALOG(GPIOH_PIN3) | \ | ||
1366 | PIN_MODE_ANALOG(GPIOH_PIN4) | \ | ||
1367 | PIN_MODE_ANALOG(GPIOH_PIN5) | \ | ||
1368 | PIN_MODE_ANALOG(GPIOH_PIN6) | \ | ||
1369 | PIN_MODE_ANALOG(GPIOH_PIN7) | \ | ||
1370 | PIN_MODE_ANALOG(GPIOH_PIN8) | \ | ||
1371 | PIN_MODE_ANALOG(GPIOH_PIN9) | \ | ||
1372 | PIN_MODE_ANALOG(GPIOH_PIN10) | \ | ||
1373 | PIN_MODE_ANALOG(GPIOH_PIN11) | \ | ||
1374 | PIN_MODE_ANALOG(GPIOH_PIN12) | \ | ||
1375 | PIN_MODE_ANALOG(GPIOH_PIN13) | \ | ||
1376 | PIN_MODE_ANALOG(GPIOH_PIN14) | \ | ||
1377 | PIN_MODE_ANALOG(GPIOH_PIN15)) | ||
1378 | #define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_OSC_IN) | \ | ||
1379 | PIN_OTYPE_PUSHPULL(GPIOH_OSC_OUT) | \ | ||
1380 | PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | \ | ||
1381 | PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | \ | ||
1382 | PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | \ | ||
1383 | PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | \ | ||
1384 | PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | \ | ||
1385 | PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | \ | ||
1386 | PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | \ | ||
1387 | PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | \ | ||
1388 | PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | \ | ||
1389 | PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | \ | ||
1390 | PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | \ | ||
1391 | PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | \ | ||
1392 | PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | \ | ||
1393 | PIN_OTYPE_PUSHPULL(GPIOH_PIN15)) | ||
1394 | #define VAL_GPIOH_OSPEEDR (PIN_OSPEED_HIGH(GPIOH_OSC_IN) | \ | ||
1395 | PIN_OSPEED_HIGH(GPIOH_OSC_OUT) | \ | ||
1396 | PIN_OSPEED_VERYLOW(GPIOH_PIN2) | \ | ||
1397 | PIN_OSPEED_VERYLOW(GPIOH_PIN3) | \ | ||
1398 | PIN_OSPEED_VERYLOW(GPIOH_PIN4) | \ | ||
1399 | PIN_OSPEED_VERYLOW(GPIOH_PIN5) | \ | ||
1400 | PIN_OSPEED_VERYLOW(GPIOH_PIN6) | \ | ||
1401 | PIN_OSPEED_VERYLOW(GPIOH_PIN7) | \ | ||
1402 | PIN_OSPEED_VERYLOW(GPIOH_PIN8) | \ | ||
1403 | PIN_OSPEED_VERYLOW(GPIOH_PIN9) | \ | ||
1404 | PIN_OSPEED_VERYLOW(GPIOH_PIN10) | \ | ||
1405 | PIN_OSPEED_VERYLOW(GPIOH_PIN11) | \ | ||
1406 | PIN_OSPEED_VERYLOW(GPIOH_PIN12) | \ | ||
1407 | PIN_OSPEED_VERYLOW(GPIOH_PIN13) | \ | ||
1408 | PIN_OSPEED_VERYLOW(GPIOH_PIN14) | \ | ||
1409 | PIN_OSPEED_VERYLOW(GPIOH_PIN15)) | ||
1410 | #define VAL_GPIOH_PUPDR (PIN_PUPDR_FLOATING(GPIOH_OSC_IN) | \ | ||
1411 | PIN_PUPDR_FLOATING(GPIOH_OSC_OUT) | \ | ||
1412 | PIN_PUPDR_FLOATING(GPIOH_PIN2) | \ | ||
1413 | PIN_PUPDR_FLOATING(GPIOH_PIN3) | \ | ||
1414 | PIN_PUPDR_FLOATING(GPIOH_PIN4) | \ | ||
1415 | PIN_PUPDR_FLOATING(GPIOH_PIN5) | \ | ||
1416 | PIN_PUPDR_FLOATING(GPIOH_PIN6) | \ | ||
1417 | PIN_PUPDR_FLOATING(GPIOH_PIN7) | \ | ||
1418 | PIN_PUPDR_FLOATING(GPIOH_PIN8) | \ | ||
1419 | PIN_PUPDR_FLOATING(GPIOH_PIN9) | \ | ||
1420 | PIN_PUPDR_FLOATING(GPIOH_PIN10) | \ | ||
1421 | PIN_PUPDR_FLOATING(GPIOH_PIN11) | \ | ||
1422 | PIN_PUPDR_FLOATING(GPIOH_PIN12) | \ | ||
1423 | PIN_PUPDR_FLOATING(GPIOH_PIN13) | \ | ||
1424 | PIN_PUPDR_FLOATING(GPIOH_PIN14) | \ | ||
1425 | PIN_PUPDR_FLOATING(GPIOH_PIN15)) | ||
1426 | #define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_OSC_IN) | \ | ||
1427 | PIN_ODR_HIGH(GPIOH_OSC_OUT) | \ | ||
1428 | PIN_ODR_HIGH(GPIOH_PIN2) | \ | ||
1429 | PIN_ODR_HIGH(GPIOH_PIN3) | \ | ||
1430 | PIN_ODR_HIGH(GPIOH_PIN4) | \ | ||
1431 | PIN_ODR_HIGH(GPIOH_PIN5) | \ | ||
1432 | PIN_ODR_HIGH(GPIOH_PIN6) | \ | ||
1433 | PIN_ODR_HIGH(GPIOH_PIN7) | \ | ||
1434 | PIN_ODR_HIGH(GPIOH_PIN8) | \ | ||
1435 | PIN_ODR_HIGH(GPIOH_PIN9) | \ | ||
1436 | PIN_ODR_HIGH(GPIOH_PIN10) | \ | ||
1437 | PIN_ODR_HIGH(GPIOH_PIN11) | \ | ||
1438 | PIN_ODR_HIGH(GPIOH_PIN12) | \ | ||
1439 | PIN_ODR_HIGH(GPIOH_PIN13) | \ | ||
1440 | PIN_ODR_HIGH(GPIOH_PIN14) | \ | ||
1441 | PIN_ODR_HIGH(GPIOH_PIN15)) | ||
1442 | #define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_OSC_IN, 0U) | \ | ||
1443 | PIN_AFIO_AF(GPIOH_OSC_OUT, 0U) | \ | ||
1444 | PIN_AFIO_AF(GPIOH_PIN2, 0U) | \ | ||
1445 | PIN_AFIO_AF(GPIOH_PIN3, 0U) | \ | ||
1446 | PIN_AFIO_AF(GPIOH_PIN4, 0U) | \ | ||
1447 | PIN_AFIO_AF(GPIOH_PIN5, 0U) | \ | ||
1448 | PIN_AFIO_AF(GPIOH_PIN6, 0U) | \ | ||
1449 | PIN_AFIO_AF(GPIOH_PIN7, 0U)) | ||
1450 | #define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0U) | \ | ||
1451 | PIN_AFIO_AF(GPIOH_PIN9, 0U) | \ | ||
1452 | PIN_AFIO_AF(GPIOH_PIN10, 0U) | \ | ||
1453 | PIN_AFIO_AF(GPIOH_PIN11, 0U) | \ | ||
1454 | PIN_AFIO_AF(GPIOH_PIN12, 0U) | \ | ||
1455 | PIN_AFIO_AF(GPIOH_PIN13, 0U) | \ | ||
1456 | PIN_AFIO_AF(GPIOH_PIN14, 0U) | \ | ||
1457 | PIN_AFIO_AF(GPIOH_PIN15, 0U)) | ||
1458 | #define VAL_GPIOH_ASCR (PIN_ASCR_DISABLED(GPIOH_OSC_IN) | \ | ||
1459 | PIN_ASCR_DISABLED(GPIOH_OSC_OUT) | \ | ||
1460 | PIN_ASCR_DISABLED(GPIOH_PIN2) | \ | ||
1461 | PIN_ASCR_DISABLED(GPIOH_PIN3) | \ | ||
1462 | PIN_ASCR_DISABLED(GPIOH_PIN4) | \ | ||
1463 | PIN_ASCR_DISABLED(GPIOH_PIN5) | \ | ||
1464 | PIN_ASCR_DISABLED(GPIOH_PIN6) | \ | ||
1465 | PIN_ASCR_DISABLED(GPIOH_PIN7) | \ | ||
1466 | PIN_ASCR_DISABLED(GPIOH_PIN8) | \ | ||
1467 | PIN_ASCR_DISABLED(GPIOH_PIN9) | \ | ||
1468 | PIN_ASCR_DISABLED(GPIOH_PIN10) | \ | ||
1469 | PIN_ASCR_DISABLED(GPIOH_PIN11) | \ | ||
1470 | PIN_ASCR_DISABLED(GPIOH_PIN12) | \ | ||
1471 | PIN_ASCR_DISABLED(GPIOH_PIN13) | \ | ||
1472 | PIN_ASCR_DISABLED(GPIOH_PIN14) | \ | ||
1473 | PIN_ASCR_DISABLED(GPIOH_PIN15)) | ||
1474 | #define VAL_GPIOH_LOCKR (PIN_LOCKR_DISABLED(GPIOH_OSC_IN) | \ | ||
1475 | PIN_LOCKR_DISABLED(GPIOH_OSC_OUT) | \ | ||
1476 | PIN_LOCKR_DISABLED(GPIOH_PIN2) | \ | ||
1477 | PIN_LOCKR_DISABLED(GPIOH_PIN3) | \ | ||
1478 | PIN_LOCKR_DISABLED(GPIOH_PIN4) | \ | ||
1479 | PIN_LOCKR_DISABLED(GPIOH_PIN5) | \ | ||
1480 | PIN_LOCKR_DISABLED(GPIOH_PIN6) | \ | ||
1481 | PIN_LOCKR_DISABLED(GPIOH_PIN7) | \ | ||
1482 | PIN_LOCKR_DISABLED(GPIOH_PIN8) | \ | ||
1483 | PIN_LOCKR_DISABLED(GPIOH_PIN9) | \ | ||
1484 | PIN_LOCKR_DISABLED(GPIOH_PIN10) | \ | ||
1485 | PIN_LOCKR_DISABLED(GPIOH_PIN11) | \ | ||
1486 | PIN_LOCKR_DISABLED(GPIOH_PIN12) | \ | ||
1487 | PIN_LOCKR_DISABLED(GPIOH_PIN13) | \ | ||
1488 | PIN_LOCKR_DISABLED(GPIOH_PIN14) | \ | ||
1489 | PIN_LOCKR_DISABLED(GPIOH_PIN15)) | ||
1490 | |||
1491 | /*===========================================================================*/ | ||
1492 | /* External declarations. */ | ||
1493 | /*===========================================================================*/ | ||
1494 | |||
1495 | #if !defined(_FROM_ASM_) | ||
1496 | #ifdef __cplusplus | ||
1497 | extern "C" { | ||
1498 | #endif | ||
1499 | void boardInit(void); | ||
1500 | #ifdef __cplusplus | ||
1501 | } | ||
1502 | #endif | ||
1503 | #endif /* _FROM_ASM_ */ | ||
1504 | |||
1505 | #endif /* BOARD_H */ | ||
diff --git a/lib/chibios/os/hal/boards/ST_NUCLEO64_L476RG/board.mk b/lib/chibios/os/hal/boards/ST_NUCLEO64_L476RG/board.mk new file mode 100644 index 000000000..53aebcc4b --- /dev/null +++ b/lib/chibios/os/hal/boards/ST_NUCLEO64_L476RG/board.mk | |||
@@ -0,0 +1,9 @@ | |||
1 | # List of all the board related files. | ||
2 | BOARDSRC = $(CHIBIOS)/os/hal/boards/ST_NUCLEO64_L476RG/board.c | ||
3 | |||
4 | # Required include directories | ||
5 | BOARDINC = $(CHIBIOS)/os/hal/boards/ST_NUCLEO64_L476RG | ||
6 | |||
7 | # Shared variables | ||
8 | ALLCSRC += $(BOARDSRC) | ||
9 | ALLINC += $(BOARDINC) | ||
diff --git a/lib/chibios/os/hal/boards/ST_NUCLEO64_L476RG/cfg/board.chcfg b/lib/chibios/os/hal/boards/ST_NUCLEO64_L476RG/cfg/board.chcfg new file mode 100644 index 000000000..5cdbd962d --- /dev/null +++ b/lib/chibios/os/hal/boards/ST_NUCLEO64_L476RG/cfg/board.chcfg | |||
@@ -0,0 +1,1320 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <!-- STM32L4xx board Template --> | ||
3 | <board | ||
4 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
5 | xsi:noNamespaceSchemaLocation="http://www.chibios.org/xml/schema/boards/stm32l4xx_board.xsd"> | ||
6 | <configuration_settings> | ||
7 | <templates_path>resources/gencfg/processors/boards/stm32l4xx/templates</templates_path> | ||
8 | <output_path>..</output_path> | ||
9 | <hal_version>5.0.x</hal_version> | ||
10 | </configuration_settings> | ||
11 | <board_name>STMicroelectronics STM32 Nucleo64-L476RG</board_name> | ||
12 | <board_id>ST_NUCLEO64_L476RG</board_id> | ||
13 | <board_functions></board_functions> | ||
14 | <subtype>STM32L476xx</subtype> | ||
15 | <clocks | ||
16 | HSEFrequency="8000000" | ||
17 | HSEBypass="true" | ||
18 | LSEFrequency="32768" | ||
19 | LSEBypass="false" | ||
20 | LSEDrive="3 High Drive (default)" | ||
21 | VDD="300" /> | ||
22 | <ports> | ||
23 | <GPIOA> | ||
24 | <pin0 | ||
25 | ID="ARD_A0 ACD12_IN5" | ||
26 | Type="PushPull" | ||
27 | Level="High" | ||
28 | Speed="Maximum" | ||
29 | Resistor="Floating" | ||
30 | Mode="Analog" | ||
31 | Alternate="0" | ||
32 | AnalogSwitch="Disabled" | ||
33 | PinLock="Disabled" /> | ||
34 | <pin1 | ||
35 | ID="ARD_A1 ACD12_IN6" | ||
36 | Type="PushPull" | ||
37 | Level="High" | ||
38 | Speed="Maximum" | ||
39 | Resistor="Floating" | ||
40 | Mode="Analog" | ||
41 | Alternate="0" | ||
42 | AnalogSwitch="Disabled" | ||
43 | PinLock="Disabled" /> | ||
44 | <pin2 | ||
45 | ID="ARD_D1 USART2_TX" | ||
46 | Type="PushPull" | ||
47 | Level="High" | ||
48 | Speed="High" | ||
49 | Resistor="Floating" | ||
50 | Mode="Alternate" | ||
51 | Alternate="7" | ||
52 | AnalogSwitch="Disabled" | ||
53 | PinLock="Disabled" /> | ||
54 | <pin3 | ||
55 | ID="ARD_D0 USART2_RX" | ||
56 | Type="PushPull" | ||
57 | Level="High" | ||
58 | Speed="High" | ||
59 | Resistor="Floating" | ||
60 | Mode="Alternate" | ||
61 | Alternate="7" | ||
62 | AnalogSwitch="Disabled" | ||
63 | PinLock="Disabled" /> | ||
64 | <pin4 | ||
65 | ID="ARD_A2 ACD12_IN9" | ||
66 | Type="PushPull" | ||
67 | Level="High" | ||
68 | Speed="Maximum" | ||
69 | Resistor="Floating" | ||
70 | Mode="Analog" | ||
71 | Alternate="0" | ||
72 | AnalogSwitch="Disabled" | ||
73 | PinLock="Disabled" /> | ||
74 | <pin5 | ||
75 | ID="ARD_D13 LED_GREEN" | ||
76 | Type="PushPull" | ||
77 | Level="Low" | ||
78 | Speed="Maximum" | ||
79 | Resistor="Floating" | ||
80 | Mode="Output" | ||
81 | Alternate="0" | ||
82 | AnalogSwitch="Disabled" | ||
83 | PinLock="Disabled" /> | ||
84 | <pin6 | ||
85 | ID="ARD_D12" | ||
86 | Type="PushPull" | ||
87 | Level="High" | ||
88 | Speed="Maximum" | ||
89 | Resistor="Floating" | ||
90 | Mode="Analog" | ||
91 | Alternate="0" | ||
92 | AnalogSwitch="Disabled" | ||
93 | PinLock="Disabled" /> | ||
94 | <pin7 | ||
95 | ID="ARD_D11" | ||
96 | Type="PushPull" | ||
97 | Level="High" | ||
98 | Speed="Maximum" | ||
99 | Resistor="Floating" | ||
100 | Mode="Analog" | ||
101 | Alternate="0" | ||
102 | AnalogSwitch="Disabled" | ||
103 | PinLock="Disabled" /> | ||
104 | <pin8 | ||
105 | ID="ARD_D7" | ||
106 | Type="PushPull" | ||
107 | Level="High" | ||
108 | Speed="Maximum" | ||
109 | Resistor="Floating" | ||
110 | Mode="Analog" | ||
111 | Alternate="0" | ||
112 | AnalogSwitch="Disabled" | ||
113 | PinLock="Disabled" /> | ||
114 | <pin9 | ||
115 | ID="ARD_D8" | ||
116 | Type="PushPull" | ||
117 | Level="High" | ||
118 | Speed="Maximum" | ||
119 | Resistor="Floating" | ||
120 | Mode="Analog" | ||
121 | Alternate="0" | ||
122 | AnalogSwitch="Disabled" | ||
123 | PinLock="Disabled" /> | ||
124 | <pin10 | ||
125 | ID="ARD_D2" | ||
126 | Type="PushPull" | ||
127 | Level="High" | ||
128 | Speed="Maximum" | ||
129 | Resistor="Floating" | ||
130 | Mode="Analog" | ||
131 | Alternate="0" | ||
132 | AnalogSwitch="Disabled" | ||
133 | PinLock="Disabled" /> | ||
134 | <pin11 | ||
135 | ID="" | ||
136 | Type="PushPull" | ||
137 | Level="High" | ||
138 | Speed="Maximum" | ||
139 | Resistor="Floating" | ||
140 | Mode="Analog" | ||
141 | Alternate="0" | ||
142 | AnalogSwitch="Disabled" | ||
143 | PinLock="Disabled" /> | ||
144 | <pin12 | ||
145 | ID="" | ||
146 | Type="PushPull" | ||
147 | Level="High" | ||
148 | Speed="Maximum" | ||
149 | Resistor="Floating" | ||
150 | Mode="Analog" | ||
151 | Alternate="0" | ||
152 | AnalogSwitch="Disabled" | ||
153 | PinLock="Disabled" /> | ||
154 | <pin13 | ||
155 | ID="SWDIO" | ||
156 | Type="PushPull" | ||
157 | Level="High" | ||
158 | Speed="Maximum" | ||
159 | Resistor="PullUp" | ||
160 | Mode="Alternate" | ||
161 | Alternate="0" | ||
162 | AnalogSwitch="Disabled" | ||
163 | PinLock="Disabled" /> | ||
164 | <pin14 | ||
165 | ID="SWCLK" | ||
166 | Type="PushPull" | ||
167 | Level="High" | ||
168 | Speed="Maximum" | ||
169 | Resistor="PullDown" | ||
170 | Mode="Alternate" | ||
171 | Alternate="0" | ||
172 | AnalogSwitch="Disabled" | ||
173 | PinLock="Disabled" /> | ||
174 | <pin15 | ||
175 | ID="" | ||
176 | Type="PushPull" | ||
177 | Level="High" | ||
178 | Speed="Maximum" | ||
179 | Resistor="Floating" | ||
180 | Mode="Analog" | ||
181 | Alternate="0" | ||
182 | AnalogSwitch="Disabled" | ||
183 | PinLock="Disabled" /> | ||
184 | </GPIOA> | ||
185 | <GPIOB> | ||
186 | <pin0 | ||
187 | ID="ARD_A3 ACD12_IN15" | ||
188 | Type="PushPull" | ||
189 | Level="High" | ||
190 | Speed="Maximum" | ||
191 | Resistor="Floating" | ||
192 | Mode="Analog" | ||
193 | Alternate="0" | ||
194 | AnalogSwitch="Disabled" | ||
195 | PinLock="Disabled" /> | ||
196 | <pin1 | ||
197 | ID="" | ||
198 | Type="PushPull" | ||
199 | Level="High" | ||
200 | Speed="Maximum" | ||
201 | Resistor="Floating" | ||
202 | Mode="Analog" | ||
203 | Alternate="0" | ||
204 | AnalogSwitch="Disabled" | ||
205 | PinLock="Disabled" /> | ||
206 | <pin2 | ||
207 | ID="" | ||
208 | Type="PushPull" | ||
209 | Level="High" | ||
210 | Speed="Maximum" | ||
211 | Resistor="Floating" | ||
212 | Mode="Analog" | ||
213 | Alternate="0" | ||
214 | AnalogSwitch="Disabled" | ||
215 | PinLock="Disabled" /> | ||
216 | <pin3 | ||
217 | ID="ARD_D3 SWO" | ||
218 | Type="PushPull" | ||
219 | Level="High" | ||
220 | Speed="Maximum" | ||
221 | Resistor="Floating" | ||
222 | Mode="Analog" | ||
223 | Alternate="0" | ||
224 | AnalogSwitch="Disabled" | ||
225 | PinLock="Disabled" /> | ||
226 | <pin4 | ||
227 | ID="ARD_D5" | ||
228 | Type="PushPull" | ||
229 | Level="High" | ||
230 | Speed="Maximum" | ||
231 | Resistor="Floating" | ||
232 | Mode="Analog" | ||
233 | Alternate="0" | ||
234 | AnalogSwitch="Disabled" | ||
235 | PinLock="Disabled" /> | ||
236 | <pin5 | ||
237 | ID="ARD_D4" | ||
238 | Type="PushPull" | ||
239 | Level="High" | ||
240 | Speed="Maximum" | ||
241 | Resistor="Floating" | ||
242 | Mode="Analog" | ||
243 | Alternate="0" | ||
244 | AnalogSwitch="Disabled" | ||
245 | PinLock="Disabled" /> | ||
246 | <pin6 | ||
247 | ID="ARD_D10" | ||
248 | Type="PushPull" | ||
249 | Level="High" | ||
250 | Speed="Maximum" | ||
251 | Resistor="Floating" | ||
252 | Mode="Analog" | ||
253 | Alternate="0" | ||
254 | AnalogSwitch="Disabled" | ||
255 | PinLock="Disabled" /> | ||
256 | <pin7 | ||
257 | ID="" | ||
258 | Type="PushPull" | ||
259 | Level="High" | ||
260 | Speed="Maximum" | ||
261 | Resistor="Floating" | ||
262 | Mode="Analog" | ||
263 | Alternate="0" | ||
264 | AnalogSwitch="Disabled" | ||
265 | PinLock="Disabled" /> | ||
266 | <pin8 | ||
267 | ID="ARD_D15" | ||
268 | Type="PushPull" | ||
269 | Level="High" | ||
270 | Speed="Maximum" | ||
271 | Resistor="Floating" | ||
272 | Mode="Analog" | ||
273 | Alternate="0" | ||
274 | AnalogSwitch="Disabled" | ||
275 | PinLock="Disabled" /> | ||
276 | <pin9 | ||
277 | ID="ARD_D14" | ||
278 | Type="PushPull" | ||
279 | Level="High" | ||
280 | Speed="Maximum" | ||
281 | Resistor="Floating" | ||
282 | Mode="Analog" | ||
283 | Alternate="0" | ||
284 | AnalogSwitch="Disabled" | ||
285 | PinLock="Disabled" /> | ||
286 | <pin10 | ||
287 | ID="ARD_D6" | ||
288 | Type="PushPull" | ||
289 | Level="High" | ||
290 | Speed="Maximum" | ||
291 | Resistor="Floating" | ||
292 | Mode="Analog" | ||
293 | Alternate="0" | ||
294 | AnalogSwitch="Disabled" | ||
295 | PinLock="Disabled" /> | ||
296 | <pin11 | ||
297 | ID="" | ||
298 | Type="PushPull" | ||
299 | Level="High" | ||
300 | Speed="Maximum" | ||
301 | Resistor="Floating" | ||
302 | Mode="Analog" | ||
303 | Alternate="0" | ||
304 | AnalogSwitch="Disabled" | ||
305 | PinLock="Disabled" /> | ||
306 | <pin12 | ||
307 | ID="" | ||
308 | Type="PushPull" | ||
309 | Level="High" | ||
310 | Speed="Maximum" | ||
311 | Resistor="Floating" | ||
312 | Mode="Analog" | ||
313 | Alternate="0" | ||
314 | AnalogSwitch="Disabled" | ||
315 | PinLock="Disabled" /> | ||
316 | <pin13 | ||
317 | ID="" | ||
318 | Type="PushPull" | ||
319 | Level="High" | ||
320 | Speed="Maximum" | ||
321 | Resistor="Floating" | ||
322 | Mode="Analog" | ||
323 | Alternate="0" | ||
324 | AnalogSwitch="Disabled" | ||
325 | PinLock="Disabled" /> | ||
326 | <pin14 | ||
327 | ID="" | ||
328 | Type="PushPull" | ||
329 | Level="High" | ||
330 | Speed="Maximum" | ||
331 | Resistor="Floating" | ||
332 | Mode="Analog" | ||
333 | Alternate="0" | ||
334 | AnalogSwitch="Disabled" | ||
335 | PinLock="Disabled" /> | ||
336 | <pin15 | ||
337 | ID="" | ||
338 | Type="PushPull" | ||
339 | Level="High" | ||
340 | Speed="Maximum" | ||
341 | Resistor="Floating" | ||
342 | Mode="Analog" | ||
343 | Alternate="0" | ||
344 | AnalogSwitch="Disabled" | ||
345 | PinLock="Disabled" /> | ||
346 | </GPIOB> | ||
347 | <GPIOC> | ||
348 | <pin0 | ||
349 | ID="ARD_A5 ACD123_IN1" | ||
350 | Type="PushPull" | ||
351 | Level="High" | ||
352 | Speed="Maximum" | ||
353 | Resistor="Floating" | ||
354 | Mode="Analog" | ||
355 | Alternate="0" | ||
356 | AnalogSwitch="Disabled" | ||
357 | PinLock="Disabled" /> | ||
358 | <pin1 | ||
359 | ID="ARD_A4 ACD123_IN2" | ||
360 | Type="PushPull" | ||
361 | Level="High" | ||
362 | Speed="Maximum" | ||
363 | Resistor="Floating" | ||
364 | Mode="Analog" | ||
365 | Alternate="0" | ||
366 | AnalogSwitch="Disabled" | ||
367 | PinLock="Disabled" /> | ||
368 | <pin2 | ||
369 | ID="" | ||
370 | Type="PushPull" | ||
371 | Level="High" | ||
372 | Speed="Maximum" | ||
373 | Resistor="Floating" | ||
374 | Mode="Analog" | ||
375 | Alternate="0" | ||
376 | AnalogSwitch="Disabled" | ||
377 | PinLock="Disabled" /> | ||
378 | <pin3 | ||
379 | ID="" | ||
380 | Type="PushPull" | ||
381 | Level="High" | ||
382 | Speed="Maximum" | ||
383 | Resistor="Floating" | ||
384 | Mode="Analog" | ||
385 | Alternate="0" | ||
386 | AnalogSwitch="Disabled" | ||
387 | PinLock="Disabled" /> | ||
388 | <pin4 | ||
389 | ID="" | ||
390 | Type="PushPull" | ||
391 | Level="High" | ||
392 | Speed="Maximum" | ||
393 | Resistor="Floating" | ||
394 | Mode="Analog" | ||
395 | Alternate="0" | ||
396 | AnalogSwitch="Disabled" | ||
397 | PinLock="Disabled" /> | ||
398 | <pin5 | ||
399 | ID="" | ||
400 | Type="PushPull" | ||
401 | Level="High" | ||
402 | Speed="Maximum" | ||
403 | Resistor="Floating" | ||
404 | Mode="Analog" | ||
405 | Alternate="0" | ||
406 | AnalogSwitch="Disabled" | ||
407 | PinLock="Disabled" /> | ||
408 | <pin6 | ||
409 | ID="" | ||
410 | Type="PushPull" | ||
411 | Level="High" | ||
412 | Speed="Maximum" | ||
413 | Resistor="Floating" | ||
414 | Mode="Analog" | ||
415 | Alternate="0" | ||
416 | AnalogSwitch="Disabled" | ||
417 | PinLock="Disabled" /> | ||
418 | <pin7 | ||
419 | ID="ARD_D9" | ||
420 | Type="PushPull" | ||
421 | Level="High" | ||
422 | Speed="Maximum" | ||
423 | Resistor="Floating" | ||
424 | Mode="Analog" | ||
425 | Alternate="0" | ||
426 | AnalogSwitch="Disabled" | ||
427 | PinLock="Disabled" /> | ||
428 | <pin8 | ||
429 | ID="" | ||
430 | Type="PushPull" | ||
431 | Level="High" | ||
432 | Speed="Maximum" | ||
433 | Resistor="Floating" | ||
434 | Mode="Analog" | ||
435 | Alternate="0" | ||
436 | AnalogSwitch="Disabled" | ||
437 | PinLock="Disabled" /> | ||
438 | <pin9 | ||
439 | ID="" | ||
440 | Type="PushPull" | ||
441 | Level="High" | ||
442 | Speed="Maximum" | ||
443 | Resistor="Floating" | ||
444 | Mode="Analog" | ||
445 | Alternate="0" | ||
446 | AnalogSwitch="Disabled" | ||
447 | PinLock="Disabled" /> | ||
448 | <pin10 | ||
449 | ID="" | ||
450 | Type="PushPull" | ||
451 | Level="High" | ||
452 | Speed="Maximum" | ||
453 | Resistor="Floating" | ||
454 | Mode="Analog" | ||
455 | Alternate="0" | ||
456 | AnalogSwitch="Disabled" | ||
457 | PinLock="Disabled" /> | ||
458 | <pin11 | ||
459 | ID="" | ||
460 | Type="PushPull" | ||
461 | Level="High" | ||
462 | Speed="Maximum" | ||
463 | Resistor="Floating" | ||
464 | Mode="Analog" | ||
465 | Alternate="0" | ||
466 | AnalogSwitch="Disabled" | ||
467 | PinLock="Disabled" /> | ||
468 | <pin12 | ||
469 | ID="" | ||
470 | Type="PushPull" | ||
471 | Level="High" | ||
472 | Speed="Maximum" | ||
473 | Resistor="Floating" | ||
474 | Mode="Analog" | ||
475 | Alternate="0" | ||
476 | AnalogSwitch="Disabled" | ||
477 | PinLock="Disabled" /> | ||
478 | <pin13 | ||
479 | ID="BUTTON" | ||
480 | Type="PushPull" | ||
481 | Level="High" | ||
482 | Speed="Maximum" | ||
483 | Resistor="Floating" | ||
484 | Mode="Input" | ||
485 | Alternate="0" | ||
486 | AnalogSwitch="Disabled" | ||
487 | PinLock="Disabled" /> | ||
488 | <pin14 | ||
489 | ID="OSC32_IN" | ||
490 | Type="PushPull" | ||
491 | Level="High" | ||
492 | Speed="Maximum" | ||
493 | Resistor="Floating" | ||
494 | Mode="Input" | ||
495 | Alternate="0" | ||
496 | AnalogSwitch="Disabled" | ||
497 | PinLock="Disabled" /> | ||
498 | <pin15 | ||
499 | ID="OSC32_OUT" | ||
500 | Type="PushPull" | ||
501 | Level="High" | ||
502 | Speed="Maximum" | ||
503 | Resistor="Floating" | ||
504 | Mode="Input" | ||
505 | Alternate="0" | ||
506 | AnalogSwitch="Disabled" | ||
507 | PinLock="Disabled" /> | ||
508 | </GPIOC> | ||
509 | <GPIOD> | ||
510 | <pin0 | ||
511 | ID="" | ||
512 | Type="PushPull" | ||
513 | Level="High" | ||
514 | Speed="Maximum" | ||
515 | Resistor="Floating" | ||
516 | Mode="Analog" | ||
517 | Alternate="0" | ||
518 | AnalogSwitch="Disabled" | ||
519 | PinLock="Disabled" /> | ||
520 | <pin1 | ||
521 | ID="" | ||
522 | Type="PushPull" | ||
523 | Level="High" | ||
524 | Speed="Maximum" | ||
525 | Resistor="Floating" | ||
526 | Mode="Analog" | ||
527 | Alternate="0" | ||
528 | AnalogSwitch="Disabled" | ||
529 | PinLock="Disabled" /> | ||
530 | <pin2 | ||
531 | ID="" | ||
532 | Type="PushPull" | ||
533 | Level="High" | ||
534 | Speed="Maximum" | ||
535 | Resistor="Floating" | ||
536 | Mode="Analog" | ||
537 | Alternate="0" | ||
538 | AnalogSwitch="Disabled" | ||
539 | PinLock="Disabled" /> | ||
540 | <pin3 | ||
541 | ID="" | ||
542 | Type="PushPull" | ||
543 | Level="High" | ||
544 | Speed="Maximum" | ||
545 | Resistor="Floating" | ||
546 | Mode="Analog" | ||
547 | Alternate="0" | ||
548 | AnalogSwitch="Disabled" | ||
549 | PinLock="Disabled" /> | ||
550 | <pin4 | ||
551 | ID="" | ||
552 | Type="PushPull" | ||
553 | Level="High" | ||
554 | Speed="Maximum" | ||
555 | Resistor="Floating" | ||
556 | Mode="Analog" | ||
557 | Alternate="0" | ||
558 | AnalogSwitch="Disabled" | ||
559 | PinLock="Disabled" /> | ||
560 | <pin5 | ||
561 | ID="" | ||
562 | Type="PushPull" | ||
563 | Level="High" | ||
564 | Speed="Maximum" | ||
565 | Resistor="Floating" | ||
566 | Mode="Analog" | ||
567 | Alternate="0" | ||
568 | AnalogSwitch="Disabled" | ||
569 | PinLock="Disabled" /> | ||
570 | <pin6 | ||
571 | ID="" | ||
572 | Type="PushPull" | ||
573 | Level="High" | ||
574 | Speed="Maximum" | ||
575 | Resistor="Floating" | ||
576 | Mode="Analog" | ||
577 | Alternate="0" | ||
578 | AnalogSwitch="Disabled" | ||
579 | PinLock="Disabled" /> | ||
580 | <pin7 | ||
581 | ID="" | ||
582 | Type="PushPull" | ||
583 | Level="High" | ||
584 | Speed="Maximum" | ||
585 | Resistor="Floating" | ||
586 | Mode="Analog" | ||
587 | Alternate="0" | ||
588 | AnalogSwitch="Disabled" | ||
589 | PinLock="Disabled" /> | ||
590 | <pin8 | ||
591 | ID="" | ||
592 | Type="PushPull" | ||
593 | Level="High" | ||
594 | Speed="Maximum" | ||
595 | Resistor="Floating" | ||
596 | Mode="Analog" | ||
597 | Alternate="0" | ||
598 | AnalogSwitch="Disabled" | ||
599 | PinLock="Disabled" /> | ||
600 | <pin9 | ||
601 | ID="" | ||
602 | Type="PushPull" | ||
603 | Level="High" | ||
604 | Speed="Maximum" | ||
605 | Resistor="Floating" | ||
606 | Mode="Analog" | ||
607 | Alternate="0" | ||
608 | AnalogSwitch="Disabled" | ||
609 | PinLock="Disabled" /> | ||
610 | <pin10 | ||
611 | ID="" | ||
612 | Type="PushPull" | ||
613 | Level="High" | ||
614 | Speed="Maximum" | ||
615 | Resistor="Floating" | ||
616 | Mode="Analog" | ||
617 | Alternate="0" | ||
618 | AnalogSwitch="Disabled" | ||
619 | PinLock="Disabled" /> | ||
620 | <pin11 | ||
621 | ID="" | ||
622 | Type="PushPull" | ||
623 | Level="High" | ||
624 | Speed="Maximum" | ||
625 | Resistor="Floating" | ||
626 | Mode="Analog" | ||
627 | Alternate="0" | ||
628 | AnalogSwitch="Disabled" | ||
629 | PinLock="Disabled" /> | ||
630 | <pin12 | ||
631 | ID="" | ||
632 | Type="PushPull" | ||
633 | Level="High" | ||
634 | Speed="Maximum" | ||
635 | Resistor="Floating" | ||
636 | Mode="Analog" | ||
637 | Alternate="0" | ||
638 | AnalogSwitch="Disabled" | ||
639 | PinLock="Disabled" /> | ||
640 | <pin13 | ||
641 | ID="" | ||
642 | Type="PushPull" | ||
643 | Level="High" | ||
644 | Speed="Maximum" | ||
645 | Resistor="Floating" | ||
646 | Mode="Analog" | ||
647 | Alternate="0" | ||
648 | AnalogSwitch="Disabled" | ||
649 | PinLock="Disabled" /> | ||
650 | <pin14 | ||
651 | ID="" | ||
652 | Type="PushPull" | ||
653 | Level="High" | ||
654 | Speed="Maximum" | ||
655 | Resistor="Floating" | ||
656 | Mode="Analog" | ||
657 | Alternate="0" | ||
658 | AnalogSwitch="Disabled" | ||
659 | PinLock="Disabled" /> | ||
660 | <pin15 | ||
661 | ID="" | ||
662 | Type="PushPull" | ||
663 | Level="High" | ||
664 | Speed="Maximum" | ||
665 | Resistor="Floating" | ||
666 | Mode="Analog" | ||
667 | Alternate="0" | ||
668 | AnalogSwitch="Disabled" | ||
669 | PinLock="Disabled" /> | ||
670 | </GPIOD> | ||
671 | <GPIOE> | ||
672 | <pin0 | ||
673 | ID="" | ||
674 | Type="PushPull" | ||
675 | Level="High" | ||
676 | Speed="Maximum" | ||
677 | Resistor="Floating" | ||
678 | Mode="Analog" | ||
679 | Alternate="0" | ||
680 | AnalogSwitch="Disabled" | ||
681 | PinLock="Disabled" /> | ||
682 | <pin1 | ||
683 | ID="" | ||
684 | Type="PushPull" | ||
685 | Level="High" | ||
686 | Speed="Maximum" | ||
687 | Resistor="Floating" | ||
688 | Mode="Analog" | ||
689 | Alternate="0" | ||
690 | AnalogSwitch="Disabled" | ||
691 | PinLock="Disabled" /> | ||
692 | <pin2 | ||
693 | ID="" | ||
694 | Type="PushPull" | ||
695 | Level="High" | ||
696 | Speed="Maximum" | ||
697 | Resistor="Floating" | ||
698 | Mode="Analog" | ||
699 | Alternate="0" | ||
700 | AnalogSwitch="Disabled" | ||
701 | PinLock="Disabled" /> | ||
702 | <pin3 | ||
703 | ID="" | ||
704 | Type="PushPull" | ||
705 | Level="High" | ||
706 | Speed="Maximum" | ||
707 | Resistor="Floating" | ||
708 | Mode="Analog" | ||
709 | Alternate="0" | ||
710 | AnalogSwitch="Disabled" | ||
711 | PinLock="Disabled" /> | ||
712 | <pin4 | ||
713 | ID="" | ||
714 | Type="PushPull" | ||
715 | Level="High" | ||
716 | Speed="Maximum" | ||
717 | Resistor="Floating" | ||
718 | Mode="Analog" | ||
719 | Alternate="0" | ||
720 | AnalogSwitch="Disabled" | ||
721 | PinLock="Disabled" /> | ||
722 | <pin5 | ||
723 | ID="" | ||
724 | Type="PushPull" | ||
725 | Level="High" | ||
726 | Speed="Maximum" | ||
727 | Resistor="Floating" | ||
728 | Mode="Analog" | ||
729 | Alternate="0" | ||
730 | AnalogSwitch="Disabled" | ||
731 | PinLock="Disabled" /> | ||
732 | <pin6 | ||
733 | ID="" | ||
734 | Type="PushPull" | ||
735 | Level="High" | ||
736 | Speed="Maximum" | ||
737 | Resistor="Floating" | ||
738 | Mode="Analog" | ||
739 | Alternate="0" | ||
740 | AnalogSwitch="Disabled" | ||
741 | PinLock="Disabled" /> | ||
742 | <pin7 | ||
743 | ID="" | ||
744 | Type="PushPull" | ||
745 | Level="High" | ||
746 | Speed="Maximum" | ||
747 | Resistor="Floating" | ||
748 | Mode="Analog" | ||
749 | Alternate="0" | ||
750 | AnalogSwitch="Disabled" | ||
751 | PinLock="Disabled" /> | ||
752 | <pin8 | ||
753 | ID="" | ||
754 | Type="PushPull" | ||
755 | Level="High" | ||
756 | Speed="Maximum" | ||
757 | Resistor="Floating" | ||
758 | Mode="Analog" | ||
759 | Alternate="0" | ||
760 | AnalogSwitch="Disabled" | ||
761 | PinLock="Disabled" /> | ||
762 | <pin9 | ||
763 | ID="" | ||
764 | Type="PushPull" | ||
765 | Level="High" | ||
766 | Speed="Maximum" | ||
767 | Resistor="Floating" | ||
768 | Mode="Analog" | ||
769 | Alternate="0" | ||
770 | AnalogSwitch="Disabled" | ||
771 | PinLock="Disabled" /> | ||
772 | <pin10 | ||
773 | ID="" | ||
774 | Type="PushPull" | ||
775 | Level="High" | ||
776 | Speed="Maximum" | ||
777 | Resistor="Floating" | ||
778 | Mode="Analog" | ||
779 | Alternate="0" | ||
780 | AnalogSwitch="Disabled" | ||
781 | PinLock="Disabled" /> | ||
782 | <pin11 | ||
783 | ID="" | ||
784 | Type="PushPull" | ||
785 | Level="High" | ||
786 | Speed="Maximum" | ||
787 | Resistor="Floating" | ||
788 | Mode="Analog" | ||
789 | Alternate="0" | ||
790 | AnalogSwitch="Disabled" | ||
791 | PinLock="Disabled" /> | ||
792 | <pin12 | ||
793 | ID="" | ||
794 | Type="PushPull" | ||
795 | Level="High" | ||
796 | Speed="Maximum" | ||
797 | Resistor="Floating" | ||
798 | Mode="Analog" | ||
799 | Alternate="0" | ||
800 | AnalogSwitch="Disabled" | ||
801 | PinLock="Disabled" /> | ||
802 | <pin13 | ||
803 | ID="" | ||
804 | Type="PushPull" | ||
805 | Level="High" | ||
806 | Speed="Maximum" | ||
807 | Resistor="Floating" | ||
808 | Mode="Analog" | ||
809 | Alternate="0" | ||
810 | AnalogSwitch="Disabled" | ||
811 | PinLock="Disabled" /> | ||
812 | <pin14 | ||
813 | ID="" | ||
814 | Type="PushPull" | ||
815 | Level="High" | ||
816 | Speed="Maximum" | ||
817 | Resistor="Floating" | ||
818 | Mode="Analog" | ||
819 | Alternate="0" | ||
820 | AnalogSwitch="Disabled" | ||
821 | PinLock="Disabled" /> | ||
822 | <pin15 | ||
823 | ID="" | ||
824 | Type="PushPull" | ||
825 | Level="High" | ||
826 | Speed="Maximum" | ||
827 | Resistor="Floating" | ||
828 | Mode="Analog" | ||
829 | Alternate="0" | ||
830 | AnalogSwitch="Disabled" | ||
831 | PinLock="Disabled" /> | ||
832 | </GPIOE> | ||
833 | <GPIOF> | ||
834 | <pin0 | ||
835 | ID="" | ||
836 | Type="PushPull" | ||
837 | Level="High" | ||
838 | Speed="Maximum" | ||
839 | Resistor="Floating" | ||
840 | Mode="Analog" | ||
841 | Alternate="0" | ||
842 | AnalogSwitch="Disabled" | ||
843 | PinLock="Disabled" /> | ||
844 | <pin1 | ||
845 | ID="" | ||
846 | Type="PushPull" | ||
847 | Level="High" | ||
848 | Speed="Maximum" | ||
849 | Resistor="Floating" | ||
850 | Mode="Analog" | ||
851 | Alternate="0" | ||
852 | AnalogSwitch="Disabled" | ||
853 | PinLock="Disabled" /> | ||
854 | <pin2 | ||
855 | ID="" | ||
856 | Type="PushPull" | ||
857 | Level="High" | ||
858 | Speed="Maximum" | ||
859 | Resistor="Floating" | ||
860 | Mode="Analog" | ||
861 | Alternate="0" | ||
862 | AnalogSwitch="Disabled" | ||
863 | PinLock="Disabled" /> | ||
864 | <pin3 | ||
865 | ID="" | ||
866 | Type="PushPull" | ||
867 | Level="High" | ||
868 | Speed="Maximum" | ||
869 | Resistor="Floating" | ||
870 | Mode="Analog" | ||
871 | Alternate="0" | ||
872 | AnalogSwitch="Disabled" | ||
873 | PinLock="Disabled" /> | ||
874 | <pin4 | ||
875 | ID="" | ||
876 | Type="PushPull" | ||
877 | Level="High" | ||
878 | Speed="Maximum" | ||
879 | Resistor="Floating" | ||
880 | Mode="Analog" | ||
881 | Alternate="0" | ||
882 | AnalogSwitch="Disabled" | ||
883 | PinLock="Disabled" /> | ||
884 | <pin5 | ||
885 | ID="" | ||
886 | Type="PushPull" | ||
887 | Level="High" | ||
888 | Speed="Maximum" | ||
889 | Resistor="Floating" | ||
890 | Mode="Analog" | ||
891 | Alternate="0" | ||
892 | AnalogSwitch="Disabled" | ||
893 | PinLock="Disabled" /> | ||
894 | <pin6 | ||
895 | ID="" | ||
896 | Type="PushPull" | ||
897 | Level="High" | ||
898 | Speed="Maximum" | ||
899 | Resistor="Floating" | ||
900 | Mode="Analog" | ||
901 | Alternate="0" | ||
902 | AnalogSwitch="Disabled" | ||
903 | PinLock="Disabled" /> | ||
904 | <pin7 | ||
905 | ID="" | ||
906 | Type="PushPull" | ||
907 | Level="High" | ||
908 | Speed="Maximum" | ||
909 | Resistor="Floating" | ||
910 | Mode="Analog" | ||
911 | Alternate="0" | ||
912 | AnalogSwitch="Disabled" | ||
913 | PinLock="Disabled" /> | ||
914 | <pin8 | ||
915 | ID="" | ||
916 | Type="PushPull" | ||
917 | Level="High" | ||
918 | Speed="Maximum" | ||
919 | Resistor="Floating" | ||
920 | Mode="Analog" | ||
921 | Alternate="0" | ||
922 | AnalogSwitch="Disabled" | ||
923 | PinLock="Disabled" /> | ||
924 | <pin9 | ||
925 | ID="" | ||
926 | Type="PushPull" | ||
927 | Level="High" | ||
928 | Speed="Maximum" | ||
929 | Resistor="Floating" | ||
930 | Mode="Analog" | ||
931 | Alternate="0" | ||
932 | AnalogSwitch="Disabled" | ||
933 | PinLock="Disabled" /> | ||
934 | <pin10 | ||
935 | ID="" | ||
936 | Type="PushPull" | ||
937 | Level="High" | ||
938 | Speed="Maximum" | ||
939 | Resistor="Floating" | ||
940 | Mode="Analog" | ||
941 | Alternate="0" | ||
942 | AnalogSwitch="Disabled" | ||
943 | PinLock="Disabled" /> | ||
944 | <pin11 | ||
945 | ID="" | ||
946 | Type="PushPull" | ||
947 | Level="High" | ||
948 | Speed="Maximum" | ||
949 | Resistor="Floating" | ||
950 | Mode="Analog" | ||
951 | Alternate="0" | ||
952 | AnalogSwitch="Disabled" | ||
953 | PinLock="Disabled" /> | ||
954 | <pin12 | ||
955 | ID="" | ||
956 | Type="PushPull" | ||
957 | Level="High" | ||
958 | Speed="Maximum" | ||
959 | Resistor="Floating" | ||
960 | Mode="Analog" | ||
961 | Alternate="0" | ||
962 | AnalogSwitch="Disabled" | ||
963 | PinLock="Disabled" /> | ||
964 | <pin13 | ||
965 | ID="" | ||
966 | Type="PushPull" | ||
967 | Level="High" | ||
968 | Speed="Maximum" | ||
969 | Resistor="Floating" | ||
970 | Mode="Analog" | ||
971 | Alternate="0" | ||
972 | AnalogSwitch="Disabled" | ||
973 | PinLock="Disabled" /> | ||
974 | <pin14 | ||
975 | ID="" | ||
976 | Type="PushPull" | ||
977 | Level="High" | ||
978 | Speed="Maximum" | ||
979 | Resistor="Floating" | ||
980 | Mode="Analog" | ||
981 | Alternate="0" | ||
982 | AnalogSwitch="Disabled" | ||
983 | PinLock="Disabled" /> | ||
984 | <pin15 | ||
985 | ID="" | ||
986 | Type="PushPull" | ||
987 | Level="High" | ||
988 | Speed="Maximum" | ||
989 | Resistor="Floating" | ||
990 | Mode="Analog" | ||
991 | Alternate="0" | ||
992 | AnalogSwitch="Disabled" | ||
993 | PinLock="Disabled" /> | ||
994 | </GPIOF> | ||
995 | <GPIOG> | ||
996 | <pin0 | ||
997 | ID="" | ||
998 | Type="PushPull" | ||
999 | Speed="Minimum" | ||
1000 | Resistor="Floating" | ||
1001 | Level="High" | ||
1002 | Mode="Analog" | ||
1003 | Alternate="0" | ||
1004 | AnalogSwitch="Disabled" | ||
1005 | PinLock="Disabled" /> | ||
1006 | <pin1 | ||
1007 | ID="" | ||
1008 | Type="PushPull" | ||
1009 | Speed="Minimum" | ||
1010 | Resistor="Floating" | ||
1011 | Level="High" | ||
1012 | Mode="Analog" | ||
1013 | Alternate="0" | ||
1014 | AnalogSwitch="Disabled" | ||
1015 | PinLock="Disabled" /> | ||
1016 | <pin2 | ||
1017 | ID="" | ||
1018 | Type="PushPull" | ||
1019 | Speed="Minimum" | ||
1020 | Resistor="Floating" | ||
1021 | Level="High" | ||
1022 | Mode="Analog" | ||
1023 | Alternate="0" | ||
1024 | AnalogSwitch="Disabled" | ||
1025 | PinLock="Disabled" /> | ||
1026 | <pin3 | ||
1027 | ID="" | ||
1028 | Type="PushPull" | ||
1029 | Speed="Minimum" | ||
1030 | Resistor="Floating" | ||
1031 | Level="High" | ||
1032 | Mode="Analog" | ||
1033 | Alternate="0" | ||
1034 | AnalogSwitch="Disabled" | ||
1035 | PinLock="Disabled" /> | ||
1036 | <pin4 | ||
1037 | ID="" | ||
1038 | Type="PushPull" | ||
1039 | Speed="Minimum" | ||
1040 | Resistor="Floating" | ||
1041 | Level="High" | ||
1042 | Mode="Analog" | ||
1043 | Alternate="0" | ||
1044 | AnalogSwitch="Disabled" | ||
1045 | PinLock="Disabled" /> | ||
1046 | <pin5 | ||
1047 | ID="" | ||
1048 | Type="PushPull" | ||
1049 | Speed="Minimum" | ||
1050 | Resistor="Floating" | ||
1051 | Level="High" | ||
1052 | Mode="Analog" | ||
1053 | Alternate="0" | ||
1054 | AnalogSwitch="Disabled" | ||
1055 | PinLock="Disabled" /> | ||
1056 | <pin6 | ||
1057 | ID="" | ||
1058 | Type="PushPull" | ||
1059 | Speed="Minimum" | ||
1060 | Resistor="Floating" | ||
1061 | Level="High" | ||
1062 | Mode="Analog" | ||
1063 | Alternate="0" | ||
1064 | AnalogSwitch="Disabled" | ||
1065 | PinLock="Disabled" /> | ||
1066 | <pin7 | ||
1067 | ID="" | ||
1068 | Type="PushPull" | ||
1069 | Speed="Minimum" | ||
1070 | Resistor="Floating" | ||
1071 | Level="High" | ||
1072 | Mode="Analog" | ||
1073 | Alternate="0" | ||
1074 | AnalogSwitch="Disabled" | ||
1075 | PinLock="Disabled" /> | ||
1076 | <pin8 | ||
1077 | ID="" | ||
1078 | Type="PushPull" | ||
1079 | Speed="Minimum" | ||
1080 | Resistor="Floating" | ||
1081 | Level="High" | ||
1082 | Mode="Analog" | ||
1083 | Alternate="0" | ||
1084 | AnalogSwitch="Disabled" | ||
1085 | PinLock="Disabled" /> | ||
1086 | <pin9 | ||
1087 | ID="" | ||
1088 | Type="PushPull" | ||
1089 | Speed="Minimum" | ||
1090 | Resistor="Floating" | ||
1091 | Level="High" | ||
1092 | Mode="Analog" | ||
1093 | Alternate="0" | ||
1094 | AnalogSwitch="Disabled" | ||
1095 | PinLock="Disabled" /> | ||
1096 | <pin10 | ||
1097 | ID="" | ||
1098 | Type="PushPull" | ||
1099 | Speed="Minimum" | ||
1100 | Resistor="Floating" | ||
1101 | Level="High" | ||
1102 | Mode="Analog" | ||
1103 | Alternate="0" | ||
1104 | AnalogSwitch="Disabled" | ||
1105 | PinLock="Disabled" /> | ||
1106 | <pin11 | ||
1107 | ID="" | ||
1108 | Type="PushPull" | ||
1109 | Speed="Minimum" | ||
1110 | Resistor="Floating" | ||
1111 | Level="High" | ||
1112 | Mode="Analog" | ||
1113 | Alternate="0" | ||
1114 | AnalogSwitch="Disabled" | ||
1115 | PinLock="Disabled" /> | ||
1116 | <pin12 | ||
1117 | ID="" | ||
1118 | Type="PushPull" | ||
1119 | Speed="Minimum" | ||
1120 | Resistor="Floating" | ||
1121 | Level="High" | ||
1122 | Mode="Analog" | ||
1123 | Alternate="0" | ||
1124 | AnalogSwitch="Disabled" | ||
1125 | PinLock="Disabled" /> | ||
1126 | <pin13 | ||
1127 | ID="" | ||
1128 | Type="PushPull" | ||
1129 | Speed="Minimum" | ||
1130 | Resistor="Floating" | ||
1131 | Level="High" | ||
1132 | Mode="Analog" | ||
1133 | Alternate="0" | ||
1134 | AnalogSwitch="Disabled" | ||
1135 | PinLock="Disabled" /> | ||
1136 | <pin14 | ||
1137 | ID="" | ||
1138 | Type="PushPull" | ||
1139 | Speed="Minimum" | ||
1140 | Resistor="Floating" | ||
1141 | Level="High" | ||
1142 | Mode="Analog" | ||
1143 | Alternate="0" | ||
1144 | AnalogSwitch="Disabled" | ||
1145 | PinLock="Disabled" /> | ||
1146 | <pin15 | ||
1147 | ID="" | ||
1148 | Type="PushPull" | ||
1149 | Speed="Minimum" | ||
1150 | Resistor="Floating" | ||
1151 | Level="High" | ||
1152 | Mode="Analog" | ||
1153 | Alternate="0" | ||
1154 | AnalogSwitch="Disabled" | ||
1155 | PinLock="Disabled" /> | ||
1156 | </GPIOG> | ||
1157 | <GPIOH> | ||
1158 | <pin0 | ||
1159 | ID="OSC_IN" | ||
1160 | Type="PushPull" | ||
1161 | Speed="Maximum" | ||
1162 | Resistor="Floating" | ||
1163 | Level="High" | ||
1164 | Mode="Input" | ||
1165 | Alternate="0" | ||
1166 | AnalogSwitch="Disabled" | ||
1167 | PinLock="Disabled" /> | ||
1168 | <pin1 | ||
1169 | ID="OSC_OUT" | ||
1170 | Type="PushPull" | ||
1171 | Speed="Maximum" | ||
1172 | Resistor="Floating" | ||
1173 | Level="High" | ||
1174 | Mode="Input" | ||
1175 | Alternate="0" | ||
1176 | AnalogSwitch="Disabled" | ||
1177 | PinLock="Disabled" /> | ||
1178 | <pin2 | ||
1179 | ID="" | ||
1180 | Type="PushPull" | ||
1181 | Speed="Minimum" | ||
1182 | Resistor="Floating" | ||
1183 | Level="High" | ||
1184 | Mode="Analog" | ||
1185 | Alternate="0" | ||
1186 | AnalogSwitch="Disabled" | ||
1187 | PinLock="Disabled" /> | ||
1188 | <pin3 | ||
1189 | ID="" | ||
1190 | Type="PushPull" | ||
1191 | Speed="Minimum" | ||
1192 | Resistor="Floating" | ||
1193 | Level="High" | ||
1194 | Mode="Analog" | ||
1195 | Alternate="0" | ||
1196 | AnalogSwitch="Disabled" | ||
1197 | PinLock="Disabled" /> | ||
1198 | <pin4 | ||
1199 | ID="" | ||
1200 | Type="PushPull" | ||
1201 | Speed="Minimum" | ||
1202 | Resistor="Floating" | ||
1203 | Level="High" | ||
1204 | Mode="Analog" | ||
1205 | Alternate="0" | ||
1206 | AnalogSwitch="Disabled" | ||
1207 | PinLock="Disabled" /> | ||
1208 | <pin5 | ||
1209 | ID="" | ||
1210 | Type="PushPull" | ||
1211 | Speed="Minimum" | ||
1212 | Resistor="Floating" | ||
1213 | Level="High" | ||
1214 | Mode="Analog" | ||
1215 | Alternate="0" | ||
1216 | AnalogSwitch="Disabled" | ||
1217 | PinLock="Disabled" /> | ||
1218 | <pin6 | ||
1219 | ID="" | ||
1220 | Type="PushPull" | ||
1221 | Speed="Minimum" | ||
1222 | Resistor="Floating" | ||
1223 | Level="High" | ||
1224 | Mode="Analog" | ||
1225 | Alternate="0" | ||
1226 | AnalogSwitch="Disabled" | ||
1227 | PinLock="Disabled" /> | ||
1228 | <pin7 | ||
1229 | ID="" | ||
1230 | Type="PushPull" | ||
1231 | Speed="Minimum" | ||
1232 | Resistor="Floating" | ||
1233 | Level="High" | ||
1234 | Mode="Analog" | ||
1235 | Alternate="0" | ||
1236 | AnalogSwitch="Disabled" | ||
1237 | PinLock="Disabled" /> | ||
1238 | <pin8 | ||
1239 | ID="" | ||
1240 | Type="PushPull" | ||
1241 | Speed="Minimum" | ||
1242 | Resistor="Floating" | ||
1243 | Level="High" | ||
1244 | Mode="Analog" | ||
1245 | Alternate="0" | ||
1246 | AnalogSwitch="Disabled" | ||
1247 | PinLock="Disabled" /> | ||
1248 | <pin9 | ||
1249 | ID="" | ||
1250 | Type="PushPull" | ||
1251 | Speed="Minimum" | ||
1252 | Resistor="Floating" | ||
1253 | Level="High" | ||
1254 | Mode="Analog" | ||
1255 | Alternate="0" | ||
1256 | AnalogSwitch="Disabled" | ||
1257 | PinLock="Disabled" /> | ||
1258 | <pin10 | ||
1259 | ID="" | ||
1260 | Type="PushPull" | ||
1261 | Speed="Minimum" | ||
1262 | Resistor="Floating" | ||
1263 | Level="High" | ||
1264 | Mode="Analog" | ||
1265 | Alternate="0" | ||
1266 | AnalogSwitch="Disabled" | ||
1267 | PinLock="Disabled" /> | ||
1268 | <pin11 | ||
1269 | ID="" | ||
1270 | Type="PushPull" | ||
1271 | Speed="Minimum" | ||
1272 | Resistor="Floating" | ||
1273 | Level="High" | ||
1274 | Mode="Analog" | ||
1275 | Alternate="0" | ||
1276 | AnalogSwitch="Disabled" | ||
1277 | PinLock="Disabled" /> | ||
1278 | <pin12 | ||
1279 | ID="" | ||
1280 | Type="PushPull" | ||
1281 | Speed="Minimum" | ||
1282 | Resistor="Floating" | ||
1283 | Level="High" | ||
1284 | Mode="Analog" | ||
1285 | Alternate="0" | ||
1286 | AnalogSwitch="Disabled" | ||
1287 | PinLock="Disabled" /> | ||
1288 | <pin13 | ||
1289 | ID="" | ||
1290 | Type="PushPull" | ||
1291 | Speed="Minimum" | ||
1292 | Resistor="Floating" | ||
1293 | Level="High" | ||
1294 | Mode="Analog" | ||
1295 | Alternate="0" | ||
1296 | AnalogSwitch="Disabled" | ||
1297 | PinLock="Disabled" /> | ||
1298 | <pin14 | ||
1299 | ID="" | ||
1300 | Type="PushPull" | ||
1301 | Speed="Minimum" | ||
1302 | Resistor="Floating" | ||
1303 | Level="High" | ||
1304 | Mode="Analog" | ||
1305 | Alternate="0" | ||
1306 | AnalogSwitch="Disabled" | ||
1307 | PinLock="Disabled" /> | ||
1308 | <pin15 | ||
1309 | ID="" | ||
1310 | Type="PushPull" | ||
1311 | Speed="Minimum" | ||
1312 | Resistor="Floating" | ||
1313 | Level="High" | ||
1314 | Mode="Analog" | ||
1315 | Alternate="0" | ||
1316 | AnalogSwitch="Disabled" | ||
1317 | PinLock="Disabled" /> | ||
1318 | </GPIOH> | ||
1319 | </ports> | ||
1320 | </board> | ||
diff --git a/lib/chibios/os/hal/boards/ST_NUCLEO64_L476RG/cfg/board.fmpp b/lib/chibios/os/hal/boards/ST_NUCLEO64_L476RG/cfg/board.fmpp new file mode 100644 index 000000000..3c311d3e9 --- /dev/null +++ b/lib/chibios/os/hal/boards/ST_NUCLEO64_L476RG/cfg/board.fmpp | |||
@@ -0,0 +1,15 @@ | |||
1 | sourceRoot: ../../../../../tools/ftl/processors/boards/stm32l4xx/templates | ||
2 | outputRoot: .. | ||
3 | dataRoot: . | ||
4 | |||
5 | freemarkerLinks: { | ||
6 | lib: ../../../../../tools/ftl/libs | ||
7 | } | ||
8 | |||
9 | data : { | ||
10 | doc1:xml ( | ||
11 | board.chcfg | ||
12 | { | ||
13 | } | ||
14 | ) | ||
15 | } | ||