aboutsummaryrefslogtreecommitdiff
path: root/drivers/boards/GENERIC_STM32_F072XB
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/boards/GENERIC_STM32_F072XB')
-rw-r--r--drivers/boards/GENERIC_STM32_F072XB/board.c250
-rw-r--r--drivers/boards/GENERIC_STM32_F072XB/board.h407
-rw-r--r--drivers/boards/GENERIC_STM32_F072XB/board.mk9
-rw-r--r--drivers/boards/GENERIC_STM32_F072XB/bootloader_defs.h7
-rw-r--r--drivers/boards/GENERIC_STM32_F072XB/cfg/board.chcfg703
-rw-r--r--drivers/boards/GENERIC_STM32_F072XB/cfg/board.fmpp15
6 files changed, 0 insertions, 1391 deletions
diff --git a/drivers/boards/GENERIC_STM32_F072XB/board.c b/drivers/boards/GENERIC_STM32_F072XB/board.c
deleted file mode 100644
index c91136e8f..000000000
--- a/drivers/boards/GENERIC_STM32_F072XB/board.c
+++ /dev/null
@@ -1,250 +0,0 @@
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 */
40typedef 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} gpio_setup_t;
49
50/**
51 * @brief Type of STM32 GPIO initialization data.
52 */
53typedef struct {
54#if STM32_HAS_GPIOA || defined(__DOXYGEN__)
55 gpio_setup_t PAData;
56#endif
57#if STM32_HAS_GPIOB || defined(__DOXYGEN__)
58 gpio_setup_t PBData;
59#endif
60#if STM32_HAS_GPIOC || defined(__DOXYGEN__)
61 gpio_setup_t PCData;
62#endif
63#if STM32_HAS_GPIOD || defined(__DOXYGEN__)
64 gpio_setup_t PDData;
65#endif
66#if STM32_HAS_GPIOE || defined(__DOXYGEN__)
67 gpio_setup_t PEData;
68#endif
69#if STM32_HAS_GPIOF || defined(__DOXYGEN__)
70 gpio_setup_t PFData;
71#endif
72#if STM32_HAS_GPIOG || defined(__DOXYGEN__)
73 gpio_setup_t PGData;
74#endif
75#if STM32_HAS_GPIOH || defined(__DOXYGEN__)
76 gpio_setup_t PHData;
77#endif
78#if STM32_HAS_GPIOI || defined(__DOXYGEN__)
79 gpio_setup_t PIData;
80#endif
81#if STM32_HAS_GPIOJ || defined(__DOXYGEN__)
82 gpio_setup_t PJData;
83#endif
84#if STM32_HAS_GPIOK || defined(__DOXYGEN__)
85 gpio_setup_t PKData;
86#endif
87} gpio_config_t;
88
89/**
90 * @brief STM32 GPIO static initialization data.
91 */
92static const gpio_config_t gpio_default_config = {
93#if STM32_HAS_GPIOA
94 {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH},
95#endif
96#if STM32_HAS_GPIOB
97 {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH},
98#endif
99#if STM32_HAS_GPIOC
100 {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH},
101#endif
102#if STM32_HAS_GPIOD
103 {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH},
104#endif
105#if STM32_HAS_GPIOE
106 {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH},
107#endif
108#if STM32_HAS_GPIOF
109 {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH},
110#endif
111#if STM32_HAS_GPIOG
112 {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH},
113#endif
114#if STM32_HAS_GPIOH
115 {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH},
116#endif
117#if STM32_HAS_GPIOI
118 {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH},
119#endif
120#if STM32_HAS_GPIOJ
121 {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR, VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH},
122#endif
123#if STM32_HAS_GPIOK
124 {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR, VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH}
125#endif
126};
127
128/*===========================================================================*/
129/* Driver local functions. */
130/*===========================================================================*/
131
132static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) {
133 gpiop->OTYPER = config->otyper;
134 gpiop->OSPEEDR = config->ospeedr;
135 gpiop->PUPDR = config->pupdr;
136 gpiop->ODR = config->odr;
137 gpiop->AFRL = config->afrl;
138 gpiop->AFRH = config->afrh;
139 gpiop->MODER = config->moder;
140}
141
142static void stm32_gpio_init(void) {
143 /* Enabling GPIO-related clocks, the mask comes from the
144 registry header file.*/
145 rccResetAHB(STM32_GPIO_EN_MASK);
146 rccEnableAHB(STM32_GPIO_EN_MASK, true);
147
148 /* Initializing all the defined GPIO ports.*/
149#if STM32_HAS_GPIOA
150 gpio_init(GPIOA, &gpio_default_config.PAData);
151#endif
152#if STM32_HAS_GPIOB
153 gpio_init(GPIOB, &gpio_default_config.PBData);
154#endif
155#if STM32_HAS_GPIOC
156 gpio_init(GPIOC, &gpio_default_config.PCData);
157#endif
158#if STM32_HAS_GPIOD
159 gpio_init(GPIOD, &gpio_default_config.PDData);
160#endif
161#if STM32_HAS_GPIOE
162 gpio_init(GPIOE, &gpio_default_config.PEData);
163#endif
164#if STM32_HAS_GPIOF
165 gpio_init(GPIOF, &gpio_default_config.PFData);
166#endif
167#if STM32_HAS_GPIOG
168 gpio_init(GPIOG, &gpio_default_config.PGData);
169#endif
170#if STM32_HAS_GPIOH
171 gpio_init(GPIOH, &gpio_default_config.PHData);
172#endif
173#if STM32_HAS_GPIOI
174 gpio_init(GPIOI, &gpio_default_config.PIData);
175#endif
176#if STM32_HAS_GPIOJ
177 gpio_init(GPIOJ, &gpio_default_config.PJData);
178#endif
179#if STM32_HAS_GPIOK
180 gpio_init(GPIOK, &gpio_default_config.PKData);
181#endif
182}
183
184/*===========================================================================*/
185/* Driver interrupt handlers. */
186/*===========================================================================*/
187
188/*===========================================================================*/
189/* Driver exported functions. */
190/*===========================================================================*/
191
192__attribute__((weak)) void enter_bootloader_mode_if_requested(void) {}
193
194/**
195 * @brief Early initialization code.
196 * @details GPIO ports and system clocks are initialized before everything
197 * else.
198 */
199void __early_init(void) {
200 enter_bootloader_mode_if_requested();
201
202 stm32_gpio_init();
203 stm32_clock_init();
204}
205
206#if HAL_USE_SDC || defined(__DOXYGEN__)
207/**
208 * @brief SDC card detection.
209 */
210bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
211 (void)sdcp;
212 /* TODO: Fill the implementation.*/
213 return true;
214}
215
216/**
217 * @brief SDC card write protection detection.
218 */
219bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
220 (void)sdcp;
221 /* TODO: Fill the implementation.*/
222 return false;
223}
224#endif /* HAL_USE_SDC */
225
226#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
227/**
228 * @brief MMC_SPI card detection.
229 */
230bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
231 (void)mmcp;
232 /* TODO: Fill the implementation.*/
233 return true;
234}
235
236/**
237 * @brief MMC_SPI card write protection detection.
238 */
239bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
240 (void)mmcp;
241 /* TODO: Fill the implementation.*/
242 return false;
243}
244#endif
245
246/**
247 * @brief Board-specific initialization code.
248 * @todo Add your board-specific code, if any.
249 */
250void boardInit(void) {}
diff --git a/drivers/boards/GENERIC_STM32_F072XB/board.h b/drivers/boards/GENERIC_STM32_F072XB/board.h
deleted file mode 100644
index 87570e62d..000000000
--- a/drivers/boards/GENERIC_STM32_F072XB/board.h
+++ /dev/null
@@ -1,407 +0,0 @@
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 Generic STM32_F072 Board
31 */
32
33/*
34 * Board identifier.
35 */
36#define BOARD_GENERIC_STM32_F072XB
37#define BOARD_NAME "STM32_F072"
38
39/*
40 * Board oscillators-related settings.
41 * NOTE: LSE not fitted.
42 * NOTE: HSE not fitted.
43 */
44#if !defined(STM32_LSECLK)
45# define STM32_LSECLK 0U
46#endif
47
48#define STM32_LSEDRV (3U << 3U)
49
50#if !defined(STM32_HSECLK)
51# define STM32_HSECLK 0U
52#endif
53
54#define STM32_HSE_BYPASS
55
56/*
57 * MCU type as defined in the ST header.
58 */
59#define STM32F072xB
60
61/*
62 * IO pins assignments.
63 */
64#define GPIOA_BUTTON 0U
65#define GPIOA_PIN1 1U
66#define GPIOA_PIN2 2U
67#define GPIOA_PIN3 3U
68#define GPIOA_PIN4 4U
69#define GPIOA_PIN5 5U
70#define GPIOA_PIN6 6U
71#define GPIOA_PIN7 7U
72#define GPIOA_PIN8 8U
73#define GPIOA_PIN9 9U
74#define GPIOA_PIN10 10U
75#define GPIOA_USB_DM 11U
76#define GPIOA_USB_DP 12U
77#define GPIOA_SWDIO 13U
78#define GPIOA_SWCLK 14U
79#define GPIOA_PIN15 15U
80
81#define GPIOB_PIN0 0U
82#define GPIOB_PIN1 1U
83#define GPIOB_PIN2 2U
84#define GPIOB_PIN3 3U
85#define GPIOB_PIN4 4U
86#define GPIOB_PIN5 5U
87#define GPIOB_PIN6 6U
88#define GPIOB_PIN7 7U
89#define GPIOB_PIN8 8U
90#define GPIOB_PIN9 9U
91#define GPIOB_PIN10 10U
92#define GPIOB_PIN11 11U
93#define GPIOB_PIN12 12U
94#define GPIOB_SPI2_SCK 13U
95#define GPIOB_SPI2_MISO 14U
96#define GPIOB_SPI2_MOSI 15U
97
98#define GPIOC_MEMS_CS 0U
99#define GPIOC_PIN1 1U
100#define GPIOC_PIN2 2U
101#define GPIOC_PIN3 3U
102#define GPIOC_PIN4 4U
103#define GPIOC_PIN5 5U
104#define GPIOC_LED_RED 6U
105#define GPIOC_LED_BLUE 7U
106#define GPIOC_LED_ORANGE 8U
107#define GPIOC_LED_GREEN 9U
108#define GPIOC_PIN10 10U
109#define GPIOC_PIN11 11U
110#define GPIOC_PIN12 12U
111#define GPIOC_PIN13 13U
112#define GPIOC_OSC32_IN 14U
113#define GPIOC_OSC32_OUT 15U
114
115#define GPIOD_PIN0 0U
116#define GPIOD_PIN1 1U
117#define GPIOD_PIN2 2U
118#define GPIOD_PIN3 3U
119#define GPIOD_PIN4 4U
120#define GPIOD_PIN5 5U
121#define GPIOD_PIN6 6U
122#define GPIOD_PIN7 7U
123#define GPIOD_PIN8 8U
124#define GPIOD_PIN9 9U
125#define GPIOD_PIN10 10U
126#define GPIOD_PIN11 11U
127#define GPIOD_PIN12 12U
128#define GPIOD_PIN13 13U
129#define GPIOD_PIN14 14U
130#define GPIOD_PIN15 15U
131
132#define GPIOE_PIN0 0U
133#define GPIOE_PIN1 1U
134#define GPIOE_PIN2 2U
135#define GPIOE_PIN3 3U
136#define GPIOE_PIN4 4U
137#define GPIOE_PIN5 5U
138#define GPIOE_PIN6 6U
139#define GPIOE_PIN7 7U
140#define GPIOE_PIN8 8U
141#define GPIOE_PIN9 9U
142#define GPIOE_PIN10 10U
143#define GPIOE_PIN11 11U
144#define GPIOE_PIN12 12U
145#define GPIOE_PIN13 13U
146#define GPIOE_PIN14 14U
147#define GPIOE_PIN15 15U
148
149#define GPIOF_OSC_IN 0U
150#define GPIOF_OSC_OUT 1U
151#define GPIOF_PIN2 2U
152#define GPIOF_PIN3 3U
153#define GPIOF_PIN4 4U
154#define GPIOF_PIN5 5U
155#define GPIOF_PIN6 6U
156#define GPIOF_PIN7 7U
157#define GPIOF_PIN8 8U
158#define GPIOF_PIN9 9U
159#define GPIOF_PIN10 10U
160#define GPIOF_PIN11 11U
161#define GPIOF_PIN12 12U
162#define GPIOF_PIN13 13U
163#define GPIOF_PIN14 14U
164#define GPIOF_PIN15 15U
165
166/*
167 * IO lines assignments.
168 */
169#define LINE_BUTTON PAL_LINE(GPIOA, 0U)
170#define LINE_USB_DM PAL_LINE(GPIOA, 11U)
171#define LINE_USB_DP PAL_LINE(GPIOA, 12U)
172#define LINE_SWDIO PAL_LINE(GPIOA, 13U)
173#define LINE_SWCLK PAL_LINE(GPIOA, 14U)
174#define LINE_SPI2_SCK PAL_LINE(GPIOB, 13U)
175#define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U)
176#define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U)
177#define LINE_MEMS_CS PAL_LINE(GPIOC, 0U)
178#define LINE_LED_RED PAL_LINE(GPIOC, 6U)
179#define LINE_LED_BLUE PAL_LINE(GPIOC, 7U)
180#define LINE_LED_ORANGE PAL_LINE(GPIOC, 8U)
181#define LINE_LED_GREEN PAL_LINE(GPIOC, 9U)
182#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U)
183#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U)
184#define LINE_OSC_IN PAL_LINE(GPIOF, 0U)
185#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U)
186
187/*===========================================================================*/
188/* Driver pre-compile time settings. */
189/*===========================================================================*/
190
191/*===========================================================================*/
192/* Derived constants and error checks. */
193/*===========================================================================*/
194
195/*===========================================================================*/
196/* Driver data structures and types. */
197/*===========================================================================*/
198
199/*===========================================================================*/
200/* Driver macros. */
201/*===========================================================================*/
202
203/*
204 * I/O ports initial setup, this configuration is established soon after reset
205 * in the initialization code.
206 * Please refer to the STM32 Reference Manual for details.
207 */
208#define PIN_MODE_INPUT(n) (0U << ((n)*2U))
209#define PIN_MODE_OUTPUT(n) (1U << ((n)*2U))
210#define PIN_MODE_ALTERNATE(n) (2U << ((n)*2U))
211#define PIN_MODE_ANALOG(n) (3U << ((n)*2U))
212#define PIN_ODR_LOW(n) (0U << (n))
213#define PIN_ODR_HIGH(n) (1U << (n))
214#define PIN_OTYPE_PUSHPULL(n) (0U << (n))
215#define PIN_OTYPE_OPENDRAIN(n) (1U << (n))
216#define PIN_OSPEED_VERYLOW(n) (0U << ((n)*2U))
217#define PIN_OSPEED_LOW(n) (1U << ((n)*2U))
218#define PIN_OSPEED_MEDIUM(n) (2U << ((n)*2U))
219#define PIN_OSPEED_HIGH(n) (3U << ((n)*2U))
220#define PIN_PUPDR_FLOATING(n) (0U << ((n)*2U))
221#define PIN_PUPDR_PULLUP(n) (1U << ((n)*2U))
222#define PIN_PUPDR_PULLDOWN(n) (2U << ((n)*2U))
223#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U))
224
225/*
226 * GPIOA setup:
227 *
228 * PA0 - BUTTON (input floating).
229 * PA1 - PIN1 (input pullup).
230 * PA2 - PIN2 (input pullup).
231 * PA3 - PIN3 (input pullup).
232 * PA4 - PIN4 (input pullup).
233 * PA5 - PIN5 (input pullup).
234 * PA6 - PIN6 (input pullup).
235 * PA7 - PIN7 (input pullup).
236 * PA8 - PIN8 (input pullup).
237 * PA9 - PIN9 (input pullup).
238 * PA10 - PIN10 (input pullup).
239 * PA11 - USB_DM (input floating).
240 * PA12 - USB_DP (input floating).
241 * PA13 - SWDIO (alternate 0).
242 * PA14 - SWCLK (alternate 0).
243 * PA15 - PIN15 (input pullup).
244 */
245#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | PIN_MODE_INPUT(GPIOA_PIN1) | PIN_MODE_INPUT(GPIOA_PIN2) | PIN_MODE_INPUT(GPIOA_PIN3) | PIN_MODE_INPUT(GPIOA_PIN4) | PIN_MODE_INPUT(GPIOA_PIN5) | PIN_MODE_INPUT(GPIOA_PIN6) | PIN_MODE_INPUT(GPIOA_PIN7) | PIN_MODE_INPUT(GPIOA_PIN8) | PIN_MODE_INPUT(GPIOA_PIN9) | PIN_MODE_INPUT(GPIOA_PIN10) | PIN_MODE_INPUT(GPIOA_USB_DM) | PIN_MODE_INPUT(GPIOA_USB_DP) | PIN_MODE_ALTERNATE(GPIOA_SWDIO) | PIN_MODE_ALTERNATE(GPIOA_SWCLK) | PIN_MODE_INPUT(GPIOA_PIN15))
246#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | PIN_OTYPE_PUSHPULL(GPIOA_PIN15))
247#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_BUTTON) | PIN_OSPEED_VERYLOW(GPIOA_PIN1) | PIN_OSPEED_VERYLOW(GPIOA_PIN2) | PIN_OSPEED_VERYLOW(GPIOA_PIN3) | PIN_OSPEED_VERYLOW(GPIOA_PIN4) | PIN_OSPEED_VERYLOW(GPIOA_PIN5) | PIN_OSPEED_VERYLOW(GPIOA_PIN6) | PIN_OSPEED_VERYLOW(GPIOA_PIN7) | PIN_OSPEED_VERYLOW(GPIOA_PIN8) | PIN_OSPEED_VERYLOW(GPIOA_PIN9) | PIN_OSPEED_VERYLOW(GPIOA_PIN10) | PIN_OSPEED_VERYLOW(GPIOA_USB_DM) | PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | PIN_OSPEED_HIGH(GPIOA_SWDIO) | PIN_OSPEED_HIGH(GPIOA_SWCLK) | PIN_OSPEED_HIGH(GPIOA_PIN15))
248#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | PIN_PUPDR_PULLUP(GPIOA_PIN1) | PIN_PUPDR_PULLUP(GPIOA_PIN2) | PIN_PUPDR_PULLUP(GPIOA_PIN3) | PIN_PUPDR_PULLUP(GPIOA_PIN4) | PIN_PUPDR_PULLUP(GPIOA_PIN5) | PIN_PUPDR_PULLUP(GPIOA_PIN6) | PIN_PUPDR_PULLUP(GPIOA_PIN7) | PIN_PUPDR_PULLUP(GPIOA_PIN8) | PIN_PUPDR_PULLUP(GPIOA_PIN9) | PIN_PUPDR_PULLUP(GPIOA_PIN10) | PIN_PUPDR_FLOATING(GPIOA_USB_DM) | PIN_PUPDR_FLOATING(GPIOA_USB_DP) | PIN_PUPDR_PULLUP(GPIOA_SWDIO) | PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | PIN_PUPDR_PULLUP(GPIOA_PIN15))
249#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | PIN_ODR_HIGH(GPIOA_PIN1) | PIN_ODR_HIGH(GPIOA_PIN2) | PIN_ODR_HIGH(GPIOA_PIN3) | PIN_ODR_HIGH(GPIOA_PIN4) | PIN_ODR_HIGH(GPIOA_PIN5) | PIN_ODR_HIGH(GPIOA_PIN6) | PIN_ODR_HIGH(GPIOA_PIN7) | PIN_ODR_HIGH(GPIOA_PIN8) | PIN_ODR_HIGH(GPIOA_PIN9) | PIN_ODR_HIGH(GPIOA_PIN10) | PIN_ODR_HIGH(GPIOA_USB_DM) | PIN_ODR_HIGH(GPIOA_USB_DP) | PIN_ODR_HIGH(GPIOA_SWDIO) | PIN_ODR_HIGH(GPIOA_SWCLK) | PIN_ODR_HIGH(GPIOA_PIN15))
250#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | PIN_AFIO_AF(GPIOA_PIN1, 0U) | PIN_AFIO_AF(GPIOA_PIN2, 0U) | PIN_AFIO_AF(GPIOA_PIN3, 0U) | PIN_AFIO_AF(GPIOA_PIN4, 0U) | PIN_AFIO_AF(GPIOA_PIN5, 0U) | PIN_AFIO_AF(GPIOA_PIN6, 0U) | PIN_AFIO_AF(GPIOA_PIN7, 0U))
251#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | PIN_AFIO_AF(GPIOA_PIN9, 0U) | PIN_AFIO_AF(GPIOA_PIN10, 0U) | PIN_AFIO_AF(GPIOA_USB_DM, 0U) | PIN_AFIO_AF(GPIOA_USB_DP, 0U) | PIN_AFIO_AF(GPIOA_SWDIO, 0U) | PIN_AFIO_AF(GPIOA_SWCLK, 0U) | PIN_AFIO_AF(GPIOA_PIN15, 0U))
252
253/*
254 * GPIOB setup:
255 *
256 * PB0 - PIN0 (input pullup).
257 * PB1 - PIN1 (input pullup).
258 * PB2 - PIN2 (input pullup).
259 * PB3 - PIN3 (input pullup).
260 * PB4 - PIN4 (input pullup).
261 * PB5 - PIN5 (input pullup).
262 * PB6 - PIN6 (input pullup).
263 * PB7 - PIN7 (input pullup).
264 * PB8 - PIN8 (input pullup).
265 * PB9 - PIN9 (input pullup).
266 * PB10 - PIN10 (input pullup).
267 * PB11 - PIN11 (input pullup).
268 * PB12 - PIN12 (input pullup).
269 * PB13 - SPI2_SCK (alternate 0).
270 * PB14 - SPI2_MISO (alternate 0).
271 * PB15 - SPI2_MOSI (alternate 0).
272 */
273#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | PIN_MODE_INPUT(GPIOB_PIN1) | PIN_MODE_INPUT(GPIOB_PIN2) | PIN_MODE_INPUT(GPIOB_PIN3) | PIN_MODE_INPUT(GPIOB_PIN4) | PIN_MODE_INPUT(GPIOB_PIN5) | PIN_MODE_INPUT(GPIOB_PIN6) | PIN_MODE_INPUT(GPIOB_PIN7) | PIN_MODE_INPUT(GPIOB_PIN8) | PIN_MODE_INPUT(GPIOB_PIN9) | PIN_MODE_INPUT(GPIOB_PIN10) | PIN_MODE_INPUT(GPIOB_PIN11) | PIN_MODE_INPUT(GPIOB_PIN12) | PIN_MODE_ALTERNATE(GPIOB_SPI2_SCK) | PIN_MODE_ALTERNATE(GPIOB_SPI2_MISO) | PIN_MODE_ALTERNATE(GPIOB_SPI2_MOSI))
274#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | PIN_OTYPE_PUSHPULL(GPIOB_SPI2_SCK) | PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MISO) | PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MOSI))
275#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | PIN_OSPEED_VERYLOW(GPIOB_PIN1) | PIN_OSPEED_HIGH(GPIOB_PIN2) | PIN_OSPEED_HIGH(GPIOB_PIN3) | PIN_OSPEED_HIGH(GPIOB_PIN4) | PIN_OSPEED_VERYLOW(GPIOB_PIN5) | PIN_OSPEED_VERYLOW(GPIOB_PIN6) | PIN_OSPEED_VERYLOW(GPIOB_PIN7) | PIN_OSPEED_VERYLOW(GPIOB_PIN8) | PIN_OSPEED_VERYLOW(GPIOB_PIN9) | PIN_OSPEED_VERYLOW(GPIOB_PIN10) | PIN_OSPEED_VERYLOW(GPIOB_PIN11) | PIN_OSPEED_VERYLOW(GPIOB_PIN12) | PIN_OSPEED_VERYLOW(GPIOB_SPI2_SCK) | PIN_OSPEED_VERYLOW(GPIOB_SPI2_MISO) | PIN_OSPEED_VERYLOW(GPIOB_SPI2_MOSI))
276#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | PIN_PUPDR_PULLUP(GPIOB_PIN1) | PIN_PUPDR_PULLUP(GPIOB_PIN2) | PIN_PUPDR_PULLUP(GPIOB_PIN3) | PIN_PUPDR_PULLUP(GPIOB_PIN4) | PIN_PUPDR_PULLUP(GPIOB_PIN5) | PIN_PUPDR_PULLUP(GPIOB_PIN6) | PIN_PUPDR_PULLUP(GPIOB_PIN7) | PIN_PUPDR_PULLUP(GPIOB_PIN8) | PIN_PUPDR_PULLUP(GPIOB_PIN9) | PIN_PUPDR_PULLUP(GPIOB_PIN10) | PIN_PUPDR_PULLUP(GPIOB_PIN11) | PIN_PUPDR_PULLUP(GPIOB_PIN12) | PIN_PUPDR_FLOATING(GPIOB_SPI2_SCK) | PIN_PUPDR_FLOATING(GPIOB_SPI2_MISO) | PIN_PUPDR_FLOATING(GPIOB_SPI2_MOSI))
277#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | PIN_ODR_HIGH(GPIOB_PIN1) | PIN_ODR_HIGH(GPIOB_PIN2) | PIN_ODR_HIGH(GPIOB_PIN3) | PIN_ODR_HIGH(GPIOB_PIN4) | PIN_ODR_HIGH(GPIOB_PIN5) | PIN_ODR_HIGH(GPIOB_PIN6) | PIN_ODR_HIGH(GPIOB_PIN7) | PIN_ODR_HIGH(GPIOB_PIN8) | PIN_ODR_HIGH(GPIOB_PIN9) | PIN_ODR_HIGH(GPIOB_PIN10) | PIN_ODR_HIGH(GPIOB_PIN11) | PIN_ODR_HIGH(GPIOB_PIN12) | PIN_ODR_HIGH(GPIOB_SPI2_SCK) | PIN_ODR_HIGH(GPIOB_SPI2_MISO) | PIN_ODR_HIGH(GPIOB_SPI2_MOSI))
278#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | PIN_AFIO_AF(GPIOB_PIN1, 0U) | PIN_AFIO_AF(GPIOB_PIN2, 0U) | PIN_AFIO_AF(GPIOB_PIN3, 0U) | PIN_AFIO_AF(GPIOB_PIN4, 0U) | PIN_AFIO_AF(GPIOB_PIN5, 0U) | PIN_AFIO_AF(GPIOB_PIN6, 0U) | PIN_AFIO_AF(GPIOB_PIN7, 0U))
279#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | PIN_AFIO_AF(GPIOB_PIN9, 0U) | PIN_AFIO_AF(GPIOB_PIN10, 0U) | PIN_AFIO_AF(GPIOB_PIN11, 0U) | PIN_AFIO_AF(GPIOB_PIN12, 0U) | PIN_AFIO_AF(GPIOB_SPI2_SCK, 0U) | PIN_AFIO_AF(GPIOB_SPI2_MISO, 0U) | PIN_AFIO_AF(GPIOB_SPI2_MOSI, 0U))
280
281/*
282 * GPIOC setup:
283 *
284 * PC0 - MEMS_CS (output pushpull maximum).
285 * PC1 - PIN1 (input pullup).
286 * PC2 - PIN2 (input pullup).
287 * PC3 - PIN3 (input pullup).
288 * PC4 - PIN4 (input pullup).
289 * PC5 - PIN5 (input pullup).
290 * PC6 - LED_RED (output pushpull maximum).
291 * PC7 - LED_BLUE (output pushpull maximum).
292 * PC8 - LED_ORANGE (output pushpull maximum).
293 * PC9 - LED_GREEN (output pushpull maximum).
294 * PC10 - PIN10 (input pullup).
295 * PC11 - PIN11 (input pullup).
296 * PC12 - PIN12 (input pullup).
297 * PC13 - PIN13 (input pullup).
298 * PC14 - OSC32_IN (input floating).
299 * PC15 - OSC32_OUT (input floating).
300 */
301#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_MEMS_CS) | PIN_MODE_INPUT(GPIOC_PIN1) | PIN_MODE_INPUT(GPIOC_PIN2) | PIN_MODE_INPUT(GPIOC_PIN3) | PIN_MODE_INPUT(GPIOC_PIN4) | PIN_MODE_INPUT(GPIOC_PIN5) | PIN_MODE_OUTPUT(GPIOC_LED_RED) | PIN_MODE_OUTPUT(GPIOC_LED_BLUE) | PIN_MODE_OUTPUT(GPIOC_LED_ORANGE) | PIN_MODE_OUTPUT(GPIOC_LED_GREEN) | PIN_MODE_INPUT(GPIOC_PIN10) | PIN_MODE_INPUT(GPIOC_PIN11) | PIN_MODE_INPUT(GPIOC_PIN12) | PIN_MODE_INPUT(GPIOC_PIN13) | PIN_MODE_INPUT(GPIOC_OSC32_IN) | PIN_MODE_INPUT(GPIOC_OSC32_OUT))
302#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_MEMS_CS) | PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | PIN_OTYPE_PUSHPULL(GPIOC_LED_RED) | PIN_OTYPE_PUSHPULL(GPIOC_LED_BLUE) | PIN_OTYPE_PUSHPULL(GPIOC_LED_ORANGE) | PIN_OTYPE_PUSHPULL(GPIOC_LED_GREEN) | PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT))
303#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_MEMS_CS) | PIN_OSPEED_VERYLOW(GPIOC_PIN1) | PIN_OSPEED_VERYLOW(GPIOC_PIN2) | PIN_OSPEED_VERYLOW(GPIOC_PIN3) | PIN_OSPEED_VERYLOW(GPIOC_PIN4) | PIN_OSPEED_VERYLOW(GPIOC_PIN5) | PIN_OSPEED_HIGH(GPIOC_LED_RED) | PIN_OSPEED_HIGH(GPIOC_LED_BLUE) | PIN_OSPEED_HIGH(GPIOC_LED_ORANGE) | PIN_OSPEED_HIGH(GPIOC_LED_GREEN) | PIN_OSPEED_VERYLOW(GPIOC_PIN10) | PIN_OSPEED_VERYLOW(GPIOC_PIN11) | PIN_OSPEED_VERYLOW(GPIOC_PIN12) | PIN_OSPEED_VERYLOW(GPIOC_PIN13) | PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | PIN_OSPEED_HIGH(GPIOC_OSC32_OUT))
304#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_MEMS_CS) | PIN_PUPDR_PULLUP(GPIOC_PIN1) | PIN_PUPDR_PULLUP(GPIOC_PIN2) | PIN_PUPDR_PULLUP(GPIOC_PIN3) | PIN_PUPDR_PULLUP(GPIOC_PIN4) | PIN_PUPDR_PULLUP(GPIOC_PIN5) | PIN_PUPDR_FLOATING(GPIOC_LED_RED) | PIN_PUPDR_FLOATING(GPIOC_LED_BLUE) | PIN_PUPDR_FLOATING(GPIOC_LED_ORANGE) | PIN_PUPDR_FLOATING(GPIOC_LED_GREEN) | PIN_PUPDR_PULLUP(GPIOC_PIN10) | PIN_PUPDR_PULLUP(GPIOC_PIN11) | PIN_PUPDR_PULLUP(GPIOC_PIN12) | PIN_PUPDR_PULLUP(GPIOC_PIN13) | PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT))
305#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_MEMS_CS) | PIN_ODR_HIGH(GPIOC_PIN1) | PIN_ODR_HIGH(GPIOC_PIN2) | PIN_ODR_HIGH(GPIOC_PIN3) | PIN_ODR_HIGH(GPIOC_PIN4) | PIN_ODR_HIGH(GPIOC_PIN5) | PIN_ODR_LOW(GPIOC_LED_RED) | PIN_ODR_LOW(GPIOC_LED_BLUE) | PIN_ODR_LOW(GPIOC_LED_ORANGE) | PIN_ODR_LOW(GPIOC_LED_GREEN) | PIN_ODR_HIGH(GPIOC_PIN10) | PIN_ODR_HIGH(GPIOC_PIN11) | PIN_ODR_HIGH(GPIOC_PIN12) | PIN_ODR_HIGH(GPIOC_PIN13) | PIN_ODR_HIGH(GPIOC_OSC32_IN) | PIN_ODR_HIGH(GPIOC_OSC32_OUT))
306#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_MEMS_CS, 0U) | PIN_AFIO_AF(GPIOC_PIN1, 0U) | PIN_AFIO_AF(GPIOC_PIN2, 0U) | PIN_AFIO_AF(GPIOC_PIN3, 0U) | PIN_AFIO_AF(GPIOC_PIN4, 0U) | PIN_AFIO_AF(GPIOC_PIN5, 0U) | PIN_AFIO_AF(GPIOC_LED_RED, 0U) | PIN_AFIO_AF(GPIOC_LED_BLUE, 0U))
307#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_LED_ORANGE, 0U) | PIN_AFIO_AF(GPIOC_LED_GREEN, 0U) | PIN_AFIO_AF(GPIOC_PIN10, 0U) | PIN_AFIO_AF(GPIOC_PIN11, 0U) | PIN_AFIO_AF(GPIOC_PIN12, 0U) | PIN_AFIO_AF(GPIOC_PIN13, 0U) | PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U))
308
309/*
310 * GPIOD setup:
311 *
312 * PD0 - PIN0 (input pullup).
313 * PD1 - PIN1 (input pullup).
314 * PD2 - PIN2 (input pullup).
315 * PD3 - PIN3 (input pullup).
316 * PD4 - PIN4 (input pullup).
317 * PD5 - PIN5 (input pullup).
318 * PD6 - PIN6 (input pullup).
319 * PD7 - PIN7 (input pullup).
320 * PD8 - PIN8 (input pullup).
321 * PD9 - PIN9 (input pullup).
322 * PD10 - PIN10 (input pullup).
323 * PD11 - PIN11 (input pullup).
324 * PD12 - PIN12 (input pullup).
325 * PD13 - PIN13 (input pullup).
326 * PD14 - PIN14 (input pullup).
327 * PD15 - PIN15 (input pullup).
328 */
329#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | PIN_MODE_INPUT(GPIOD_PIN1) | PIN_MODE_INPUT(GPIOD_PIN2) | PIN_MODE_INPUT(GPIOD_PIN3) | PIN_MODE_INPUT(GPIOD_PIN4) | PIN_MODE_INPUT(GPIOD_PIN5) | PIN_MODE_INPUT(GPIOD_PIN6) | PIN_MODE_INPUT(GPIOD_PIN7) | PIN_MODE_INPUT(GPIOD_PIN8) | PIN_MODE_INPUT(GPIOD_PIN9) | PIN_MODE_INPUT(GPIOD_PIN10) | PIN_MODE_INPUT(GPIOD_PIN11) | PIN_MODE_INPUT(GPIOD_PIN12) | PIN_MODE_INPUT(GPIOD_PIN13) | PIN_MODE_INPUT(GPIOD_PIN14) | PIN_MODE_INPUT(GPIOD_PIN15))
330#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | PIN_OTYPE_PUSHPULL(GPIOD_PIN15))
331#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | PIN_OSPEED_VERYLOW(GPIOD_PIN1) | PIN_OSPEED_VERYLOW(GPIOD_PIN2) | PIN_OSPEED_VERYLOW(GPIOD_PIN3) | PIN_OSPEED_VERYLOW(GPIOD_PIN4) | PIN_OSPEED_VERYLOW(GPIOD_PIN5) | PIN_OSPEED_VERYLOW(GPIOD_PIN6) | PIN_OSPEED_VERYLOW(GPIOD_PIN7) | PIN_OSPEED_VERYLOW(GPIOD_PIN8) | PIN_OSPEED_VERYLOW(GPIOD_PIN9) | PIN_OSPEED_VERYLOW(GPIOD_PIN10) | PIN_OSPEED_VERYLOW(GPIOD_PIN11) | PIN_OSPEED_VERYLOW(GPIOD_PIN12) | PIN_OSPEED_VERYLOW(GPIOD_PIN13) | PIN_OSPEED_VERYLOW(GPIOD_PIN14) | PIN_OSPEED_VERYLOW(GPIOD_PIN15))
332#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | PIN_PUPDR_PULLUP(GPIOD_PIN1) | PIN_PUPDR_PULLUP(GPIOD_PIN2) | PIN_PUPDR_PULLUP(GPIOD_PIN3) | PIN_PUPDR_PULLUP(GPIOD_PIN4) | PIN_PUPDR_PULLUP(GPIOD_PIN5) | PIN_PUPDR_PULLUP(GPIOD_PIN6) | PIN_PUPDR_PULLUP(GPIOD_PIN7) | PIN_PUPDR_PULLUP(GPIOD_PIN8) | PIN_PUPDR_PULLUP(GPIOD_PIN9) | PIN_PUPDR_PULLUP(GPIOD_PIN10) | PIN_PUPDR_PULLUP(GPIOD_PIN11) | PIN_PUPDR_PULLUP(GPIOD_PIN12) | PIN_PUPDR_PULLUP(GPIOD_PIN13) | PIN_PUPDR_PULLUP(GPIOD_PIN14) | PIN_PUPDR_PULLUP(GPIOD_PIN15))
333#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | PIN_ODR_HIGH(GPIOD_PIN1) | PIN_ODR_HIGH(GPIOD_PIN2) | PIN_ODR_HIGH(GPIOD_PIN3) | PIN_ODR_HIGH(GPIOD_PIN4) | PIN_ODR_HIGH(GPIOD_PIN5) | PIN_ODR_HIGH(GPIOD_PIN6) | PIN_ODR_HIGH(GPIOD_PIN7) | PIN_ODR_HIGH(GPIOD_PIN8) | PIN_ODR_HIGH(GPIOD_PIN9) | PIN_ODR_HIGH(GPIOD_PIN10) | PIN_ODR_HIGH(GPIOD_PIN11) | PIN_ODR_HIGH(GPIOD_PIN12) | PIN_ODR_HIGH(GPIOD_PIN13) | PIN_ODR_HIGH(GPIOD_PIN14) | PIN_ODR_HIGH(GPIOD_PIN15))
334#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | PIN_AFIO_AF(GPIOD_PIN1, 0U) | PIN_AFIO_AF(GPIOD_PIN2, 0U) | PIN_AFIO_AF(GPIOD_PIN3, 0U) | PIN_AFIO_AF(GPIOD_PIN4, 0U) | PIN_AFIO_AF(GPIOD_PIN5, 0U) | PIN_AFIO_AF(GPIOD_PIN6, 0U) | PIN_AFIO_AF(GPIOD_PIN7, 0U))
335#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | PIN_AFIO_AF(GPIOD_PIN9, 0U) | PIN_AFIO_AF(GPIOD_PIN10, 0U) | PIN_AFIO_AF(GPIOD_PIN11, 0U) | PIN_AFIO_AF(GPIOD_PIN12, 0U) | PIN_AFIO_AF(GPIOD_PIN13, 0U) | PIN_AFIO_AF(GPIOD_PIN14, 0U) | PIN_AFIO_AF(GPIOD_PIN15, 0U))
336
337/*
338 * GPIOE setup:
339 *
340 * PE0 - PIN0 (input pullup).
341 * PE1 - PIN1 (input pullup).
342 * PE2 - PIN2 (input pullup).
343 * PE3 - PIN3 (input pullup).
344 * PE4 - PIN4 (input pullup).
345 * PE5 - PIN5 (input pullup).
346 * PE6 - PIN6 (input pullup).
347 * PE7 - PIN7 (input pullup).
348 * PE8 - PIN8 (input pullup).
349 * PE9 - PIN9 (input pullup).
350 * PE10 - PIN10 (input pullup).
351 * PE11 - PIN11 (input pullup).
352 * PE12 - PIN12 (input pullup).
353 * PE13 - PIN13 (input pullup).
354 * PE14 - PIN14 (input pullup).
355 * PE15 - PIN15 (input pullup).
356 */
357#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | PIN_MODE_INPUT(GPIOE_PIN1) | PIN_MODE_INPUT(GPIOE_PIN2) | PIN_MODE_INPUT(GPIOE_PIN3) | PIN_MODE_INPUT(GPIOE_PIN4) | PIN_MODE_INPUT(GPIOE_PIN5) | PIN_MODE_INPUT(GPIOE_PIN6) | PIN_MODE_INPUT(GPIOE_PIN7) | PIN_MODE_INPUT(GPIOE_PIN8) | PIN_MODE_INPUT(GPIOE_PIN9) | PIN_MODE_INPUT(GPIOE_PIN10) | PIN_MODE_INPUT(GPIOE_PIN11) | PIN_MODE_INPUT(GPIOE_PIN12) | PIN_MODE_INPUT(GPIOE_PIN13) | PIN_MODE_INPUT(GPIOE_PIN14) | PIN_MODE_INPUT(GPIOE_PIN15))
358#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | PIN_OTYPE_PUSHPULL(GPIOE_PIN15))
359#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | PIN_OSPEED_VERYLOW(GPIOE_PIN1) | PIN_OSPEED_VERYLOW(GPIOE_PIN2) | PIN_OSPEED_VERYLOW(GPIOE_PIN3) | PIN_OSPEED_VERYLOW(GPIOE_PIN4) | PIN_OSPEED_VERYLOW(GPIOE_PIN5) | PIN_OSPEED_VERYLOW(GPIOE_PIN6) | PIN_OSPEED_VERYLOW(GPIOE_PIN7) | PIN_OSPEED_VERYLOW(GPIOE_PIN8) | PIN_OSPEED_VERYLOW(GPIOE_PIN9) | PIN_OSPEED_VERYLOW(GPIOE_PIN10) | PIN_OSPEED_VERYLOW(GPIOE_PIN11) | PIN_OSPEED_VERYLOW(GPIOE_PIN12) | PIN_OSPEED_VERYLOW(GPIOE_PIN13) | PIN_OSPEED_VERYLOW(GPIOE_PIN14) | PIN_OSPEED_VERYLOW(GPIOE_PIN15))
360#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | PIN_PUPDR_PULLUP(GPIOE_PIN1) | PIN_PUPDR_PULLUP(GPIOE_PIN2) | PIN_PUPDR_PULLUP(GPIOE_PIN3) | PIN_PUPDR_PULLUP(GPIOE_PIN4) | PIN_PUPDR_PULLUP(GPIOE_PIN5) | PIN_PUPDR_PULLUP(GPIOE_PIN6) | PIN_PUPDR_PULLUP(GPIOE_PIN7) | PIN_PUPDR_PULLUP(GPIOE_PIN8) | PIN_PUPDR_PULLUP(GPIOE_PIN9) | PIN_PUPDR_PULLUP(GPIOE_PIN10) | PIN_PUPDR_PULLUP(GPIOE_PIN11) | PIN_PUPDR_PULLUP(GPIOE_PIN12) | PIN_PUPDR_PULLUP(GPIOE_PIN13) | PIN_PUPDR_PULLUP(GPIOE_PIN14) | PIN_PUPDR_PULLUP(GPIOE_PIN15))
361#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | PIN_ODR_HIGH(GPIOE_PIN1) | PIN_ODR_HIGH(GPIOE_PIN2) | PIN_ODR_HIGH(GPIOE_PIN3) | PIN_ODR_HIGH(GPIOE_PIN4) | PIN_ODR_HIGH(GPIOE_PIN5) | PIN_ODR_HIGH(GPIOE_PIN6) | PIN_ODR_HIGH(GPIOE_PIN7) | PIN_ODR_HIGH(GPIOE_PIN8) | PIN_ODR_HIGH(GPIOE_PIN9) | PIN_ODR_HIGH(GPIOE_PIN10) | PIN_ODR_HIGH(GPIOE_PIN11) | PIN_ODR_HIGH(GPIOE_PIN12) | PIN_ODR_HIGH(GPIOE_PIN13) | PIN_ODR_HIGH(GPIOE_PIN14) | PIN_ODR_HIGH(GPIOE_PIN15))
362#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | PIN_AFIO_AF(GPIOE_PIN1, 0U) | PIN_AFIO_AF(GPIOE_PIN2, 0U) | PIN_AFIO_AF(GPIOE_PIN3, 0U) | PIN_AFIO_AF(GPIOE_PIN4, 0U) | PIN_AFIO_AF(GPIOE_PIN5, 0U) | PIN_AFIO_AF(GPIOE_PIN6, 0U) | PIN_AFIO_AF(GPIOE_PIN7, 0U))
363#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | PIN_AFIO_AF(GPIOE_PIN9, 0U) | PIN_AFIO_AF(GPIOE_PIN10, 0U) | PIN_AFIO_AF(GPIOE_PIN11, 0U) | PIN_AFIO_AF(GPIOE_PIN12, 0U) | PIN_AFIO_AF(GPIOE_PIN13, 0U) | PIN_AFIO_AF(GPIOE_PIN14, 0U) | PIN_AFIO_AF(GPIOE_PIN15, 0U))
364
365/*
366 * GPIOF setup:
367 *
368 * PF0 - OSC_IN (input floating).
369 * PF1 - OSC_OUT (input floating).
370 * PF2 - PIN2 (input pullup).
371 * PF3 - PIN3 (input pullup).
372 * PF4 - PIN4 (input pullup).
373 * PF5 - PIN5 (input pullup).
374 * PF6 - PIN6 (input pullup).
375 * PF7 - PIN7 (input pullup).
376 * PF8 - PIN8 (input pullup).
377 * PF9 - PIN9 (input pullup).
378 * PF10 - PIN10 (input pullup).
379 * PF11 - PIN11 (input pullup).
380 * PF12 - PIN12 (input pullup).
381 * PF13 - PIN13 (input pullup).
382 * PF14 - PIN14 (input pullup).
383 * PF15 - PIN15 (input pullup).
384 */
385#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_OSC_IN) | PIN_MODE_INPUT(GPIOF_OSC_OUT) | PIN_MODE_INPUT(GPIOF_PIN2) | PIN_MODE_INPUT(GPIOF_PIN3) | PIN_MODE_INPUT(GPIOF_PIN4) | PIN_MODE_INPUT(GPIOF_PIN5) | PIN_MODE_INPUT(GPIOF_PIN6) | PIN_MODE_INPUT(GPIOF_PIN7) | PIN_MODE_INPUT(GPIOF_PIN8) | PIN_MODE_INPUT(GPIOF_PIN9) | PIN_MODE_INPUT(GPIOF_PIN10) | PIN_MODE_INPUT(GPIOF_PIN11) | PIN_MODE_INPUT(GPIOF_PIN12) | PIN_MODE_INPUT(GPIOF_PIN13) | PIN_MODE_INPUT(GPIOF_PIN14) | PIN_MODE_INPUT(GPIOF_PIN15))
386#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_OSC_IN) | PIN_OTYPE_PUSHPULL(GPIOF_OSC_OUT) | PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | PIN_OTYPE_PUSHPULL(GPIOF_PIN15))
387#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_OSC_IN) | PIN_OSPEED_VERYLOW(GPIOF_OSC_OUT) | PIN_OSPEED_VERYLOW(GPIOF_PIN2) | PIN_OSPEED_VERYLOW(GPIOF_PIN3) | PIN_OSPEED_VERYLOW(GPIOF_PIN4) | PIN_OSPEED_VERYLOW(GPIOF_PIN5) | PIN_OSPEED_VERYLOW(GPIOF_PIN6) | PIN_OSPEED_VERYLOW(GPIOF_PIN7) | PIN_OSPEED_VERYLOW(GPIOF_PIN8) | PIN_OSPEED_VERYLOW(GPIOF_PIN9) | PIN_OSPEED_VERYLOW(GPIOF_PIN10) | PIN_OSPEED_VERYLOW(GPIOF_PIN11) | PIN_OSPEED_VERYLOW(GPIOF_PIN12) | PIN_OSPEED_VERYLOW(GPIOF_PIN13) | PIN_OSPEED_VERYLOW(GPIOF_PIN14) | PIN_OSPEED_VERYLOW(GPIOF_PIN15))
388#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_OSC_IN) | PIN_PUPDR_FLOATING(GPIOF_OSC_OUT) | PIN_PUPDR_PULLUP(GPIOF_PIN2) | PIN_PUPDR_PULLUP(GPIOF_PIN3) | PIN_PUPDR_PULLUP(GPIOF_PIN4) | PIN_PUPDR_PULLUP(GPIOF_PIN5) | PIN_PUPDR_PULLUP(GPIOF_PIN6) | PIN_PUPDR_PULLUP(GPIOF_PIN7) | PIN_PUPDR_PULLUP(GPIOF_PIN8) | PIN_PUPDR_PULLUP(GPIOF_PIN9) | PIN_PUPDR_PULLUP(GPIOF_PIN10) | PIN_PUPDR_PULLUP(GPIOF_PIN11) | PIN_PUPDR_PULLUP(GPIOF_PIN12) | PIN_PUPDR_PULLUP(GPIOF_PIN13) | PIN_PUPDR_PULLUP(GPIOF_PIN14) | PIN_PUPDR_PULLUP(GPIOF_PIN15))
389#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_OSC_IN) | PIN_ODR_HIGH(GPIOF_OSC_OUT) | PIN_ODR_HIGH(GPIOF_PIN2) | PIN_ODR_HIGH(GPIOF_PIN3) | PIN_ODR_HIGH(GPIOF_PIN4) | PIN_ODR_HIGH(GPIOF_PIN5) | PIN_ODR_HIGH(GPIOF_PIN6) | PIN_ODR_HIGH(GPIOF_PIN7) | PIN_ODR_HIGH(GPIOF_PIN8) | PIN_ODR_HIGH(GPIOF_PIN9) | PIN_ODR_HIGH(GPIOF_PIN10) | PIN_ODR_HIGH(GPIOF_PIN11) | PIN_ODR_HIGH(GPIOF_PIN12) | PIN_ODR_HIGH(GPIOF_PIN13) | PIN_ODR_HIGH(GPIOF_PIN14) | PIN_ODR_HIGH(GPIOF_PIN15))
390#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_OSC_IN, 0U) | PIN_AFIO_AF(GPIOF_OSC_OUT, 0U) | PIN_AFIO_AF(GPIOF_PIN2, 0U) | PIN_AFIO_AF(GPIOF_PIN3, 0U) | PIN_AFIO_AF(GPIOF_PIN4, 0U) | PIN_AFIO_AF(GPIOF_PIN5, 0U) | PIN_AFIO_AF(GPIOF_PIN6, 0U) | PIN_AFIO_AF(GPIOF_PIN7, 0U))
391#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | PIN_AFIO_AF(GPIOF_PIN9, 0U) | PIN_AFIO_AF(GPIOF_PIN10, 0U) | PIN_AFIO_AF(GPIOF_PIN11, 0U) | PIN_AFIO_AF(GPIOF_PIN12, 0U) | PIN_AFIO_AF(GPIOF_PIN13, 0U) | PIN_AFIO_AF(GPIOF_PIN14, 0U) | PIN_AFIO_AF(GPIOF_PIN15, 0U))
392
393/*===========================================================================*/
394/* External declarations. */
395/*===========================================================================*/
396
397#if !defined(_FROM_ASM_)
398# ifdef __cplusplus
399extern "C" {
400# endif
401void boardInit(void);
402# ifdef __cplusplus
403}
404# endif
405#endif /* _FROM_ASM_ */
406
407#endif /* BOARD_H */
diff --git a/drivers/boards/GENERIC_STM32_F072XB/board.mk b/drivers/boards/GENERIC_STM32_F072XB/board.mk
deleted file mode 100644
index bd6f87826..000000000
--- a/drivers/boards/GENERIC_STM32_F072XB/board.mk
+++ /dev/null
@@ -1,9 +0,0 @@
1# List of all the board related files.
2BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F072XB/board.c
3
4# Required include directories
5BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F072XB
6
7# Shared variables
8ALLCSRC += $(BOARDSRC)
9ALLINC += $(BOARDINC)
diff --git a/drivers/boards/GENERIC_STM32_F072XB/bootloader_defs.h b/drivers/boards/GENERIC_STM32_F072XB/bootloader_defs.h
deleted file mode 100644
index 02c48c4e6..000000000
--- a/drivers/boards/GENERIC_STM32_F072XB/bootloader_defs.h
+++ /dev/null
@@ -1,7 +0,0 @@
1/* Address for jumping to bootloader on STM32 chips. */
2/* It is chip dependent, the correct number can be looked up here (page 175):
3 * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
4 * This also requires a patch to chibios:
5 * <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch
6 */
7#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800
diff --git a/drivers/boards/GENERIC_STM32_F072XB/cfg/board.chcfg b/drivers/boards/GENERIC_STM32_F072XB/cfg/board.chcfg
deleted file mode 100644
index e6ceecb62..000000000
--- a/drivers/boards/GENERIC_STM32_F072XB/cfg/board.chcfg
+++ /dev/null
@@ -1,703 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!-- STM32F0xx board Template -->
3<board
4 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5 xsi:noNamespaceSchemaLocation="http://www.chibios.org/xml/schema/boards/stm32f0xx_board.xsd">
6 <configuration_settings>
7 <templates_path>resources/gencfg/processors/boards/stm32f0xx/templates</templates_path>
8 <output_path>..</output_path>
9 <hal_version>5.0.x</hal_version>
10 </configuration_settings>
11 <board_name>ST STM32F072B-Discovery</board_name>
12 <board_id>ST_STM32F072B_DISCOVERY</board_id>
13 <board_functions></board_functions>
14 <subtype>STM32F072xB</subtype>
15 <clocks HSEFrequency="0" HSEBypass="true" LSEFrequency="0"
16 LSEBypass="false" LSEDrive="3 High Drive (default)" />
17 <ports>
18 <GPIOA>
19 <pin0
20 ID="BUTTON"
21 Type="PushPull"
22 Speed="Minimum"
23 Resistor="Floating"
24 Level="High"
25 Mode="Input"
26 Alternate="0" />
27 <pin1
28 ID=""
29 Type="PushPull"
30 Speed="Minimum"
31 Resistor="PullUp"
32 Level="High"
33 Mode="Input"
34 Alternate="0" />
35 <pin2
36 ID=""
37 Type="PushPull"
38 Speed="Minimum"
39 Resistor="PullUp"
40 Level="High"
41 Mode="Input"
42 Alternate="0" />
43 <pin3
44 ID=""
45 Type="PushPull"
46 Speed="Minimum"
47 Resistor="PullUp"
48 Level="High"
49 Mode="Input"
50 Alternate="0" />
51 <pin4
52 ID=""
53 Type="PushPull"
54 Speed="Minimum"
55 Resistor="PullUp"
56 Level="High"
57 Mode="Input"
58 Alternate="0" />
59 <pin5
60 ID=""
61 Type="PushPull"
62 Speed="Minimum"
63 Resistor="PullUp"
64 Level="High"
65 Mode="Input"
66 Alternate="0" />
67 <pin6
68 ID=""
69 Type="PushPull"
70 Speed="Minimum"
71 Resistor="PullUp"
72 Level="High"
73 Mode="Input"
74 Alternate="0" />
75 <pin7
76 ID=""
77 Type="PushPull"
78 Speed="Minimum"
79 Resistor="PullUp"
80 Level="High"
81 Mode="Input"
82 Alternate="0" />
83 <pin8
84 ID=""
85 Type="PushPull"
86 Speed="Minimum"
87 Resistor="PullUp"
88 Level="High"
89 Mode="Input"
90 Alternate="0" />
91 <pin9
92 ID=""
93 Type="PushPull"
94 Speed="Minimum"
95 Resistor="PullUp"
96 Level="High"
97 Mode="Input"
98 Alternate="0" />
99 <pin10
100 ID=""
101 Type="PushPull"
102 Speed="Minimum"
103 Resistor="PullUp"
104 Level="High"
105 Mode="Input"
106 Alternate="0" />
107 <pin11
108 ID="USB_DM"
109 Type="PushPull"
110 Speed="Minimum"
111 Resistor="Floating"
112 Level="High"
113 Mode="Input"
114 Alternate="0" />
115 <pin12
116 ID="USB_DP"
117 Type="PushPull"
118 Speed="Minimum"
119 Resistor="Floating"
120 Level="High"
121 Mode="Input"
122 Alternate="0" />
123 <pin13
124 ID="SWDIO"
125 Type="PushPull"
126 Speed="Maximum"
127 Resistor="PullUp"
128 Level="High"
129 Mode="Alternate"
130 Alternate="0" />
131 <pin14
132 ID="SWCLK"
133 Type="PushPull"
134 Speed="Maximum"
135 Resistor="PullDown"
136 Level="High"
137 Mode="Alternate"
138 Alternate="0" />
139 <pin15
140 ID=""
141 Type="PushPull"
142 Speed="Maximum"
143 Resistor="PullUp"
144 Level="High"
145 Mode="Input"
146 Alternate="0" />
147 </GPIOA>
148 <GPIOB>
149 <pin0
150 ID=""
151 Type="PushPull"
152 Speed="Minimum"
153 Resistor="PullUp"
154 Level="High"
155 Mode="Input"
156 Alternate="0" />
157 <pin1
158 ID=""
159 Type="PushPull"
160 Speed="Minimum"
161 Resistor="PullUp"
162 Level="High"
163 Mode="Input"
164 Alternate="0" />
165 <pin2
166 ID=""
167 Type="PushPull"
168 Speed="Maximum"
169 Resistor="PullUp"
170 Level="High"
171 Mode="Input"
172 Alternate="0" />
173 <pin3
174 ID=""
175 Type="PushPull"
176 Speed="Maximum"
177 Resistor="PullUp"
178 Level="High"
179 Mode="Input"
180 Alternate="0" />
181 <pin4
182 ID=""
183 Type="PushPull"
184 Speed="Maximum"
185 Resistor="PullUp"
186 Level="High"
187 Mode="Input"
188 Alternate="0" />
189 <pin5
190 ID=""
191 Type="PushPull"
192 Speed="Minimum"
193 Resistor="PullUp"
194 Level="High"
195 Mode="Input"
196 Alternate="0" />
197 <pin6
198 ID=""
199 Type="PushPull"
200 Speed="Minimum"
201 Resistor="PullUp"
202 Level="High"
203 Mode="Input"
204 Alternate="0" />
205 <pin7
206 ID=""
207 Type="PushPull"
208 Speed="Minimum"
209 Resistor="PullUp"
210 Level="High"
211 Mode="Input"
212 Alternate="0" />
213 <pin8
214 ID=""
215 Type="PushPull"
216 Speed="Minimum"
217 Resistor="PullUp"
218 Level="High"
219 Mode="Input"
220 Alternate="0" />
221 <pin9
222 ID=""
223 Type="PushPull"
224 Speed="Minimum"
225 Resistor="PullUp"
226 Level="High"
227 Mode="Input"
228 Alternate="0" />
229 <pin10
230 ID=""
231 Type="PushPull"
232 Speed="Minimum"
233 Resistor="PullUp"
234 Level="High"
235 Mode="Input"
236 Alternate="0" />
237 <pin11
238 ID=""
239 Type="PushPull"
240 Speed="Minimum"
241 Resistor="PullUp"
242 Level="High"
243 Mode="Input"
244 Alternate="0" />
245 <pin12
246 ID=""
247 Type="PushPull"
248 Speed="Minimum"
249 Resistor="PullUp"
250 Level="High"
251 Mode="Input"
252 Alternate="0" />
253 <pin13
254 ID="SPI2_SCK"
255 Type="PushPull"
256 Speed="Minimum"
257 Resistor="Floating"
258 Level="High"
259 Mode="Alternate"
260 Alternate="0" />
261 <pin14
262 ID="SPI2_MISO"
263 Type="PushPull"
264 Speed="Minimum"
265 Resistor="Floating"
266 Level="High"
267 Mode="Alternate"
268 Alternate="0" />
269 <pin15
270 ID="SPI2_MOSI"
271 Type="PushPull"
272 Speed="Minimum"
273 Resistor="Floating"
274 Level="High"
275 Mode="Alternate"
276 Alternate="0" />
277 </GPIOB>
278 <GPIOC>
279 <pin0
280 ID="MEMS_CS"
281 Type="PushPull"
282 Speed="Maximum"
283 Resistor="Floating"
284 Level="High"
285 Mode="Output"
286 Alternate="0" />
287 <pin1
288 ID=""
289 Type="PushPull"
290 Speed="Minimum"
291 Resistor="PullUp"
292 Level="High"
293 Mode="Input"
294 Alternate="0" />
295 <pin2
296 ID=""
297 Type="PushPull"
298 Speed="Minimum"
299 Resistor="PullUp"
300 Level="High"
301 Mode="Input"
302 Alternate="0" />
303 <pin3
304 ID=""
305 Type="PushPull"
306 Speed="Minimum"
307 Resistor="PullUp"
308 Level="High"
309 Mode="Input"
310 Alternate="0" />
311 <pin4
312 ID=""
313 Type="PushPull"
314 Speed="Minimum"
315 Resistor="PullUp"
316 Level="High"
317 Mode="Input"
318 Alternate="0" />
319 <pin5
320 ID=""
321 Type="PushPull"
322 Speed="Minimum"
323 Resistor="PullUp"
324 Level="High"
325 Mode="Input"
326 Alternate="0" />
327 <pin6
328 ID="LED_RED"
329 Type="PushPull"
330 Speed="Maximum"
331 Resistor="Floating"
332 Level="Low"
333 Mode="Output"
334 Alternate="0" />
335 <pin7
336 ID="LED_BLUE"
337 Type="PushPull"
338 Speed="Maximum"
339 Resistor="Floating"
340 Level="Low"
341 Mode="Output"
342 Alternate="0" />
343 <pin8
344 ID="LED_ORANGE"
345 Type="PushPull"
346 Speed="Maximum"
347 Resistor="Floating"
348 Level="Low"
349 Mode="Output"
350 Alternate="0" ></pin8>
351 <pin9
352 ID="LED_GREEN"
353 Type="PushPull"
354 Speed="Maximum"
355 Resistor="Floating"
356 Level="Low"
357 Mode="Output"
358 Alternate="0" />
359 <pin10
360 ID=""
361 Type="PushPull"
362 Speed="Minimum"
363 Resistor="PullUp"
364 Level="High"
365 Mode="Input"
366 Alternate="0" />
367 <pin11
368 ID=""
369 Type="PushPull"
370 Speed="Minimum"
371 Resistor="PullUp"
372 Level="High"
373 Mode="Input"
374 Alternate="0" />
375 <pin12
376 ID=""
377 Type="PushPull"
378 Speed="Minimum"
379 Resistor="PullUp"
380 Level="High"
381 Mode="Input"
382 Alternate="0" />
383 <pin13
384 ID=""
385 Type="PushPull"
386 Speed="Minimum"
387 Resistor="PullUp"
388 Level="High"
389 Mode="Input"
390 Alternate="0" />
391 <pin14
392 ID="OSC32_IN"
393 Type="PushPull"
394 Speed="Maximum"
395 Resistor="Floating"
396 Level="High"
397 Mode="Input"
398 Alternate="0" />
399 <pin15
400 ID="OSC32_OUT"
401 Type="PushPull"
402 Speed="Maximum"
403 Resistor="Floating"
404 Level="High"
405 Mode="Input"
406 Alternate="0" />
407 </GPIOC>
408 <GPIOD>
409 <pin0
410 ID=""
411 Type="PushPull"
412 Speed="Minimum"
413 Resistor="PullUp"
414 Level="High"
415 Mode="Input"
416 Alternate="0" />
417 <pin1
418 ID=""
419 Type="PushPull"
420 Speed="Minimum"
421 Resistor="PullUp"
422 Level="High"
423 Mode="Input"
424 Alternate="0" />
425 <pin2
426 ID=""
427 Type="PushPull"
428 Speed="Minimum"
429 Resistor="PullUp"
430 Level="High"
431 Mode="Input"
432 Alternate="0" />
433 <pin3
434 ID=""
435 Type="PushPull"
436 Speed="Minimum"
437 Resistor="PullUp"
438 Level="High"
439 Mode="Input"
440 Alternate="0" />
441 <pin4
442 ID=""
443 Type="PushPull"
444 Speed="Minimum"
445 Resistor="PullUp"
446 Level="High"
447 Mode="Input"
448 Alternate="0" />
449 <pin5
450 ID=""
451 Type="PushPull"
452 Speed="Minimum"
453 Resistor="PullUp"
454 Level="High"
455 Mode="Input"
456 Alternate="0" />
457 <pin6
458 ID=""
459 Type="PushPull"
460 Speed="Minimum"
461 Resistor="PullUp"
462 Level="High"
463 Mode="Input"
464 Alternate="0" />
465 <pin7
466 ID=""
467 Type="PushPull"
468 Speed="Minimum"
469 Resistor="PullUp"
470 Level="High"
471 Mode="Input"
472 Alternate="0" />
473 <pin8
474 ID=""
475 Type="PushPull"
476 Speed="Minimum"
477 Resistor="PullUp"
478 Level="High"
479 Mode="Input"
480 Alternate="0" />
481 <pin9
482 ID=""
483 Type="PushPull"
484 Speed="Minimum"
485 Resistor="PullUp"
486 Level="High"
487 Mode="Input"
488 Alternate="0" />
489 <pin10
490 ID=""
491 Type="PushPull"
492 Speed="Minimum"
493 Resistor="PullUp"
494 Level="High"
495 Mode="Input"
496 Alternate="0" />
497 <pin11
498 ID=""
499 Type="PushPull"
500 Speed="Minimum"
501 Resistor="PullUp"
502 Level="High"
503 Mode="Input"
504 Alternate="0" />
505 <pin12
506 ID=""
507 Type="PushPull"
508 Speed="Minimum"
509 Resistor="PullUp"
510 Level="High"
511 Mode="Input"
512 Alternate="0" />
513 <pin13
514 ID=""
515 Type="PushPull"
516 Speed="Minimum"
517 Resistor="PullUp"
518 Level="High"
519 Mode="Input"
520 Alternate="0" />
521 <pin14
522 ID=""
523 Type="PushPull"
524 Speed="Minimum"
525 Resistor="PullUp"
526 Level="High"
527 Mode="Input"
528 Alternate="0" />
529 <pin15
530 ID=""
531 Type="PushPull"
532 Speed="Minimum"
533 Resistor="PullUp"
534 Level="High"
535 Mode="Input"
536 Alternate="0" />
537 </GPIOD>
538 <GPIOE>
539 <pin0 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
540 Level="High" Mode="Input" Alternate="0" />
541 <pin1 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
542 Level="High" Mode="Input" Alternate="0" />
543 <pin2 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
544 Level="High" Mode="Input" Alternate="0" />
545 <pin3 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
546 Level="High" Mode="Input" Alternate="0" />
547 <pin4 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
548 Level="High" Mode="Input" Alternate="0" />
549 <pin5 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
550 Level="High" Mode="Input" Alternate="0" />
551 <pin6 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
552 Level="High" Mode="Input" Alternate="0" />
553 <pin7 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
554 Level="High" Mode="Input" Alternate="0" />
555 <pin8 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
556 Level="High" Mode="Input" Alternate="0" />
557 <pin9 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
558 Level="High" Mode="Input" Alternate="0" />
559 <pin10 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
560 Level="High" Mode="Input" Alternate="0" />
561 <pin11 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
562 Level="High" Mode="Input" Alternate="0" />
563 <pin12 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
564 Level="High" Mode="Input" Alternate="0" />
565 <pin13 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
566 Level="High" Mode="Input" Alternate="0" />
567 <pin14 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
568 Level="High" Mode="Input" Alternate="0" />
569 <pin15 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
570 Level="High" Mode="Input" Alternate="0" />
571 </GPIOE>
572 <GPIOF>
573 <pin0
574 ID="OSC_IN"
575 Type="PushPull"
576 Speed="Minimum"
577 Resistor="Floating"
578 Level="High"
579 Mode="Input"
580 Alternate="0" />
581 <pin1
582 ID="OSC_OUT"
583 Type="PushPull"
584 Speed="Minimum"
585 Resistor="Floating"
586 Level="High"
587 Mode="Input"
588 Alternate="0" />
589 <pin2
590 ID=""
591 Type="PushPull"
592 Speed="Minimum"
593 Resistor="PullUp"
594 Level="High"
595 Mode="Input"
596 Alternate="0" />
597 <pin3
598 ID=""
599 Type="PushPull"
600 Speed="Minimum"
601 Resistor="PullUp"
602 Level="High"
603 Mode="Input"
604 Alternate="0" />
605 <pin4
606 ID=""
607 Type="PushPull"
608 Speed="Minimum"
609 Resistor="PullUp"
610 Level="High"
611 Mode="Input"
612 Alternate="0" />
613 <pin5
614 ID=""
615 Type="PushPull"
616 Speed="Minimum"
617 Resistor="PullUp"
618 Level="High"
619 Mode="Input"
620 Alternate="0" />
621 <pin6
622 ID=""
623 Type="PushPull"
624 Speed="Minimum"
625 Resistor="PullUp"
626 Level="High"
627 Mode="Input"
628 Alternate="0" />
629 <pin7
630 ID=""
631 Type="PushPull"
632 Speed="Minimum"
633 Resistor="PullUp"
634 Level="High"
635 Mode="Input"
636 Alternate="0" />
637 <pin8
638 ID=""
639 Type="PushPull"
640 Speed="Minimum"
641 Resistor="PullUp"
642 Level="High"
643 Mode="Input"
644 Alternate="0" />
645 <pin9
646 ID=""
647 Type="PushPull"
648 Speed="Minimum"
649 Resistor="PullUp"
650 Level="High"
651 Mode="Input"
652 Alternate="0" />
653 <pin10
654 ID=""
655 Type="PushPull"
656 Speed="Minimum"
657 Resistor="PullUp"
658 Level="High"
659 Mode="Input"
660 Alternate="0" />
661 <pin11
662 ID=""
663 Type="PushPull"
664 Speed="Minimum"
665 Resistor="PullUp"
666 Level="High"
667 Mode="Input"
668 Alternate="0" />
669 <pin12
670 ID=""
671 Type="PushPull"
672 Speed="Minimum"
673 Resistor="PullUp"
674 Level="High"
675 Mode="Input"
676 Alternate="0" />
677 <pin13
678 ID=""
679 Type="PushPull"
680 Speed="Minimum"
681 Resistor="PullUp"
682 Level="High"
683 Mode="Input"
684 Alternate="0" />
685 <pin14
686 ID=""
687 Type="PushPull"
688 Speed="Minimum"
689 Resistor="PullUp"
690 Level="High"
691 Mode="Input"
692 Alternate="0" />
693 <pin15
694 ID=""
695 Type="PushPull"
696 Speed="Minimum"
697 Resistor="PullUp"
698 Level="High"
699 Mode="Input"
700 Alternate="0" />
701 </GPIOF>
702 </ports>
703</board>
diff --git a/drivers/boards/GENERIC_STM32_F072XB/cfg/board.fmpp b/drivers/boards/GENERIC_STM32_F072XB/cfg/board.fmpp
deleted file mode 100644
index 55cd396e4..000000000
--- a/drivers/boards/GENERIC_STM32_F072XB/cfg/board.fmpp
+++ /dev/null
@@ -1,15 +0,0 @@
1sourceRoot: ../../../../../tools/ftl/processors/boards/stm32f0xx/templates
2outputRoot: ..
3dataRoot: .
4
5freemarkerLinks: {
6 lib: ../../../../../tools/ftl/libs
7}
8
9data : {
10 doc1:xml (
11 board.chcfg
12 {
13 }
14 )
15}