aboutsummaryrefslogtreecommitdiff
path: root/keyboards/projectkb
diff options
context:
space:
mode:
authorAndrew Kannan <andrew.kannan@gmail.com>2020-04-07 00:01:11 -0400
committerGitHub <noreply@github.com>2020-04-07 14:01:11 +1000
commit0a643be39eb710649560f80c6ce0bc32576813fd (patch)
treec8636568f352c1e71634d475899740a7f9480ea0 /keyboards/projectkb
parent6c8e205fc0e5bc6372f057a257937ec3f88d5b8d (diff)
downloadqmk_firmware-0a643be39eb710649560f80c6ce0bc32576813fd.tar.gz
qmk_firmware-0a643be39eb710649560f80c6ce0bc32576813fd.zip
Update 072 based CannonKeys boards to rely on core QMK support (#8716)
* Swap CannonKeys 072 boards over to rely on core QMK backlight support * Rename keymap * Rename via_tsangan back to via
Diffstat (limited to 'keyboards/projectkb')
-rw-r--r--keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.c268
-rw-r--r--keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.h940
-rw-r--r--keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.mk5
-rw-r--r--keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg703
-rw-r--r--keyboards/projectkb/alice/bootloader_defs.h7
-rw-r--r--keyboards/projectkb/alice/config.h14
-rw-r--r--keyboards/projectkb/alice/keymaps/via/keymap.c2
-rw-r--r--keyboards/projectkb/alice/rules.mk13
8 files changed, 8 insertions, 1944 deletions
diff --git a/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.c
deleted file mode 100644
index 7c09bd997..000000000
--- a/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.c
+++ /dev/null
@@ -1,268 +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,
95 VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH},
96#endif
97#if STM32_HAS_GPIOB
98 {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR,
99 VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH},
100#endif
101#if STM32_HAS_GPIOC
102 {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR,
103 VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH},
104#endif
105#if STM32_HAS_GPIOD
106 {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR,
107 VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH},
108#endif
109#if STM32_HAS_GPIOE
110 {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR,
111 VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH},
112#endif
113#if STM32_HAS_GPIOF
114 {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR,
115 VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH},
116#endif
117#if STM32_HAS_GPIOG
118 {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR,
119 VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH},
120#endif
121#if STM32_HAS_GPIOH
122 {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR,
123 VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH},
124#endif
125#if STM32_HAS_GPIOI
126 {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR,
127 VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH},
128#endif
129#if STM32_HAS_GPIOJ
130 {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR,
131 VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH},
132#endif
133#if STM32_HAS_GPIOK
134 {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR,
135 VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH}
136#endif
137};
138
139/*===========================================================================*/
140/* Driver local functions. */
141/*===========================================================================*/
142
143static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) {
144
145 gpiop->OTYPER = config->otyper;
146 gpiop->OSPEEDR = config->ospeedr;
147 gpiop->PUPDR = config->pupdr;
148 gpiop->ODR = config->odr;
149 gpiop->AFRL = config->afrl;
150 gpiop->AFRH = config->afrh;
151 gpiop->MODER = config->moder;
152}
153
154static void stm32_gpio_init(void) {
155
156 /* Enabling GPIO-related clocks, the mask comes from the
157 registry header file.*/
158 rccResetAHB(STM32_GPIO_EN_MASK);
159 rccEnableAHB(STM32_GPIO_EN_MASK, true);
160
161 /* Initializing all the defined GPIO ports.*/
162#if STM32_HAS_GPIOA
163 gpio_init(GPIOA, &gpio_default_config.PAData);
164#endif
165#if STM32_HAS_GPIOB
166 gpio_init(GPIOB, &gpio_default_config.PBData);
167#endif
168#if STM32_HAS_GPIOC
169 gpio_init(GPIOC, &gpio_default_config.PCData);
170#endif
171#if STM32_HAS_GPIOD
172 gpio_init(GPIOD, &gpio_default_config.PDData);
173#endif
174#if STM32_HAS_GPIOE
175 gpio_init(GPIOE, &gpio_default_config.PEData);
176#endif
177#if STM32_HAS_GPIOF
178 gpio_init(GPIOF, &gpio_default_config.PFData);
179#endif
180#if STM32_HAS_GPIOG
181 gpio_init(GPIOG, &gpio_default_config.PGData);
182#endif
183#if STM32_HAS_GPIOH
184 gpio_init(GPIOH, &gpio_default_config.PHData);
185#endif
186#if STM32_HAS_GPIOI
187 gpio_init(GPIOI, &gpio_default_config.PIData);
188#endif
189#if STM32_HAS_GPIOJ
190 gpio_init(GPIOJ, &gpio_default_config.PJData);
191#endif
192#if STM32_HAS_GPIOK
193 gpio_init(GPIOK, &gpio_default_config.PKData);
194#endif
195}
196
197/*===========================================================================*/
198/* Driver interrupt handlers. */
199/*===========================================================================*/
200
201/*===========================================================================*/
202/* Driver exported functions. */
203/*===========================================================================*/
204
205/**
206 * @brief Early initialization code.
207 * @details GPIO ports and system clocks are initialized before everything
208 * else.
209 */
210void __early_init(void) {
211 extern void enter_bootloader_mode_if_requested(void);
212 enter_bootloader_mode_if_requested();
213 stm32_gpio_init();
214 stm32_clock_init();
215}
216
217#if HAL_USE_SDC || defined(__DOXYGEN__)
218/**
219 * @brief SDC card detection.
220 */
221bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
222
223 (void)sdcp;
224 /* TODO: Fill the implementation.*/
225 return true;
226}
227
228/**
229 * @brief SDC card write protection detection.
230 */
231bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
232
233 (void)sdcp;
234 /* TODO: Fill the implementation.*/
235 return false;
236}
237#endif /* HAL_USE_SDC */
238
239#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
240/**
241 * @brief MMC_SPI card detection.
242 */
243bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
244
245 (void)mmcp;
246 /* TODO: Fill the implementation.*/
247 return true;
248}
249
250/**
251 * @brief MMC_SPI card write protection detection.
252 */
253bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
254
255 (void)mmcp;
256 /* TODO: Fill the implementation.*/
257 return false;
258}
259#endif
260
261/**
262 * @brief Board-specific initialization code.
263 * @todo Add your board-specific code, if any.
264 */
265void boardInit(void) {
266 SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP;
267 SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP);
268}
diff --git a/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.h
deleted file mode 100644
index 57636d1f1..000000000
--- a/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.h
+++ /dev/null
@@ -1,940 +0,0 @@
1/*
2 ChibiOS - Copyright (C) 2006..2016 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 ST STM32F072B-Discovery board.
31 */
32
33/*
34 * Board identifier.
35 */
36#define BOARD_ST_STM32F072B_DISCOVERY
37#define BOARD_NAME "ST STM32F072B-Discovery"
38
39/*
40 * Board oscillators-related settings.
41 * NOTE: HSE not fitted.
42 */
43#if !defined(STM32_LSECLK)
44#define STM32_LSECLK 32768
45#endif
46
47#define STM32_LSEDRV (3U << 3U)
48
49#if !defined(STM32_HSECLK)
50#define STM32_HSECLK 0U
51#endif
52
53#define STM32_HSE_BYPASS
54
55/*
56 * MCU type as defined in the ST header.
57 */
58#define STM32F072xB
59
60/*
61 * IO pins assignments.
62 */
63#define GPIOA_BUTTON 0U
64#define GPIOA_PIN1 1U
65#define GPIOA_PIN2 2U
66#define GPIOA_PIN3 3U
67#define GPIOA_PIN4 4U
68#define GPIOA_PIN5 5U
69#define GPIOA_PIN6 6U
70#define GPIOA_PIN7 7U
71#define GPIOA_PIN8 8U
72#define GPIOA_PIN9 9U
73#define GPIOA_PIN10 10U
74#define GPIOA_USB_DM 11U
75#define GPIOA_USB_DP 12U
76#define GPIOA_SWDIO 13U
77#define GPIOA_SWCLK 14U
78#define GPIOA_PIN15 15U
79
80#define GPIOB_PIN0 0U
81#define GPIOB_PIN1 1U
82#define GPIOB_PIN2 2U
83#define GPIOB_PIN3 3U
84#define GPIOB_PIN4 4U
85#define GPIOB_PIN5 5U
86#define GPIOB_PIN6 6U
87#define GPIOB_PIN7 7U
88#define GPIOB_PIN8 8U
89#define GPIOB_PIN9 9U
90#define GPIOB_PIN10 10U
91#define GPIOB_PIN11 11U
92#define GPIOB_PIN12 12U
93#define GPIOB_SPI2_SCK 13U
94#define GPIOB_SPI2_MISO 14U
95#define GPIOB_SPI2_MOSI 15U
96
97#define GPIOC_MEMS_CS 0U
98#define GPIOC_PIN1 1U
99#define GPIOC_PIN2 2U
100#define GPIOC_PIN3 3U
101#define GPIOC_PIN4 4U
102#define GPIOC_PIN5 5U
103#define GPIOC_LED_RED 6U
104#define GPIOC_LED_BLUE 7U
105#define GPIOC_LED_ORANGE 8U
106#define GPIOC_LED_GREEN 9U
107#define GPIOC_PIN10 10U
108#define GPIOC_PIN11 11U
109#define GPIOC_PIN12 12U
110#define GPIOC_PIN13 13U
111#define GPIOC_OSC32_IN 14U
112#define GPIOC_OSC32_OUT 15U
113
114#define GPIOD_PIN0 0U
115#define GPIOD_PIN1 1U
116#define GPIOD_PIN2 2U
117#define GPIOD_PIN3 3U
118#define GPIOD_PIN4 4U
119#define GPIOD_PIN5 5U
120#define GPIOD_PIN6 6U
121#define GPIOD_PIN7 7U
122#define GPIOD_PIN8 8U
123#define GPIOD_PIN9 9U
124#define GPIOD_PIN10 10U
125#define GPIOD_PIN11 11U
126#define GPIOD_PIN12 12U
127#define GPIOD_PIN13 13U
128#define GPIOD_PIN14 14U
129#define GPIOD_PIN15 15U
130
131#define GPIOE_PIN0 0U
132#define GPIOE_PIN1 1U
133#define GPIOE_PIN2 2U
134#define GPIOE_PIN3 3U
135#define GPIOE_PIN4 4U
136#define GPIOE_PIN5 5U
137#define GPIOE_PIN6 6U
138#define GPIOE_PIN7 7U
139#define GPIOE_PIN8 8U
140#define GPIOE_PIN9 9U
141#define GPIOE_PIN10 10U
142#define GPIOE_PIN11 11U
143#define GPIOE_PIN12 12U
144#define GPIOE_PIN13 13U
145#define GPIOE_PIN14 14U
146#define GPIOE_PIN15 15U
147
148#define GPIOF_OSC_IN 0U
149#define GPIOF_OSC_OUT 1U
150#define GPIOF_PIN2 2U
151#define GPIOF_PIN3 3U
152#define GPIOF_PIN4 4U
153#define GPIOF_PIN5 5U
154#define GPIOF_PIN6 6U
155#define GPIOF_PIN7 7U
156#define GPIOF_PIN8 8U
157#define GPIOF_PIN9 9U
158#define GPIOF_PIN10 10U
159#define GPIOF_PIN11 11U
160#define GPIOF_PIN12 12U
161#define GPIOF_PIN13 13U
162#define GPIOF_PIN14 14U
163#define GPIOF_PIN15 15U
164
165/*
166 * IO lines assignments.
167 */
168#define LINE_BUTTON PAL_LINE(GPIOA, 0U)
169#define LINE_USB_DM PAL_LINE(GPIOA, 11U)
170#define LINE_USB_DP PAL_LINE(GPIOA, 12U)
171#define LINE_SWDIO PAL_LINE(GPIOA, 13U)
172#define LINE_SWCLK PAL_LINE(GPIOA, 14U)
173#define LINE_SPI2_SCK PAL_LINE(GPIOB, 13U)
174#define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U)
175#define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U)
176#define LINE_MEMS_CS PAL_LINE(GPIOC, 0U)
177#define LINE_LED_RED PAL_LINE(GPIOC, 6U)
178#define LINE_LED_BLUE PAL_LINE(GPIOC, 7U)
179#define LINE_LED_ORANGE PAL_LINE(GPIOC, 8U)
180#define LINE_LED_GREEN PAL_LINE(GPIOC, 9U)
181#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U)
182#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U)
183#define LINE_OSC_IN PAL_LINE(GPIOF, 0U)
184#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U)
185
186/*===========================================================================*/
187/* Driver pre-compile time settings. */
188/*===========================================================================*/
189
190/*===========================================================================*/
191/* Derived constants and error checks. */
192/*===========================================================================*/
193
194/*===========================================================================*/
195/* Driver data structures and types. */
196/*===========================================================================*/
197
198/*===========================================================================*/
199/* Driver macros. */
200/*===========================================================================*/
201
202/*
203 * I/O ports initial setup, this configuration is established soon after reset
204 * in the initialization code.
205 * Please refer to the STM32 Reference Manual for details.
206 */
207#define PIN_MODE_INPUT(n) (0U << ((n) * 2U))
208#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U))
209#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U))
210#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U))
211#define PIN_ODR_LOW(n) (0U << (n))
212#define PIN_ODR_HIGH(n) (1U << (n))
213#define PIN_OTYPE_PUSHPULL(n) (0U << (n))
214#define PIN_OTYPE_OPENDRAIN(n) (1U << (n))
215#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U))
216#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U))
217#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U))
218#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U))
219#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U))
220#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U))
221#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U))
222#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U))
223
224/*
225 * GPIOA setup:
226 *
227 * PA0 - BUTTON (input floating).
228 * PA1 - PIN1 (input pullup).
229 * PA2 - PIN2 (input pullup).
230 * PA3 - PIN3 (input pullup).
231 * PA4 - PIN4 (input pullup).
232 * PA5 - PIN5 (input pullup).
233 * PA6 - PIN6 (input pullup).
234 * PA7 - PIN7 (input pullup).
235 * PA8 - PIN8 (input pullup).
236 * PA9 - PIN9 (input pullup).
237 * PA10 - PIN10 (input pullup).
238 * PA11 - USB_DM (input floating).
239 * PA12 - USB_DP (input floating).
240 * PA13 - SWDIO (alternate 0).
241 * PA14 - SWCLK (alternate 0).
242 * PA15 - PIN15 (input pullup).
243 */
244#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | \
245 PIN_MODE_INPUT(GPIOA_PIN1) | \
246 PIN_MODE_INPUT(GPIOA_PIN2) | \
247 PIN_MODE_INPUT(GPIOA_PIN3) | \
248 PIN_MODE_INPUT(GPIOA_PIN4) | \
249 PIN_MODE_INPUT(GPIOA_PIN5) | \
250 PIN_MODE_INPUT(GPIOA_PIN6) | \
251 PIN_MODE_INPUT(GPIOA_PIN7) | \
252 PIN_MODE_INPUT(GPIOA_PIN8) | \
253 PIN_MODE_INPUT(GPIOA_PIN9) | \
254 PIN_MODE_INPUT(GPIOA_PIN10) | \
255 PIN_MODE_INPUT(GPIOA_USB_DM) | \
256 PIN_MODE_INPUT(GPIOA_USB_DP) | \
257 PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \
258 PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \
259 PIN_MODE_INPUT(GPIOA_PIN15))
260#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | \
261 PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \
262 PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \
263 PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \
264 PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \
265 PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \
266 PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \
267 PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \
268 PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \
269 PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \
270 PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \
271 PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \
272 PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \
273 PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \
274 PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \
275 PIN_OTYPE_PUSHPULL(GPIOA_PIN15))
276#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_BUTTON) | \
277 PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \
278 PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \
279 PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \
280 PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \
281 PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \
282 PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \
283 PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \
284 PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \
285 PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \
286 PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \
287 PIN_OSPEED_VERYLOW(GPIOA_USB_DM) | \
288 PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \
289 PIN_OSPEED_HIGH(GPIOA_SWDIO) | \
290 PIN_OSPEED_HIGH(GPIOA_SWCLK) | \
291 PIN_OSPEED_HIGH(GPIOA_PIN15))
292#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | \
293 PIN_PUPDR_PULLUP(GPIOA_PIN1) | \
294 PIN_PUPDR_PULLUP(GPIOA_PIN2) | \
295 PIN_PUPDR_PULLUP(GPIOA_PIN3) | \
296 PIN_PUPDR_PULLUP(GPIOA_PIN4) | \
297 PIN_PUPDR_PULLUP(GPIOA_PIN5) | \
298 PIN_PUPDR_PULLUP(GPIOA_PIN6) | \
299 PIN_PUPDR_PULLUP(GPIOA_PIN7) | \
300 PIN_PUPDR_PULLUP(GPIOA_PIN8) | \
301 PIN_PUPDR_PULLUP(GPIOA_PIN9) | \
302 PIN_PUPDR_PULLUP(GPIOA_PIN10) | \
303 PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \
304 PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \
305 PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \
306 PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \
307 PIN_PUPDR_PULLUP(GPIOA_PIN15))
308#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | \
309 PIN_ODR_HIGH(GPIOA_PIN1) | \
310 PIN_ODR_HIGH(GPIOA_PIN2) | \
311 PIN_ODR_HIGH(GPIOA_PIN3) | \
312 PIN_ODR_HIGH(GPIOA_PIN4) | \
313 PIN_ODR_HIGH(GPIOA_PIN5) | \
314 PIN_ODR_HIGH(GPIOA_PIN6) | \
315 PIN_ODR_HIGH(GPIOA_PIN7) | \
316 PIN_ODR_HIGH(GPIOA_PIN8) | \
317 PIN_ODR_HIGH(GPIOA_PIN9) | \
318 PIN_ODR_HIGH(GPIOA_PIN10) | \
319 PIN_ODR_HIGH(GPIOA_USB_DM) | \
320 PIN_ODR_HIGH(GPIOA_USB_DP) | \
321 PIN_ODR_HIGH(GPIOA_SWDIO) | \
322 PIN_ODR_HIGH(GPIOA_SWCLK) | \
323 PIN_ODR_HIGH(GPIOA_PIN15))
324#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | \
325 PIN_AFIO_AF(GPIOA_PIN1, 0U) | \
326 PIN_AFIO_AF(GPIOA_PIN2, 0U) | \
327 PIN_AFIO_AF(GPIOA_PIN3, 0U) | \
328 PIN_AFIO_AF(GPIOA_PIN4, 0U) | \
329 PIN_AFIO_AF(GPIOA_PIN5, 0U) | \
330 PIN_AFIO_AF(GPIOA_PIN6, 0U) | \
331 PIN_AFIO_AF(GPIOA_PIN7, 0U))
332#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \
333 PIN_AFIO_AF(GPIOA_PIN9, 0U) | \
334 PIN_AFIO_AF(GPIOA_PIN10, 0U) | \
335 PIN_AFIO_AF(GPIOA_USB_DM, 0U) | \
336 PIN_AFIO_AF(GPIOA_USB_DP, 0U) | \
337 PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \
338 PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \
339 PIN_AFIO_AF(GPIOA_PIN15, 0U))
340
341/*
342 * GPIOB setup:
343 *
344 * PB0 - PIN0 (input pullup).
345 * PB1 - PIN1 (input pullup).
346 * PB2 - PIN2 (input pullup).
347 * PB3 - PIN3 (input pullup).
348 * PB4 - PIN4 (input pullup).
349 * PB5 - PIN5 (input pullup).
350 * PB6 - PIN6 (input pullup).
351 * PB7 - PIN7 (input pullup).
352 * PB8 - PIN8 (input pullup).
353 * PB9 - PIN9 (input pullup).
354 * PB10 - PIN10 (input pullup).
355 * PB11 - PIN11 (input pullup).
356 * PB12 - PIN12 (input pullup).
357 * PB13 - SPI2_SCK (alternate 0).
358 * PB14 - SPI2_MISO (alternate 0).
359 * PB15 - SPI2_MOSI (alternate 0).
360 */
361#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \
362 PIN_MODE_INPUT(GPIOB_PIN1) | \
363 PIN_MODE_INPUT(GPIOB_PIN2) | \
364 PIN_MODE_INPUT(GPIOB_PIN3) | \
365 PIN_MODE_INPUT(GPIOB_PIN4) | \
366 PIN_MODE_INPUT(GPIOB_PIN5) | \
367 PIN_MODE_INPUT(GPIOB_PIN6) | \
368 PIN_MODE_INPUT(GPIOB_PIN7) | \
369 PIN_MODE_INPUT(GPIOB_PIN8) | \
370 PIN_MODE_INPUT(GPIOB_PIN9) | \
371 PIN_MODE_INPUT(GPIOB_PIN10) | \
372 PIN_MODE_INPUT(GPIOB_PIN11) | \
373 PIN_MODE_INPUT(GPIOB_PIN12) | \
374 PIN_MODE_ALTERNATE(GPIOB_SPI2_SCK) | \
375 PIN_MODE_ALTERNATE(GPIOB_SPI2_MISO) | \
376 PIN_MODE_ALTERNATE(GPIOB_SPI2_MOSI))
377#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \
378 PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \
379 PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \
380 PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \
381 PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \
382 PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \
383 PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | \
384 PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \
385 PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \
386 PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \
387 PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \
388 PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \
389 PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \
390 PIN_OTYPE_PUSHPULL(GPIOB_SPI2_SCK) | \
391 PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MISO) | \
392 PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MOSI))
393#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \
394 PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \
395 PIN_OSPEED_HIGH(GPIOB_PIN2) | \
396 PIN_OSPEED_HIGH(GPIOB_PIN3) | \
397 PIN_OSPEED_HIGH(GPIOB_PIN4) | \
398 PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \
399 PIN_OSPEED_VERYLOW(GPIOB_PIN6) | \
400 PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \
401 PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \
402 PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \
403 PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \
404 PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \
405 PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \
406 PIN_OSPEED_VERYLOW(GPIOB_SPI2_SCK) | \
407 PIN_OSPEED_VERYLOW(GPIOB_SPI2_MISO) | \
408 PIN_OSPEED_VERYLOW(GPIOB_SPI2_MOSI))
409#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \
410 PIN_PUPDR_PULLUP(GPIOB_PIN1) | \
411 PIN_PUPDR_PULLUP(GPIOB_PIN2) | \
412 PIN_PUPDR_PULLUP(GPIOB_PIN3) | \
413 PIN_PUPDR_PULLUP(GPIOB_PIN4) | \
414 PIN_PUPDR_PULLUP(GPIOB_PIN5) | \
415 PIN_PUPDR_PULLUP(GPIOB_PIN6) | \
416 PIN_PUPDR_PULLUP(GPIOB_PIN7) | \
417 PIN_PUPDR_PULLUP(GPIOB_PIN8) | \
418 PIN_PUPDR_PULLUP(GPIOB_PIN9) | \
419 PIN_PUPDR_PULLUP(GPIOB_PIN10) | \
420 PIN_PUPDR_PULLUP(GPIOB_PIN11) | \
421 PIN_PUPDR_PULLUP(GPIOB_PIN12) | \
422 PIN_PUPDR_FLOATING(GPIOB_SPI2_SCK) | \
423 PIN_PUPDR_FLOATING(GPIOB_SPI2_MISO) | \
424 PIN_PUPDR_FLOATING(GPIOB_SPI2_MOSI))
425#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \
426 PIN_ODR_HIGH(GPIOB_PIN1) | \
427 PIN_ODR_HIGH(GPIOB_PIN2) | \
428 PIN_ODR_HIGH(GPIOB_PIN3) | \
429 PIN_ODR_HIGH(GPIOB_PIN4) | \
430 PIN_ODR_HIGH(GPIOB_PIN5) | \
431 PIN_ODR_HIGH(GPIOB_PIN6) | \
432 PIN_ODR_HIGH(GPIOB_PIN7) | \
433 PIN_ODR_HIGH(GPIOB_PIN8) | \
434 PIN_ODR_HIGH(GPIOB_PIN9) | \
435 PIN_ODR_HIGH(GPIOB_PIN10) | \
436 PIN_ODR_HIGH(GPIOB_PIN11) | \
437 PIN_ODR_HIGH(GPIOB_PIN12) | \
438 PIN_ODR_HIGH(GPIOB_SPI2_SCK) | \
439 PIN_ODR_HIGH(GPIOB_SPI2_MISO) | \
440 PIN_ODR_HIGH(GPIOB_SPI2_MOSI))
441#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \
442 PIN_AFIO_AF(GPIOB_PIN1, 0U) | \
443 PIN_AFIO_AF(GPIOB_PIN2, 0U) | \
444 PIN_AFIO_AF(GPIOB_PIN3, 0U) | \
445 PIN_AFIO_AF(GPIOB_PIN4, 0U) | \
446 PIN_AFIO_AF(GPIOB_PIN5, 0U) | \
447 PIN_AFIO_AF(GPIOB_PIN6, 0U) | \
448 PIN_AFIO_AF(GPIOB_PIN7, 0U))
449#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \
450 PIN_AFIO_AF(GPIOB_PIN9, 0U) | \
451 PIN_AFIO_AF(GPIOB_PIN10, 0U) | \
452 PIN_AFIO_AF(GPIOB_PIN11, 0U) | \
453 PIN_AFIO_AF(GPIOB_PIN12, 0U) | \
454 PIN_AFIO_AF(GPIOB_SPI2_SCK, 0U) | \
455 PIN_AFIO_AF(GPIOB_SPI2_MISO, 0U) | \
456 PIN_AFIO_AF(GPIOB_SPI2_MOSI, 0U))
457
458/*
459 * GPIOC setup:
460 *
461 * PC0 - MEMS_CS (output pushpull maximum).
462 * PC1 - PIN1 (input pullup).
463 * PC2 - PIN2 (input pullup).
464 * PC3 - PIN3 (input pullup).
465 * PC4 - PIN4 (input pullup).
466 * PC5 - PIN5 (input pullup).
467 * PC6 - LED_RED (output pushpull maximum).
468 * PC7 - LED_BLUE (output pushpull maximum).
469 * PC8 - LED_ORANGE (output pushpull maximum).
470 * PC9 - LED_GREEN (output pushpull maximum).
471 * PC10 - PIN10 (input pullup).
472 * PC11 - PIN11 (input pullup).
473 * PC12 - PIN12 (input pullup).
474 * PC13 - PIN13 (input pullup).
475 * PC14 - OSC32_IN (input floating).
476 * PC15 - OSC32_OUT (input floating).
477 */
478#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_MEMS_CS) | \
479 PIN_MODE_INPUT(GPIOC_PIN1) | \
480 PIN_MODE_INPUT(GPIOC_PIN2) | \
481 PIN_MODE_INPUT(GPIOC_PIN3) | \
482 PIN_MODE_INPUT(GPIOC_PIN4) | \
483 PIN_MODE_INPUT(GPIOC_PIN5) | \
484 PIN_MODE_OUTPUT(GPIOC_LED_RED) | \
485 PIN_MODE_OUTPUT(GPIOC_LED_BLUE) | \
486 PIN_MODE_OUTPUT(GPIOC_LED_ORANGE) | \
487 PIN_MODE_OUTPUT(GPIOC_LED_GREEN) | \
488 PIN_MODE_INPUT(GPIOC_PIN10) | \
489 PIN_MODE_INPUT(GPIOC_PIN11) | \
490 PIN_MODE_INPUT(GPIOC_PIN12) | \
491 PIN_MODE_INPUT(GPIOC_PIN13) | \
492 PIN_MODE_INPUT(GPIOC_OSC32_IN) | \
493 PIN_MODE_INPUT(GPIOC_OSC32_OUT))
494#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_MEMS_CS) | \
495 PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \
496 PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \
497 PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \
498 PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \
499 PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \
500 PIN_OTYPE_PUSHPULL(GPIOC_LED_RED) | \
501 PIN_OTYPE_PUSHPULL(GPIOC_LED_BLUE) | \
502 PIN_OTYPE_PUSHPULL(GPIOC_LED_ORANGE) | \
503 PIN_OTYPE_PUSHPULL(GPIOC_LED_GREEN) | \
504 PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \
505 PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \
506 PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \
507 PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \
508 PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \
509 PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT))
510#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_MEMS_CS) | \
511 PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \
512 PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \
513 PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \
514 PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \
515 PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \
516 PIN_OSPEED_HIGH(GPIOC_LED_RED) | \
517 PIN_OSPEED_HIGH(GPIOC_LED_BLUE) | \
518 PIN_OSPEED_HIGH(GPIOC_LED_ORANGE) | \
519 PIN_OSPEED_HIGH(GPIOC_LED_GREEN) | \
520 PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \
521 PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \
522 PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \
523 PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \
524 PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \
525 PIN_OSPEED_HIGH(GPIOC_OSC32_OUT))
526#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_MEMS_CS) | \
527 PIN_PUPDR_PULLUP(GPIOC_PIN1) | \
528 PIN_PUPDR_PULLUP(GPIOC_PIN2) | \
529 PIN_PUPDR_PULLUP(GPIOC_PIN3) | \
530 PIN_PUPDR_PULLUP(GPIOC_PIN4) | \
531 PIN_PUPDR_PULLUP(GPIOC_PIN5) | \
532 PIN_PUPDR_FLOATING(GPIOC_LED_RED) | \
533 PIN_PUPDR_FLOATING(GPIOC_LED_BLUE) | \
534 PIN_PUPDR_FLOATING(GPIOC_LED_ORANGE) | \
535 PIN_PUPDR_FLOATING(GPIOC_LED_GREEN) | \
536 PIN_PUPDR_PULLUP(GPIOC_PIN10) | \
537 PIN_PUPDR_PULLUP(GPIOC_PIN11) | \
538 PIN_PUPDR_PULLUP(GPIOC_PIN12) | \
539 PIN_PUPDR_PULLUP(GPIOC_PIN13) | \
540 PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \
541 PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT))
542#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_MEMS_CS) | \
543 PIN_ODR_HIGH(GPIOC_PIN1) | \
544 PIN_ODR_HIGH(GPIOC_PIN2) | \
545 PIN_ODR_HIGH(GPIOC_PIN3) | \
546 PIN_ODR_HIGH(GPIOC_PIN4) | \
547 PIN_ODR_HIGH(GPIOC_PIN5) | \
548 PIN_ODR_LOW(GPIOC_LED_RED) | \
549 PIN_ODR_LOW(GPIOC_LED_BLUE) | \
550 PIN_ODR_LOW(GPIOC_LED_ORANGE) | \
551 PIN_ODR_LOW(GPIOC_LED_GREEN) | \
552 PIN_ODR_HIGH(GPIOC_PIN10) | \
553 PIN_ODR_HIGH(GPIOC_PIN11) | \
554 PIN_ODR_HIGH(GPIOC_PIN12) | \
555 PIN_ODR_HIGH(GPIOC_PIN13) | \
556 PIN_ODR_HIGH(GPIOC_OSC32_IN) | \
557 PIN_ODR_HIGH(GPIOC_OSC32_OUT))
558#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_MEMS_CS, 0U) | \
559 PIN_AFIO_AF(GPIOC_PIN1, 0U) | \
560 PIN_AFIO_AF(GPIOC_PIN2, 0U) | \
561 PIN_AFIO_AF(GPIOC_PIN3, 0U) | \
562 PIN_AFIO_AF(GPIOC_PIN4, 0U) | \
563 PIN_AFIO_AF(GPIOC_PIN5, 0U) | \
564 PIN_AFIO_AF(GPIOC_LED_RED, 0U) | \
565 PIN_AFIO_AF(GPIOC_LED_BLUE, 0U))
566#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_LED_ORANGE, 0U) | \
567 PIN_AFIO_AF(GPIOC_LED_GREEN, 0U) | \
568 PIN_AFIO_AF(GPIOC_PIN10, 0U) | \
569 PIN_AFIO_AF(GPIOC_PIN11, 0U) | \
570 PIN_AFIO_AF(GPIOC_PIN12, 0U) | \
571 PIN_AFIO_AF(GPIOC_PIN13, 0U) | \
572 PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \
573 PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U))
574
575/*
576 * GPIOD setup:
577 *
578 * PD0 - PIN0 (input pullup).
579 * PD1 - PIN1 (input pullup).
580 * PD2 - PIN2 (input pullup).
581 * PD3 - PIN3 (input pullup).
582 * PD4 - PIN4 (input pullup).
583 * PD5 - PIN5 (input pullup).
584 * PD6 - PIN6 (input pullup).
585 * PD7 - PIN7 (input pullup).
586 * PD8 - PIN8 (input pullup).
587 * PD9 - PIN9 (input pullup).
588 * PD10 - PIN10 (input pullup).
589 * PD11 - PIN11 (input pullup).
590 * PD12 - PIN12 (input pullup).
591 * PD13 - PIN13 (input pullup).
592 * PD14 - PIN14 (input pullup).
593 * PD15 - PIN15 (input pullup).
594 */
595#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \
596 PIN_MODE_INPUT(GPIOD_PIN1) | \
597 PIN_MODE_INPUT(GPIOD_PIN2) | \
598 PIN_MODE_INPUT(GPIOD_PIN3) | \
599 PIN_MODE_INPUT(GPIOD_PIN4) | \
600 PIN_MODE_INPUT(GPIOD_PIN5) | \
601 PIN_MODE_INPUT(GPIOD_PIN6) | \
602 PIN_MODE_INPUT(GPIOD_PIN7) | \
603 PIN_MODE_INPUT(GPIOD_PIN8) | \
604 PIN_MODE_INPUT(GPIOD_PIN9) | \
605 PIN_MODE_INPUT(GPIOD_PIN10) | \
606 PIN_MODE_INPUT(GPIOD_PIN11) | \
607 PIN_MODE_INPUT(GPIOD_PIN12) | \
608 PIN_MODE_INPUT(GPIOD_PIN13) | \
609 PIN_MODE_INPUT(GPIOD_PIN14) | \
610 PIN_MODE_INPUT(GPIOD_PIN15))
611#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \
612 PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \
613 PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \
614 PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \
615 PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \
616 PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \
617 PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \
618 PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \
619 PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \
620 PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \
621 PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \
622 PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \
623 PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \
624 PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \
625 PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \
626 PIN_OTYPE_PUSHPULL(GPIOD_PIN15))
627#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \
628 PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \
629 PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \
630 PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \
631 PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \
632 PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \
633 PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \
634 PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \
635 PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \
636 PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \
637 PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \
638 PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \
639 PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \
640 PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \
641 PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \
642 PIN_OSPEED_VERYLOW(GPIOD_PIN15))
643#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \
644 PIN_PUPDR_PULLUP(GPIOD_PIN1) | \
645 PIN_PUPDR_PULLUP(GPIOD_PIN2) | \
646 PIN_PUPDR_PULLUP(GPIOD_PIN3) | \
647 PIN_PUPDR_PULLUP(GPIOD_PIN4) | \
648 PIN_PUPDR_PULLUP(GPIOD_PIN5) | \
649 PIN_PUPDR_PULLUP(GPIOD_PIN6) | \
650 PIN_PUPDR_PULLUP(GPIOD_PIN7) | \
651 PIN_PUPDR_PULLUP(GPIOD_PIN8) | \
652 PIN_PUPDR_PULLUP(GPIOD_PIN9) | \
653 PIN_PUPDR_PULLUP(GPIOD_PIN10) | \
654 PIN_PUPDR_PULLUP(GPIOD_PIN11) | \
655 PIN_PUPDR_PULLUP(GPIOD_PIN12) | \
656 PIN_PUPDR_PULLUP(GPIOD_PIN13) | \
657 PIN_PUPDR_PULLUP(GPIOD_PIN14) | \
658 PIN_PUPDR_PULLUP(GPIOD_PIN15))
659#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \
660 PIN_ODR_HIGH(GPIOD_PIN1) | \
661 PIN_ODR_HIGH(GPIOD_PIN2) | \
662 PIN_ODR_HIGH(GPIOD_PIN3) | \
663 PIN_ODR_HIGH(GPIOD_PIN4) | \
664 PIN_ODR_HIGH(GPIOD_PIN5) | \
665 PIN_ODR_HIGH(GPIOD_PIN6) | \
666 PIN_ODR_HIGH(GPIOD_PIN7) | \
667 PIN_ODR_HIGH(GPIOD_PIN8) | \
668 PIN_ODR_HIGH(GPIOD_PIN9) | \
669 PIN_ODR_HIGH(GPIOD_PIN10) | \
670 PIN_ODR_HIGH(GPIOD_PIN11) | \
671 PIN_ODR_HIGH(GPIOD_PIN12) | \
672 PIN_ODR_HIGH(GPIOD_PIN13) | \
673 PIN_ODR_HIGH(GPIOD_PIN14) | \
674 PIN_ODR_HIGH(GPIOD_PIN15))
675#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \
676 PIN_AFIO_AF(GPIOD_PIN1, 0U) | \
677 PIN_AFIO_AF(GPIOD_PIN2, 0U) | \
678 PIN_AFIO_AF(GPIOD_PIN3, 0U) | \
679 PIN_AFIO_AF(GPIOD_PIN4, 0U) | \
680 PIN_AFIO_AF(GPIOD_PIN5, 0U) | \
681 PIN_AFIO_AF(GPIOD_PIN6, 0U) | \
682 PIN_AFIO_AF(GPIOD_PIN7, 0U))
683#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \
684 PIN_AFIO_AF(GPIOD_PIN9, 0U) | \
685 PIN_AFIO_AF(GPIOD_PIN10, 0U) | \
686 PIN_AFIO_AF(GPIOD_PIN11, 0U) | \
687 PIN_AFIO_AF(GPIOD_PIN12, 0U) | \
688 PIN_AFIO_AF(GPIOD_PIN13, 0U) | \
689 PIN_AFIO_AF(GPIOD_PIN14, 0U) | \
690 PIN_AFIO_AF(GPIOD_PIN15, 0U))
691
692/*
693 * GPIOE setup:
694 *
695 * PE0 - PIN0 (input pullup).
696 * PE1 - PIN1 (input pullup).
697 * PE2 - PIN2 (input pullup).
698 * PE3 - PIN3 (input pullup).
699 * PE4 - PIN4 (input pullup).
700 * PE5 - PIN5 (input pullup).
701 * PE6 - PIN6 (input pullup).
702 * PE7 - PIN7 (input pullup).
703 * PE8 - PIN8 (input pullup).
704 * PE9 - PIN9 (input pullup).
705 * PE10 - PIN10 (input pullup).
706 * PE11 - PIN11 (input pullup).
707 * PE12 - PIN12 (input pullup).
708 * PE13 - PIN13 (input pullup).
709 * PE14 - PIN14 (input pullup).
710 * PE15 - PIN15 (input pullup).
711 */
712#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \
713 PIN_MODE_INPUT(GPIOE_PIN1) | \
714 PIN_MODE_INPUT(GPIOE_PIN2) | \
715 PIN_MODE_INPUT(GPIOE_PIN3) | \
716 PIN_MODE_INPUT(GPIOE_PIN4) | \
717 PIN_MODE_INPUT(GPIOE_PIN5) | \
718 PIN_MODE_INPUT(GPIOE_PIN6) | \
719 PIN_MODE_INPUT(GPIOE_PIN7) | \
720 PIN_MODE_INPUT(GPIOE_PIN8) | \
721 PIN_MODE_INPUT(GPIOE_PIN9) | \
722 PIN_MODE_INPUT(GPIOE_PIN10) | \
723 PIN_MODE_INPUT(GPIOE_PIN11) | \
724 PIN_MODE_INPUT(GPIOE_PIN12) | \
725 PIN_MODE_INPUT(GPIOE_PIN13) | \
726 PIN_MODE_INPUT(GPIOE_PIN14) | \
727 PIN_MODE_INPUT(GPIOE_PIN15))
728#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \
729 PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \
730 PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \
731 PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \
732 PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \
733 PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \
734 PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \
735 PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \
736 PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \
737 PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \
738 PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \
739 PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \
740 PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \
741 PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \
742 PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \
743 PIN_OTYPE_PUSHPULL(GPIOE_PIN15))
744#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | \
745 PIN_OSPEED_VERYLOW(GPIOE_PIN1) | \
746 PIN_OSPEED_VERYLOW(GPIOE_PIN2) | \
747 PIN_OSPEED_VERYLOW(GPIOE_PIN3) | \
748 PIN_OSPEED_VERYLOW(GPIOE_PIN4) | \
749 PIN_OSPEED_VERYLOW(GPIOE_PIN5) | \
750 PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \
751 PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \
752 PIN_OSPEED_VERYLOW(GPIOE_PIN8) | \
753 PIN_OSPEED_VERYLOW(GPIOE_PIN9) | \
754 PIN_OSPEED_VERYLOW(GPIOE_PIN10) | \
755 PIN_OSPEED_VERYLOW(GPIOE_PIN11) | \
756 PIN_OSPEED_VERYLOW(GPIOE_PIN12) | \
757 PIN_OSPEED_VERYLOW(GPIOE_PIN13) | \
758 PIN_OSPEED_VERYLOW(GPIOE_PIN14) | \
759 PIN_OSPEED_VERYLOW(GPIOE_PIN15))
760#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \
761 PIN_PUPDR_PULLUP(GPIOE_PIN1) | \
762 PIN_PUPDR_PULLUP(GPIOE_PIN2) | \
763 PIN_PUPDR_PULLUP(GPIOE_PIN3) | \
764 PIN_PUPDR_PULLUP(GPIOE_PIN4) | \
765 PIN_PUPDR_PULLUP(GPIOE_PIN5) | \
766 PIN_PUPDR_PULLUP(GPIOE_PIN6) | \
767 PIN_PUPDR_PULLUP(GPIOE_PIN7) | \
768 PIN_PUPDR_PULLUP(GPIOE_PIN8) | \
769 PIN_PUPDR_PULLUP(GPIOE_PIN9) | \
770 PIN_PUPDR_PULLUP(GPIOE_PIN10) | \
771 PIN_PUPDR_PULLUP(GPIOE_PIN11) | \
772 PIN_PUPDR_PULLUP(GPIOE_PIN12) | \
773 PIN_PUPDR_PULLUP(GPIOE_PIN13) | \
774 PIN_PUPDR_PULLUP(GPIOE_PIN14) | \
775 PIN_PUPDR_PULLUP(GPIOE_PIN15))
776#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \
777 PIN_ODR_HIGH(GPIOE_PIN1) | \
778 PIN_ODR_HIGH(GPIOE_PIN2) | \
779 PIN_ODR_HIGH(GPIOE_PIN3) | \
780 PIN_ODR_HIGH(GPIOE_PIN4) | \
781 PIN_ODR_HIGH(GPIOE_PIN5) | \
782 PIN_ODR_HIGH(GPIOE_PIN6) | \
783 PIN_ODR_HIGH(GPIOE_PIN7) | \
784 PIN_ODR_HIGH(GPIOE_PIN8) | \
785 PIN_ODR_HIGH(GPIOE_PIN9) | \
786 PIN_ODR_HIGH(GPIOE_PIN10) | \
787 PIN_ODR_HIGH(GPIOE_PIN11) | \
788 PIN_ODR_HIGH(GPIOE_PIN12) | \
789 PIN_ODR_HIGH(GPIOE_PIN13) | \
790 PIN_ODR_HIGH(GPIOE_PIN14) | \
791 PIN_ODR_HIGH(GPIOE_PIN15))
792#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \
793 PIN_AFIO_AF(GPIOE_PIN1, 0U) | \
794 PIN_AFIO_AF(GPIOE_PIN2, 0U) | \
795 PIN_AFIO_AF(GPIOE_PIN3, 0U) | \
796 PIN_AFIO_AF(GPIOE_PIN4, 0U) | \
797 PIN_AFIO_AF(GPIOE_PIN5, 0U) | \
798 PIN_AFIO_AF(GPIOE_PIN6, 0U) | \
799 PIN_AFIO_AF(GPIOE_PIN7, 0U))
800#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \
801 PIN_AFIO_AF(GPIOE_PIN9, 0U) | \
802 PIN_AFIO_AF(GPIOE_PIN10, 0U) | \
803 PIN_AFIO_AF(GPIOE_PIN11, 0U) | \
804 PIN_AFIO_AF(GPIOE_PIN12, 0U) | \
805 PIN_AFIO_AF(GPIOE_PIN13, 0U) | \
806 PIN_AFIO_AF(GPIOE_PIN14, 0U) | \
807 PIN_AFIO_AF(GPIOE_PIN15, 0U))
808
809/*
810 * GPIOF setup:
811 *
812 * PF0 - OSC_IN (input floating).
813 * PF1 - OSC_OUT (input floating).
814 * PF2 - PIN2 (input pullup).
815 * PF3 - PIN3 (input pullup).
816 * PF4 - PIN4 (input pullup).
817 * PF5 - PIN5 (input pullup).
818 * PF6 - PIN6 (input pullup).
819 * PF7 - PIN7 (input pullup).
820 * PF8 - PIN8 (input pullup).
821 * PF9 - PIN9 (input pullup).
822 * PF10 - PIN10 (input pullup).
823 * PF11 - PIN11 (input pullup).
824 * PF12 - PIN12 (input pullup).
825 * PF13 - PIN13 (input pullup).
826 * PF14 - PIN14 (input pullup).
827 * PF15 - PIN15 (input pullup).
828 */
829#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_OSC_IN) | \
830 PIN_MODE_INPUT(GPIOF_OSC_OUT) | \
831 PIN_MODE_INPUT(GPIOF_PIN2) | \
832 PIN_MODE_INPUT(GPIOF_PIN3) | \
833 PIN_MODE_INPUT(GPIOF_PIN4) | \
834 PIN_MODE_INPUT(GPIOF_PIN5) | \
835 PIN_MODE_INPUT(GPIOF_PIN6) | \
836 PIN_MODE_INPUT(GPIOF_PIN7) | \
837 PIN_MODE_INPUT(GPIOF_PIN8) | \
838 PIN_MODE_INPUT(GPIOF_PIN9) | \
839 PIN_MODE_INPUT(GPIOF_PIN10) | \
840 PIN_MODE_INPUT(GPIOF_PIN11) | \
841 PIN_MODE_INPUT(GPIOF_PIN12) | \
842 PIN_MODE_INPUT(GPIOF_PIN13) | \
843 PIN_MODE_INPUT(GPIOF_PIN14) | \
844 PIN_MODE_INPUT(GPIOF_PIN15))
845#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_OSC_IN) | \
846 PIN_OTYPE_PUSHPULL(GPIOF_OSC_OUT) | \
847 PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \
848 PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \
849 PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \
850 PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \
851 PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \
852 PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \
853 PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \
854 PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \
855 PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \
856 PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \
857 PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \
858 PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \
859 PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \
860 PIN_OTYPE_PUSHPULL(GPIOF_PIN15))
861#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_OSC_IN) | \
862 PIN_OSPEED_VERYLOW(GPIOF_OSC_OUT) | \
863 PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \
864 PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \
865 PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \
866 PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \
867 PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \
868 PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \
869 PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \
870 PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \
871 PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \
872 PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \
873 PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \
874 PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \
875 PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \
876 PIN_OSPEED_VERYLOW(GPIOF_PIN15))
877#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_OSC_IN) | \
878 PIN_PUPDR_FLOATING(GPIOF_OSC_OUT) | \
879 PIN_PUPDR_PULLUP(GPIOF_PIN2) | \
880 PIN_PUPDR_PULLUP(GPIOF_PIN3) | \
881 PIN_PUPDR_PULLUP(GPIOF_PIN4) | \
882 PIN_PUPDR_PULLUP(GPIOF_PIN5) | \
883 PIN_PUPDR_PULLUP(GPIOF_PIN6) | \
884 PIN_PUPDR_PULLUP(GPIOF_PIN7) | \
885 PIN_PUPDR_PULLUP(GPIOF_PIN8) | \
886 PIN_PUPDR_PULLUP(GPIOF_PIN9) | \
887 PIN_PUPDR_PULLUP(GPIOF_PIN10) | \
888 PIN_PUPDR_PULLUP(GPIOF_PIN11) | \
889 PIN_PUPDR_PULLUP(GPIOF_PIN12) | \
890 PIN_PUPDR_PULLUP(GPIOF_PIN13) | \
891 PIN_PUPDR_PULLUP(GPIOF_PIN14) | \
892 PIN_PUPDR_PULLUP(GPIOF_PIN15))
893#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_OSC_IN) | \
894 PIN_ODR_HIGH(GPIOF_OSC_OUT) | \
895 PIN_ODR_HIGH(GPIOF_PIN2) | \
896 PIN_ODR_HIGH(GPIOF_PIN3) | \
897 PIN_ODR_HIGH(GPIOF_PIN4) | \
898 PIN_ODR_HIGH(GPIOF_PIN5) | \
899 PIN_ODR_HIGH(GPIOF_PIN6) | \
900 PIN_ODR_HIGH(GPIOF_PIN7) | \
901 PIN_ODR_HIGH(GPIOF_PIN8) | \
902 PIN_ODR_HIGH(GPIOF_PIN9) | \
903 PIN_ODR_HIGH(GPIOF_PIN10) | \
904 PIN_ODR_HIGH(GPIOF_PIN11) | \
905 PIN_ODR_HIGH(GPIOF_PIN12) | \
906 PIN_ODR_HIGH(GPIOF_PIN13) | \
907 PIN_ODR_HIGH(GPIOF_PIN14) | \
908 PIN_ODR_HIGH(GPIOF_PIN15))
909#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_OSC_IN, 0U) | \
910 PIN_AFIO_AF(GPIOF_OSC_OUT, 0U) | \
911 PIN_AFIO_AF(GPIOF_PIN2, 0U) | \
912 PIN_AFIO_AF(GPIOF_PIN3, 0U) | \
913 PIN_AFIO_AF(GPIOF_PIN4, 0U) | \
914 PIN_AFIO_AF(GPIOF_PIN5, 0U) | \
915 PIN_AFIO_AF(GPIOF_PIN6, 0U) | \
916 PIN_AFIO_AF(GPIOF_PIN7, 0U))
917#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \
918 PIN_AFIO_AF(GPIOF_PIN9, 0U) | \
919 PIN_AFIO_AF(GPIOF_PIN10, 0U) | \
920 PIN_AFIO_AF(GPIOF_PIN11, 0U) | \
921 PIN_AFIO_AF(GPIOF_PIN12, 0U) | \
922 PIN_AFIO_AF(GPIOF_PIN13, 0U) | \
923 PIN_AFIO_AF(GPIOF_PIN14, 0U) | \
924 PIN_AFIO_AF(GPIOF_PIN15, 0U))
925
926/*===========================================================================*/
927/* External declarations. */
928/*===========================================================================*/
929
930#if !defined(_FROM_ASM_)
931#ifdef __cplusplus
932extern "C" {
933#endif
934 void boardInit(void);
935#ifdef __cplusplus
936}
937#endif
938#endif /* _FROM_ASM_ */
939
940#endif /* BOARD_H */
diff --git a/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.mk b/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.mk
deleted file mode 100644
index b98dcdd26..000000000
--- a/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.mk
+++ /dev/null
@@ -1,5 +0,0 @@
1# List of all the board related files.
2BOARDSRC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY/board.c
3
4# Required include directories
5BOARDINC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY
diff --git a/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg b/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg
deleted file mode 100644
index 9c7cf4fd7..000000000
--- a/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/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>3.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/keyboards/projectkb/alice/bootloader_defs.h b/keyboards/projectkb/alice/bootloader_defs.h
deleted file mode 100644
index 02c48c4e6..000000000
--- a/keyboards/projectkb/alice/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/keyboards/projectkb/alice/config.h b/keyboards/projectkb/alice/config.h
index 61648dc7d..11863b807 100644
--- a/keyboards/projectkb/alice/config.h
+++ b/keyboards/projectkb/alice/config.h
@@ -33,6 +33,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
33#define MATRIX_ROW_PINS { B1, B0, A7, A5, A4 } 33#define MATRIX_ROW_PINS { B1, B0, A7, A5, A4 }
34#define DIODE_DIRECTION COL2ROW 34#define DIODE_DIRECTION COL2ROW
35 35
36#define BACKLIGHT_PIN A6
37#define BACKLIGHT_PWM_DRIVER PWMD3
38#define BACKLIGHT_PWM_CHANNEL 1
39#define BACKLIGHT_PAL_MODE 1
36#define BACKLIGHT_LEVELS 6 40#define BACKLIGHT_LEVELS 6
37#define BACKLIGHT_BREATHING 41#define BACKLIGHT_BREATHING
38#define BREATHING_PERIOD 6 42#define BREATHING_PERIOD 6
@@ -52,16 +56,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
52#define RGB_DI_PIN B15 56#define RGB_DI_PIN B15
53#define RGBLED_NUM 14 57#define RGBLED_NUM 14
54#define WS2812_SPI SPID2 58#define WS2812_SPI SPID2
59#define WS2812_SPI_MOSI_PAL_MODE 0
55 60
56// Backlight config starts after VIA's EEPROM usage,
57// dynamic keymaps start after this.
58#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1
59
60// VIA lighting is handled by the keyboard-level code
61#define VIA_CUSTOM_LIGHTING_ENABLE
62
63// Let VIA handle the QMK RGBLIGHT
64#define VIA_QMK_RGBLIGHT_ENABLE
65 61
66// 2 bits for 4 layout options 62// 2 bits for 4 layout options
67#define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2 63#define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2
diff --git a/keyboards/projectkb/alice/keymaps/via/keymap.c b/keyboards/projectkb/alice/keymaps/via/keymap.c
index a75bb8d97..ff084d1fc 100644
--- a/keyboards/projectkb/alice/keymaps/via/keymap.c
+++ b/keyboards/projectkb/alice/keymaps/via/keymap.c
@@ -52,5 +52,5 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
52 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 52 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
53 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS 53 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
54 ) 54 )
55 55
56}; 56};
diff --git a/keyboards/projectkb/alice/rules.mk b/keyboards/projectkb/alice/rules.mk
index 3bb6531af..0f9d71b89 100644
--- a/keyboards/projectkb/alice/rules.mk
+++ b/keyboards/projectkb/alice/rules.mk
@@ -1,17 +1,11 @@
1# MCU name 1# MCU name
2MCU = STM32F072 2MCU = STM32F072
3BOARD = ST_STM32F072B_DISCOVERY
4 3
5# Build Options 4# Build Options
6# comment out to disable the options. 5# comment out to disable the options.
7# 6#
8 7
9# project specific files 8BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
10VPATH += keyboards/cannonkeys/stm32f072
11SRC = keyboard.c \
12 led.c
13
14BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
15MOUSEKEY_ENABLE = yes # Mouse keys 9MOUSEKEY_ENABLE = yes # Mouse keys
16EXTRAKEY_ENABLE = yes # Audio control and System control 10EXTRAKEY_ENABLE = yes # Audio control and System control
17CONSOLE_ENABLE = yes # Console for debug 11CONSOLE_ENABLE = yes # Console for debug
@@ -19,13 +13,10 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
19SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend 13SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
20NKRO_ENABLE = yes # USB Nkey Rollover 14NKRO_ENABLE = yes # USB Nkey Rollover
21CUSTOM_MATRIX = no # Custom matrix file 15CUSTOM_MATRIX = no # Custom matrix file
22# BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason 16BACKLIGHT_ENABLE = yes
23RGBLIGHT_ENABLE = yes 17RGBLIGHT_ENABLE = yes
24WS2812_DRIVER = spi 18WS2812_DRIVER = spi
25 19
26# RAW_ENABLE = yes
27# DYNAMIC_KEYMAP_ENABLE = yes
28
29 20
30# Enter lower-power sleep mode when on the ChibiOS idle thread 21# Enter lower-power sleep mode when on the ChibiOS idle thread
31OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE 22OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE