diff options
| author | Nick Brassel <nick@tzarc.org> | 2020-06-06 18:52:19 +1000 |
|---|---|---|
| committer | James Young <18669334+noroadsleft@users.noreply.github.com> | 2020-08-29 14:30:02 -0700 |
| commit | 385d49cc39b57e74203e0c1c78c0789d249e4742 (patch) | |
| tree | dbd8b3f7bc30a9d40d51ffaa5cd5a93d5eb47359 /drivers | |
| parent | 5cc3ab38c9148cd6bc7ccdba176a88fbb95653b1 (diff) | |
| download | qmk_firmware-385d49cc39b57e74203e0c1c78c0789d249e4742.tar.gz qmk_firmware-385d49cc39b57e74203e0c1c78c0789d249e4742.zip | |
Initial work for consolidation of ChibiOS platform files (#8327)
* Initial work for consolidation of board files and default ChibiOS configs.
* Migrate F401/F411 black pills for testing.
* Add early init bootloader jump flag.
* Add support for I2C in order to use i2c_scanner keymap.
* Add F401/F411 HSE bypass to get things booting.
* Exempt "hooked" ChibiOS conf files from updater script.
* Fix up ordering for bootloader_defs file check.
* Match previous $(KEYBOARD_PATHS) value for Proton-C, updated for all board configs.
Diffstat (limited to 'drivers')
28 files changed, 0 insertions, 7071 deletions
diff --git a/drivers/boards/BLACKPILL_STM32_F401/board.c b/drivers/boards/BLACKPILL_STM32_F401/board.c deleted file mode 100644 index 330e06c8a..000000000 --- a/drivers/boards/BLACKPILL_STM32_F401/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 | */ | ||
| 40 | typedef struct { | ||
| 41 | uint32_t moder; | ||
| 42 | uint32_t otyper; | ||
| 43 | uint32_t ospeedr; | ||
| 44 | uint32_t pupdr; | ||
| 45 | uint32_t odr; | ||
| 46 | uint32_t afrl; | ||
| 47 | uint32_t afrh; | ||
| 48 | } gpio_setup_t; | ||
| 49 | |||
| 50 | /** | ||
| 51 | * @brief Type of STM32 GPIO initialization data. | ||
| 52 | */ | ||
| 53 | typedef 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 | */ | ||
| 92 | static 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 | |||
| 132 | static 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 | |||
| 142 | static void stm32_gpio_init(void) { | ||
| 143 | /* Enabling GPIO-related clocks, the mask comes from the | ||
| 144 | registry header file.*/ | ||
| 145 | rccResetAHB1(STM32_GPIO_EN_MASK); | ||
| 146 | rccEnableAHB1(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 | */ | ||
| 199 | void __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 | */ | ||
| 210 | bool 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 | */ | ||
| 219 | bool 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 | */ | ||
| 230 | bool 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 | */ | ||
| 239 | bool 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 | */ | ||
| 250 | void boardInit(void) {} | ||
diff --git a/drivers/boards/BLACKPILL_STM32_F401/board.h b/drivers/boards/BLACKPILL_STM32_F401/board.h deleted file mode 100644 index 2d1cd9ff7..000000000 --- a/drivers/boards/BLACKPILL_STM32_F401/board.h +++ /dev/null | |||
| @@ -1,568 +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 STM32F401CCU6 black pill board. | ||
| 31 | */ | ||
| 32 | |||
| 33 | /* | ||
| 34 | * Board identifier. | ||
| 35 | */ | ||
| 36 | #define BOARD_BLACKPILL_STM32_F401 | ||
| 37 | #define BOARD_NAME "STM32F401CCU6 blackpill" | ||
| 38 | |||
| 39 | /* | ||
| 40 | * Allow Board to boot USB without extra A9 hardware/software config | ||
| 41 | */ | ||
| 42 | #define BOARD_OTG_NOVBUSSENS 1 | ||
| 43 | |||
| 44 | /* | ||
| 45 | * Board oscillators-related settings. | ||
| 46 | */ | ||
| 47 | #if !defined(STM32_LSECLK) | ||
| 48 | # define STM32_LSECLK 32768U | ||
| 49 | #endif | ||
| 50 | |||
| 51 | #if !defined(STM32_HSECLK) | ||
| 52 | # define STM32_HSECLK 25000000U | ||
| 53 | #endif | ||
| 54 | |||
| 55 | /* | ||
| 56 | * Board voltages. | ||
| 57 | * Required for performance limits calculation. | ||
| 58 | */ | ||
| 59 | #define STM32_VDD 300U | ||
| 60 | |||
| 61 | /* | ||
| 62 | * MCU type as defined in the ST header. | ||
| 63 | */ | ||
| 64 | #define STM32F401xC | ||
| 65 | |||
| 66 | /* | ||
| 67 | * IO pins assignments. | ||
| 68 | */ | ||
| 69 | #define GPIOA_BUTTON 0U | ||
| 70 | #define GPIOA_PIN1 1U | ||
| 71 | #define GPIOA_PIN2 2U | ||
| 72 | #define GPIOA_PIN3 3U | ||
| 73 | #define GPIOA_CS43L22_LRCK 4U | ||
| 74 | #define GPIOA_L3GD20_SCL 5U | ||
| 75 | #define GPIOA_L3GD20_SD0 6U | ||
| 76 | #define GPIOA_L3GD20_SDI 7U | ||
| 77 | #define GPIOA_PIN8 8U | ||
| 78 | #define GPIOA_VBUS_FS 9U | ||
| 79 | #define GPIOA_OTG_FS_ID 10U | ||
| 80 | #define GPIOA_OTG_FS_DM 11U | ||
| 81 | #define GPIOA_OTG_FS_DP 12U | ||
| 82 | #define GPIOA_SWDIO 13U | ||
| 83 | #define GPIOA_SWCLK 14U | ||
| 84 | #define GPIOA_PIN15 15U | ||
| 85 | |||
| 86 | #define GPIOB_PIN0 0U | ||
| 87 | #define GPIOB_PIN1 1U | ||
| 88 | #define GPIOB_PIN2 2U | ||
| 89 | #define GPIOB_SWO 3U | ||
| 90 | #define GPIOB_PIN4 4U | ||
| 91 | #define GPIOB_PIN5 5U | ||
| 92 | #define GPIOB_LSM303DLHC_SCL 6U | ||
| 93 | #define GPIOB_PIN7 7U | ||
| 94 | #define GPIOB_PIN8 8U | ||
| 95 | #define GPIOB_LSM303DLHC_SDA 9U | ||
| 96 | #define GPIOB_MP45DT02_CLK_IN 10U | ||
| 97 | #define GPIOB_PIN11 11U | ||
| 98 | #define GPIOB_PIN12 12U | ||
| 99 | #define GPIOB_PIN13 13U | ||
| 100 | #define GPIOB_PIN14 14U | ||
| 101 | #define GPIOB_PIN15 15U | ||
| 102 | |||
| 103 | #define GPIOC_OTG_FS_POWER_ON 0U | ||
| 104 | #define GPIOC_PIN1 1U | ||
| 105 | #define GPIOC_PIN2 2U | ||
| 106 | #define GPIOC_CS43L22_AIN4x 3U | ||
| 107 | #define GPIOC_MP45DT02_PDM_OUT 3U | ||
| 108 | #define GPIOC_PIN4 4U | ||
| 109 | #define GPIOC_PIN5 5U | ||
| 110 | #define GPIOC_PIN6 6U | ||
| 111 | #define GPIOC_CS43L22_MCLK 7U | ||
| 112 | #define GPIOC_PIN8 8U | ||
| 113 | #define GPIOC_PIN9 9U | ||
| 114 | #define GPIOC_CS43L22_SCLK 10U | ||
| 115 | #define GPIOC_PIN11 11U | ||
| 116 | #define GPIOC_CS43L22_SDIN 12U | ||
| 117 | #define GPIOC_PIN13 13U | ||
| 118 | #define GPIOC_OSC32_IN 14U | ||
| 119 | #define GPIOC_OSC32_OUT 15U | ||
| 120 | |||
| 121 | #define GPIOD_PIN0 0U | ||
| 122 | #define GPIOD_PIN1 1U | ||
| 123 | #define GPIOD_PIN2 2U | ||
| 124 | #define GPIOD_PIN3 3U | ||
| 125 | #define GPIOD_CS43L22_RESET 4U | ||
| 126 | #define GPIOD_OverCurrent 5U | ||
| 127 | #define GPIOD_PIN6 6U | ||
| 128 | #define GPIOD_PIN7 7U | ||
| 129 | #define GPIOD_PIN8 8U | ||
| 130 | #define GPIOD_PIN9 9U | ||
| 131 | #define GPIOD_PIN10 10U | ||
| 132 | #define GPIOD_PIN11 11U | ||
| 133 | #define GPIOD_LED4 12U | ||
| 134 | #define GPIOD_LED3 13U | ||
| 135 | #define GPIOD_LED5 14U | ||
| 136 | #define GPIOD_LED6 15U | ||
| 137 | |||
| 138 | #define GPIOE_L3GD20_INT1 0U | ||
| 139 | #define GPIOE_L3GD20_INT2 1U | ||
| 140 | #define GPIOE_LSM303DLHC_DRDY 2U | ||
| 141 | #define GPIOE_L3GD20_CS 3U | ||
| 142 | #define GPIOE_LSM303DLHC_INT1 4U | ||
| 143 | #define GPIOE_LSM303DLHC_INT2 5U | ||
| 144 | #define GPIOE_PIN6 6U | ||
| 145 | #define GPIOE_PIN7 7U | ||
| 146 | #define GPIOE_PIN8 8U | ||
| 147 | #define GPIOE_PIN9 9U | ||
| 148 | #define GPIOE_PIN10 10U | ||
| 149 | #define GPIOE_PIN11 11U | ||
| 150 | #define GPIOE_PIN12 12U | ||
| 151 | #define GPIOE_PIN13 13U | ||
| 152 | #define GPIOE_PIN14 14U | ||
| 153 | #define GPIOE_PIN15 15U | ||
| 154 | |||
| 155 | #define GPIOF_PIN0 0U | ||
| 156 | #define GPIOF_PIN1 1U | ||
| 157 | #define GPIOF_PIN2 2U | ||
| 158 | #define GPIOF_PIN3 3U | ||
| 159 | #define GPIOF_PIN4 4U | ||
| 160 | #define GPIOF_PIN5 5U | ||
| 161 | #define GPIOF_PIN6 6U | ||
| 162 | #define GPIOF_PIN7 7U | ||
| 163 | #define GPIOF_PIN8 8U | ||
| 164 | #define GPIOF_PIN9 9U | ||
| 165 | #define GPIOF_PIN10 10U | ||
| 166 | #define GPIOF_PIN11 11U | ||
| 167 | #define GPIOF_PIN12 12U | ||
| 168 | #define GPIOF_PIN13 13U | ||
| 169 | #define GPIOF_PIN14 14U | ||
| 170 | #define GPIOF_PIN15 15U | ||
| 171 | |||
| 172 | #define GPIOG_PIN0 0U | ||
| 173 | #define GPIOG_PIN1 1U | ||
| 174 | #define GPIOG_PIN2 2U | ||
| 175 | #define GPIOG_PIN3 3U | ||
| 176 | #define GPIOG_PIN4 4U | ||
| 177 | #define GPIOG_PIN5 5U | ||
| 178 | #define GPIOG_PIN6 6U | ||
| 179 | #define GPIOG_PIN7 7U | ||
| 180 | #define GPIOG_PIN8 8U | ||
| 181 | #define GPIOG_PIN9 9U | ||
| 182 | #define GPIOG_PIN10 10U | ||
| 183 | #define GPIOG_PIN11 11U | ||
| 184 | #define GPIOG_PIN12 12U | ||
| 185 | #define GPIOG_PIN13 13U | ||
| 186 | #define GPIOG_PIN14 14U | ||
| 187 | #define GPIOG_PIN15 15U | ||
| 188 | |||
| 189 | #define GPIOH_OSC_IN 0U | ||
| 190 | #define GPIOH_OSC_OUT 1U | ||
| 191 | #define GPIOH_PIN2 2U | ||
| 192 | #define GPIOH_PIN3 3U | ||
| 193 | #define GPIOH_PIN4 4U | ||
| 194 | #define GPIOH_PIN5 5U | ||
| 195 | #define GPIOH_PIN6 6U | ||
| 196 | #define GPIOH_PIN7 7U | ||
| 197 | #define GPIOH_PIN8 8U | ||
| 198 | #define GPIOH_PIN9 9U | ||
| 199 | #define GPIOH_PIN10 10U | ||
| 200 | #define GPIOH_PIN11 11U | ||
| 201 | #define GPIOH_PIN12 12U | ||
| 202 | #define GPIOH_PIN13 13U | ||
| 203 | #define GPIOH_PIN14 14U | ||
| 204 | #define GPIOH_PIN15 15U | ||
| 205 | |||
| 206 | #define GPIOI_PIN0 0U | ||
| 207 | #define GPIOI_PIN1 1U | ||
| 208 | #define GPIOI_PIN2 2U | ||
| 209 | #define GPIOI_PIN3 3U | ||
| 210 | #define GPIOI_PIN4 4U | ||
| 211 | #define GPIOI_PIN5 5U | ||
| 212 | #define GPIOI_PIN6 6U | ||
| 213 | #define GPIOI_PIN7 7U | ||
| 214 | #define GPIOI_PIN8 8U | ||
| 215 | #define GPIOI_PIN9 9U | ||
| 216 | #define GPIOI_PIN10 10U | ||
| 217 | #define GPIOI_PIN11 11U | ||
| 218 | #define GPIOI_PIN12 12U | ||
| 219 | #define GPIOI_PIN13 13U | ||
| 220 | #define GPIOI_PIN14 14U | ||
| 221 | #define GPIOI_PIN15 15U | ||
| 222 | |||
| 223 | /* | ||
| 224 | * IO lines assignments. | ||
| 225 | */ | ||
| 226 | #define LINE_BUTTON PAL_LINE(GPIOA, 0U) | ||
| 227 | #define LINE_CS43L22_LRCK PAL_LINE(GPIOA, 4U) | ||
| 228 | #define LINE_L3GD20_SCL PAL_LINE(GPIOA, 5U) | ||
| 229 | #define LINE_L3GD20_SD0 PAL_LINE(GPIOA, 6U) | ||
| 230 | #define LINE_L3GD20_SDI PAL_LINE(GPIOA, 7U) | ||
| 231 | #define LINE_VBUS_FS PAL_LINE(GPIOA, 9U) | ||
| 232 | #define LINE_OTG_FS_ID PAL_LINE(GPIOA, 10U) | ||
| 233 | #define LINE_OTG_FS_DM PAL_LINE(GPIOA, 11U) | ||
| 234 | #define LINE_OTG_FS_DP PAL_LINE(GPIOA, 12U) | ||
| 235 | #define LINE_SWDIO PAL_LINE(GPIOA, 13U) | ||
| 236 | #define LINE_SWCLK PAL_LINE(GPIOA, 14U) | ||
| 237 | #define LINE_SWO PAL_LINE(GPIOB, 3U) | ||
| 238 | #define LINE_LSM303DLHC_SCL PAL_LINE(GPIOB, 6U) | ||
| 239 | #define LINE_LSM303DLHC_SDA PAL_LINE(GPIOB, 9U) | ||
| 240 | #define LINE_MP45DT02_CLK_IN PAL_LINE(GPIOB, 10U) | ||
| 241 | #define LINE_OTG_FS_POWER_ON PAL_LINE(GPIOC, 0U) | ||
| 242 | #define LINE_CS43L22_AIN4x PAL_LINE(GPIOC, 3U) | ||
| 243 | #define LINE_MP45DT02_PDM_OUT PAL_LINE(GPIOC, 3U) | ||
| 244 | #define LINE_CS43L22_MCLK PAL_LINE(GPIOC, 7U) | ||
| 245 | #define LINE_CS43L22_SCLK PAL_LINE(GPIOC, 10U) | ||
| 246 | #define LINE_CS43L22_SDIN PAL_LINE(GPIOC, 12U) | ||
| 247 | #define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) | ||
| 248 | #define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) | ||
| 249 | #define LINE_CS43L22_RESET PAL_LINE(GPIOD, 4U) | ||
| 250 | #define LINE_OverCurrent PAL_LINE(GPIOD, 5U) | ||
| 251 | #define LINE_LED4 PAL_LINE(GPIOD, 12U) | ||
| 252 | #define LINE_LED3 PAL_LINE(GPIOD, 13U) | ||
| 253 | #define LINE_LED5 PAL_LINE(GPIOD, 14U) | ||
| 254 | #define LINE_LED6 PAL_LINE(GPIOD, 15U) | ||
| 255 | #define LINE_L3GD20_INT1 PAL_LINE(GPIOE, 0U) | ||
| 256 | #define LINE_L3GD20_INT2 PAL_LINE(GPIOE, 1U) | ||
| 257 | #define LINE_LSM303DLHC_DRDY PAL_LINE(GPIOE, 2U) | ||
| 258 | #define LINE_L3GD20_CS PAL_LINE(GPIOE, 3U) | ||
| 259 | #define LINE_LSM303DLHC_INT1 PAL_LINE(GPIOE, 4U) | ||
| 260 | #define LINE_LSM303DLHC_INT2 PAL_LINE(GPIOE, 5U) | ||
| 261 | #define LINE_OSC_IN PAL_LINE(GPIOH, 0U) | ||
| 262 | #define LINE_OSC_OUT PAL_LINE(GPIOH, 1U) | ||
| 263 | |||
| 264 | /*===========================================================================*/ | ||
| 265 | /* Driver pre-compile time settings. */ | ||
| 266 | /*===========================================================================*/ | ||
| 267 | |||
| 268 | /*===========================================================================*/ | ||
| 269 | /* Derived constants and error checks. */ | ||
| 270 | /*===========================================================================*/ | ||
| 271 | |||
| 272 | /*===========================================================================*/ | ||
| 273 | /* Driver data structures and types. */ | ||
| 274 | /*===========================================================================*/ | ||
| 275 | |||
| 276 | /*===========================================================================*/ | ||
| 277 | /* Driver macros. */ | ||
| 278 | /*===========================================================================*/ | ||
| 279 | |||
| 280 | /* | ||
| 281 | * I/O ports initial setup, this configuration is established soon after reset | ||
| 282 | * in the initialization code. | ||
| 283 | * Please refer to the STM32 Reference Manual for details. | ||
| 284 | */ | ||
| 285 | #define PIN_MODE_INPUT(n) (0U << ((n)*2U)) | ||
| 286 | #define PIN_MODE_OUTPUT(n) (1U << ((n)*2U)) | ||
| 287 | #define PIN_MODE_ALTERNATE(n) (2U << ((n)*2U)) | ||
| 288 | #define PIN_MODE_ANALOG(n) (3U << ((n)*2U)) | ||
| 289 | #define PIN_ODR_LOW(n) (0U << (n)) | ||
| 290 | #define PIN_ODR_HIGH(n) (1U << (n)) | ||
| 291 | #define PIN_OTYPE_PUSHPULL(n) (0U << (n)) | ||
| 292 | #define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) | ||
| 293 | #define PIN_OSPEED_VERYLOW(n) (0U << ((n)*2U)) | ||
| 294 | #define PIN_OSPEED_LOW(n) (1U << ((n)*2U)) | ||
| 295 | #define PIN_OSPEED_MEDIUM(n) (2U << ((n)*2U)) | ||
| 296 | #define PIN_OSPEED_HIGH(n) (3U << ((n)*2U)) | ||
| 297 | #define PIN_PUPDR_FLOATING(n) (0U << ((n)*2U)) | ||
| 298 | #define PIN_PUPDR_PULLUP(n) (1U << ((n)*2U)) | ||
| 299 | #define PIN_PUPDR_PULLDOWN(n) (2U << ((n)*2U)) | ||
| 300 | #define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) | ||
| 301 | |||
| 302 | /* | ||
| 303 | * GPIOA setup: | ||
| 304 | * | ||
| 305 | * PA0 - BUTTON (input floating). | ||
| 306 | * PA1 - PIN1 (input pullup). | ||
| 307 | * PA2 - PIN2 (input pullup). | ||
| 308 | * PA3 - PIN3 (input pullup). | ||
| 309 | * PA4 - CS43L22_LRCK (alternate 6). | ||
| 310 | * PA5 - L3GD20_SCL (alternate 5). | ||
| 311 | * PA6 - L3GD20_SD0 (alternate 5). | ||
| 312 | * PA7 - L3GD20_SDI (alternate 5). | ||
| 313 | * PA8 - PIN8 (input pullup). | ||
| 314 | * PA9 - VBUS_FS (input floating). | ||
| 315 | * PA10 - OTG_FS_ID (alternate 10). | ||
| 316 | * PA11 - OTG_FS_DM (alternate 10). | ||
| 317 | * PA12 - OTG_FS_DP (alternate 10). | ||
| 318 | * PA13 - SWDIO (alternate 0). | ||
| 319 | * PA14 - SWCLK (alternate 0). | ||
| 320 | * PA15 - PIN15 (input pullup). | ||
| 321 | */ | ||
| 322 | #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_ALTERNATE(GPIOA_CS43L22_LRCK) | PIN_MODE_ALTERNATE(GPIOA_L3GD20_SCL) | PIN_MODE_ALTERNATE(GPIOA_L3GD20_SD0) | PIN_MODE_ALTERNATE(GPIOA_L3GD20_SDI) | PIN_MODE_INPUT(GPIOA_PIN8) | PIN_MODE_INPUT(GPIOA_VBUS_FS) | PIN_MODE_ALTERNATE(GPIOA_OTG_FS_ID) | PIN_MODE_ALTERNATE(GPIOA_OTG_FS_DM) | PIN_MODE_ALTERNATE(GPIOA_OTG_FS_DP) | PIN_MODE_ALTERNATE(GPIOA_SWDIO) | PIN_MODE_ALTERNATE(GPIOA_SWCLK) | PIN_MODE_INPUT(GPIOA_PIN15)) | ||
| 323 | #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_CS43L22_LRCK) | PIN_OTYPE_PUSHPULL(GPIOA_L3GD20_SCL) | PIN_OTYPE_PUSHPULL(GPIOA_L3GD20_SD0) | PIN_OTYPE_PUSHPULL(GPIOA_L3GD20_SDI) | PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | PIN_OTYPE_PUSHPULL(GPIOA_VBUS_FS) | PIN_OTYPE_PUSHPULL(GPIOA_OTG_FS_ID) | PIN_OTYPE_PUSHPULL(GPIOA_OTG_FS_DM) | PIN_OTYPE_PUSHPULL(GPIOA_OTG_FS_DP) | PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) | ||
| 324 | #define VAL_GPIOA_OSPEEDR (PIN_OSPEED_HIGH(GPIOA_BUTTON) | PIN_OSPEED_HIGH(GPIOA_PIN1) | PIN_OSPEED_HIGH(GPIOA_PIN2) | PIN_OSPEED_HIGH(GPIOA_PIN3) | PIN_OSPEED_HIGH(GPIOA_CS43L22_LRCK) | PIN_OSPEED_HIGH(GPIOA_L3GD20_SCL) | PIN_OSPEED_HIGH(GPIOA_L3GD20_SD0) | PIN_OSPEED_HIGH(GPIOA_L3GD20_SDI) | PIN_OSPEED_HIGH(GPIOA_PIN8) | PIN_OSPEED_HIGH(GPIOA_VBUS_FS) | PIN_OSPEED_HIGH(GPIOA_OTG_FS_ID) | PIN_OSPEED_HIGH(GPIOA_OTG_FS_DM) | PIN_OSPEED_HIGH(GPIOA_OTG_FS_DP) | PIN_OSPEED_HIGH(GPIOA_SWDIO) | PIN_OSPEED_HIGH(GPIOA_SWCLK) | PIN_OSPEED_HIGH(GPIOA_PIN15)) | ||
| 325 | #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_FLOATING(GPIOA_CS43L22_LRCK) | PIN_PUPDR_FLOATING(GPIOA_L3GD20_SCL) | PIN_PUPDR_PULLUP(GPIOA_L3GD20_SD0) | PIN_PUPDR_PULLUP(GPIOA_L3GD20_SDI) | PIN_PUPDR_PULLUP(GPIOA_PIN8) | PIN_PUPDR_FLOATING(GPIOA_VBUS_FS) | PIN_PUPDR_FLOATING(GPIOA_OTG_FS_ID) | PIN_PUPDR_FLOATING(GPIOA_OTG_FS_DM) | PIN_PUPDR_FLOATING(GPIOA_OTG_FS_DP) | PIN_PUPDR_FLOATING(GPIOA_SWDIO) | PIN_PUPDR_FLOATING(GPIOA_SWCLK) | PIN_PUPDR_PULLUP(GPIOA_PIN15)) | ||
| 326 | #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_CS43L22_LRCK) | PIN_ODR_HIGH(GPIOA_L3GD20_SCL) | PIN_ODR_HIGH(GPIOA_L3GD20_SD0) | PIN_ODR_HIGH(GPIOA_L3GD20_SDI) | PIN_ODR_HIGH(GPIOA_PIN8) | PIN_ODR_HIGH(GPIOA_VBUS_FS) | PIN_ODR_HIGH(GPIOA_OTG_FS_ID) | PIN_ODR_HIGH(GPIOA_OTG_FS_DM) | PIN_ODR_HIGH(GPIOA_OTG_FS_DP) | PIN_ODR_HIGH(GPIOA_SWDIO) | PIN_ODR_HIGH(GPIOA_SWCLK) | PIN_ODR_HIGH(GPIOA_PIN15)) | ||
| 327 | #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_CS43L22_LRCK, 6U) | PIN_AFIO_AF(GPIOA_L3GD20_SCL, 5U) | PIN_AFIO_AF(GPIOA_L3GD20_SD0, 5U) | PIN_AFIO_AF(GPIOA_L3GD20_SDI, 5U)) | ||
| 328 | #define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | PIN_AFIO_AF(GPIOA_VBUS_FS, 0U) | PIN_AFIO_AF(GPIOA_OTG_FS_ID, 10U) | PIN_AFIO_AF(GPIOA_OTG_FS_DM, 10U) | PIN_AFIO_AF(GPIOA_OTG_FS_DP, 10U) | PIN_AFIO_AF(GPIOA_SWDIO, 0U) | PIN_AFIO_AF(GPIOA_SWCLK, 0U) | PIN_AFIO_AF(GPIOA_PIN15, 0U)) | ||
| 329 | |||
| 330 | /* | ||
| 331 | * GPIOB setup: | ||
| 332 | * | ||
| 333 | * PB0 - PIN0 (input pullup). | ||
| 334 | * PB1 - PIN1 (input pullup). | ||
| 335 | * PB2 - PIN2 (input pullup). | ||
| 336 | * PB3 - SWO (alternate 0). | ||
| 337 | * PB4 - PIN4 (input pullup). | ||
| 338 | * PB5 - PIN5 (input pullup). | ||
| 339 | * PB6 - LSM303DLHC_SCL (alternate 4). | ||
| 340 | * PB7 - PIN7 (input pullup). | ||
| 341 | * PB8 - PIN8 (input pullup). | ||
| 342 | * PB9 - LSM303DLHC_SDA (alternate 4). | ||
| 343 | * PB10 - MP45DT02_CLK_IN (alternate 5). | ||
| 344 | * PB11 - PIN11 (input pullup). | ||
| 345 | * PB12 - PIN12 (input pullup). | ||
| 346 | * PB13 - PIN13 (input pullup). | ||
| 347 | * PB14 - PIN14 (input pullup). | ||
| 348 | * PB15 - PIN15 (input pullup). | ||
| 349 | */ | ||
| 350 | #define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | PIN_MODE_INPUT(GPIOB_PIN1) | PIN_MODE_INPUT(GPIOB_PIN2) | PIN_MODE_ALTERNATE(GPIOB_SWO) | PIN_MODE_INPUT(GPIOB_PIN4) | PIN_MODE_INPUT(GPIOB_PIN5) | PIN_MODE_ALTERNATE(GPIOB_LSM303DLHC_SCL) | PIN_MODE_INPUT(GPIOB_PIN7) | PIN_MODE_INPUT(GPIOB_PIN8) | PIN_MODE_ALTERNATE(GPIOB_LSM303DLHC_SDA) | PIN_MODE_ALTERNATE(GPIOB_MP45DT02_CLK_IN) | PIN_MODE_INPUT(GPIOB_PIN11) | PIN_MODE_INPUT(GPIOB_PIN12) | PIN_MODE_INPUT(GPIOB_PIN13) | PIN_MODE_INPUT(GPIOB_PIN14) | PIN_MODE_INPUT(GPIOB_PIN15)) | ||
| 351 | #define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | PIN_OTYPE_PUSHPULL(GPIOB_SWO) | PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | PIN_OTYPE_PUSHPULL(GPIOB_LSM303DLHC_SCL) | PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | PIN_OTYPE_PUSHPULL(GPIOB_LSM303DLHC_SDA) | PIN_OTYPE_PUSHPULL(GPIOB_MP45DT02_CLK_IN) | PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | PIN_OTYPE_PUSHPULL(GPIOB_PIN13) | PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) | ||
| 352 | #define VAL_GPIOB_OSPEEDR (PIN_OSPEED_HIGH(GPIOB_PIN0) | PIN_OSPEED_HIGH(GPIOB_PIN1) | PIN_OSPEED_HIGH(GPIOB_PIN2) | PIN_OSPEED_HIGH(GPIOB_SWO) | PIN_OSPEED_HIGH(GPIOB_PIN4) | PIN_OSPEED_HIGH(GPIOB_PIN5) | PIN_OSPEED_HIGH(GPIOB_LSM303DLHC_SCL) | PIN_OSPEED_HIGH(GPIOB_PIN7) | PIN_OSPEED_HIGH(GPIOB_PIN8) | PIN_OSPEED_HIGH(GPIOB_LSM303DLHC_SDA) | PIN_OSPEED_HIGH(GPIOB_MP45DT02_CLK_IN) | PIN_OSPEED_HIGH(GPIOB_PIN11) | PIN_OSPEED_HIGH(GPIOB_PIN12) | PIN_OSPEED_HIGH(GPIOB_PIN13) | PIN_OSPEED_HIGH(GPIOB_PIN14) | PIN_OSPEED_HIGH(GPIOB_PIN15)) | ||
| 353 | #define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | PIN_PUPDR_PULLUP(GPIOB_PIN1) | PIN_PUPDR_PULLUP(GPIOB_PIN2) | PIN_PUPDR_PULLUP(GPIOB_SWO) | PIN_PUPDR_PULLUP(GPIOB_PIN4) | PIN_PUPDR_PULLUP(GPIOB_PIN5) | PIN_PUPDR_FLOATING(GPIOB_LSM303DLHC_SCL) | PIN_PUPDR_PULLUP(GPIOB_PIN7) | PIN_PUPDR_PULLUP(GPIOB_PIN8) | PIN_PUPDR_FLOATING(GPIOB_LSM303DLHC_SDA) | PIN_PUPDR_FLOATING(GPIOB_MP45DT02_CLK_IN) | PIN_PUPDR_PULLUP(GPIOB_PIN11) | PIN_PUPDR_PULLUP(GPIOB_PIN12) | PIN_PUPDR_PULLUP(GPIOB_PIN13) | PIN_PUPDR_PULLUP(GPIOB_PIN14) | PIN_PUPDR_PULLUP(GPIOB_PIN15)) | ||
| 354 | #define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | PIN_ODR_HIGH(GPIOB_PIN1) | PIN_ODR_HIGH(GPIOB_PIN2) | PIN_ODR_HIGH(GPIOB_SWO) | PIN_ODR_HIGH(GPIOB_PIN4) | PIN_ODR_HIGH(GPIOB_PIN5) | PIN_ODR_HIGH(GPIOB_LSM303DLHC_SCL) | PIN_ODR_HIGH(GPIOB_PIN7) | PIN_ODR_HIGH(GPIOB_PIN8) | PIN_ODR_HIGH(GPIOB_LSM303DLHC_SDA) | PIN_ODR_HIGH(GPIOB_MP45DT02_CLK_IN) | PIN_ODR_HIGH(GPIOB_PIN11) | PIN_ODR_HIGH(GPIOB_PIN12) | PIN_ODR_HIGH(GPIOB_PIN13) | PIN_ODR_HIGH(GPIOB_PIN14) | PIN_ODR_HIGH(GPIOB_PIN15)) | ||
| 355 | #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_SWO, 0U) | PIN_AFIO_AF(GPIOB_PIN4, 0U) | PIN_AFIO_AF(GPIOB_PIN5, 0U) | PIN_AFIO_AF(GPIOB_LSM303DLHC_SCL, 4U) | PIN_AFIO_AF(GPIOB_PIN7, 0U)) | ||
| 356 | #define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | PIN_AFIO_AF(GPIOB_LSM303DLHC_SDA, 4U) | PIN_AFIO_AF(GPIOB_MP45DT02_CLK_IN, 5U) | PIN_AFIO_AF(GPIOB_PIN11, 0U) | PIN_AFIO_AF(GPIOB_PIN12, 0U) | PIN_AFIO_AF(GPIOB_PIN13, 0U) | PIN_AFIO_AF(GPIOB_PIN14, 0U) | PIN_AFIO_AF(GPIOB_PIN15, 0U)) | ||
| 357 | |||
| 358 | /* | ||
| 359 | * GPIOC setup: | ||
| 360 | * | ||
| 361 | * PC0 - OTG_FS_POWER_ON (output pushpull maximum). | ||
| 362 | * PC1 - PIN1 (input pullup). | ||
| 363 | * PC2 - PIN2 (input pullup). | ||
| 364 | * PC3 - CS43L22_AIN4x MP45DT02_PDM_OUT(alternate 5). | ||
| 365 | * PC4 - PIN4 (input pullup). | ||
| 366 | * PC5 - PIN5 (input pullup). | ||
| 367 | * PC6 - PIN6 (input pullup). | ||
| 368 | * PC7 - CS43L22_MCLK (alternate 6). | ||
| 369 | * PC8 - PIN8 (input pullup). | ||
| 370 | * PC9 - PIN9 (input pullup). | ||
| 371 | * PC10 - CS43L22_SCLK (alternate 6). | ||
| 372 | * PC11 - PIN11 (input pullup). | ||
| 373 | * PC12 - CS43L22_SDIN (alternate 6). | ||
| 374 | * PC13 - PIN13 (input pullup). | ||
| 375 | * PC14 - OSC32_IN (input floating). | ||
| 376 | * PC15 - OSC32_OUT (input floating). | ||
| 377 | */ | ||
| 378 | #define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_OTG_FS_POWER_ON) | PIN_MODE_INPUT(GPIOC_PIN1) | PIN_MODE_INPUT(GPIOC_PIN2) | PIN_MODE_ALTERNATE(GPIOC_CS43L22_AIN4x) | PIN_MODE_INPUT(GPIOC_PIN4) | PIN_MODE_INPUT(GPIOC_PIN5) | PIN_MODE_INPUT(GPIOC_PIN6) | PIN_MODE_ALTERNATE(GPIOC_CS43L22_MCLK) | PIN_MODE_INPUT(GPIOC_PIN8) | PIN_MODE_INPUT(GPIOC_PIN9) | PIN_MODE_ALTERNATE(GPIOC_CS43L22_SCLK) | PIN_MODE_INPUT(GPIOC_PIN11) | PIN_MODE_ALTERNATE(GPIOC_CS43L22_SDIN) | PIN_MODE_INPUT(GPIOC_PIN13) | PIN_MODE_INPUT(GPIOC_OSC32_IN) | PIN_MODE_INPUT(GPIOC_OSC32_OUT)) | ||
| 379 | #define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_OTG_FS_POWER_ON) | PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | PIN_OTYPE_PUSHPULL(GPIOC_CS43L22_AIN4x) | PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | PIN_OTYPE_PUSHPULL(GPIOC_PIN6) | PIN_OTYPE_PUSHPULL(GPIOC_CS43L22_MCLK) | PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | PIN_OTYPE_PUSHPULL(GPIOC_CS43L22_SCLK) | PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | PIN_OTYPE_PUSHPULL(GPIOC_CS43L22_SDIN) | PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT)) | ||
| 380 | #define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_OTG_FS_POWER_ON) | PIN_OSPEED_HIGH(GPIOC_PIN1) | PIN_OSPEED_HIGH(GPIOC_PIN2) | PIN_OSPEED_HIGH(GPIOC_CS43L22_AIN4x) | PIN_OSPEED_HIGH(GPIOC_PIN4) | PIN_OSPEED_HIGH(GPIOC_PIN5) | PIN_OSPEED_HIGH(GPIOC_PIN6) | PIN_OSPEED_HIGH(GPIOC_CS43L22_MCLK) | PIN_OSPEED_HIGH(GPIOC_PIN8) | PIN_OSPEED_HIGH(GPIOC_PIN9) | PIN_OSPEED_HIGH(GPIOC_CS43L22_SCLK) | PIN_OSPEED_HIGH(GPIOC_PIN11) | PIN_OSPEED_HIGH(GPIOC_CS43L22_SDIN) | PIN_OSPEED_HIGH(GPIOC_PIN13) | PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | PIN_OSPEED_HIGH(GPIOC_OSC32_OUT)) | ||
| 381 | #define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_OTG_FS_POWER_ON) | PIN_PUPDR_PULLUP(GPIOC_PIN1) | PIN_PUPDR_PULLUP(GPIOC_PIN2) | PIN_PUPDR_FLOATING(GPIOC_CS43L22_AIN4x) | PIN_PUPDR_PULLUP(GPIOC_PIN4) | PIN_PUPDR_PULLUP(GPIOC_PIN5) | PIN_PUPDR_PULLUP(GPIOC_PIN6) | PIN_PUPDR_PULLUP(GPIOC_CS43L22_MCLK) | PIN_PUPDR_PULLUP(GPIOC_PIN8) | PIN_PUPDR_PULLUP(GPIOC_PIN9) | PIN_PUPDR_PULLUP(GPIOC_CS43L22_SCLK) | PIN_PUPDR_PULLUP(GPIOC_PIN11) | PIN_PUPDR_PULLUP(GPIOC_CS43L22_SDIN) | PIN_PUPDR_PULLUP(GPIOC_PIN13) | PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT)) | ||
| 382 | #define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_OTG_FS_POWER_ON) | PIN_ODR_HIGH(GPIOC_PIN1) | PIN_ODR_HIGH(GPIOC_PIN2) | PIN_ODR_HIGH(GPIOC_CS43L22_AIN4x) | PIN_ODR_HIGH(GPIOC_PIN4) | PIN_ODR_HIGH(GPIOC_PIN5) | PIN_ODR_HIGH(GPIOC_PIN6) | PIN_ODR_HIGH(GPIOC_CS43L22_MCLK) | PIN_ODR_HIGH(GPIOC_PIN8) | PIN_ODR_HIGH(GPIOC_PIN9) | PIN_ODR_HIGH(GPIOC_CS43L22_SCLK) | PIN_ODR_HIGH(GPIOC_PIN11) | PIN_ODR_HIGH(GPIOC_CS43L22_SDIN) | PIN_ODR_HIGH(GPIOC_PIN13) | PIN_ODR_HIGH(GPIOC_OSC32_IN) | PIN_ODR_HIGH(GPIOC_OSC32_OUT)) | ||
| 383 | #define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_OTG_FS_POWER_ON, 0U) | PIN_AFIO_AF(GPIOC_PIN1, 0U) | PIN_AFIO_AF(GPIOC_PIN2, 0U) | PIN_AFIO_AF(GPIOC_CS43L22_AIN4x, 5U) | PIN_AFIO_AF(GPIOC_PIN4, 0U) | PIN_AFIO_AF(GPIOC_PIN5, 0U) | PIN_AFIO_AF(GPIOC_PIN6, 0U) | PIN_AFIO_AF(GPIOC_CS43L22_MCLK, 6U)) | ||
| 384 | #define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0U) | PIN_AFIO_AF(GPIOC_PIN9, 0U) | PIN_AFIO_AF(GPIOC_CS43L22_SCLK, 6U) | PIN_AFIO_AF(GPIOC_PIN11, 0U) | PIN_AFIO_AF(GPIOC_CS43L22_SDIN, 6U) | PIN_AFIO_AF(GPIOC_PIN13, 0U) | PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U)) | ||
| 385 | |||
| 386 | /* | ||
| 387 | * GPIOD setup: | ||
| 388 | * | ||
| 389 | * PD0 - PIN0 (input pullup). | ||
| 390 | * PD1 - PIN1 (input pullup). | ||
| 391 | * PD2 - PIN2 (input pullup). | ||
| 392 | * PD3 - PIN3 (input pullup). | ||
| 393 | * PD4 - CS43L22_RESET (output pushpull maximum). | ||
| 394 | * PD5 - OverCurrent (input floating). | ||
| 395 | * PD6 - PIN6 (input pullup). | ||
| 396 | * PD7 - PIN7 (input pullup). | ||
| 397 | * PD8 - PIN8 (input pullup). | ||
| 398 | * PD9 - PIN9 (input pullup). | ||
| 399 | * PD10 - PIN10 (input pullup). | ||
| 400 | * PD11 - PIN11 (input pullup). | ||
| 401 | * PD12 - LED4 (output pushpull maximum). | ||
| 402 | * PD13 - LED3 (output pushpull maximum). | ||
| 403 | * PD14 - LED5 (output pushpull maximum). | ||
| 404 | * PD15 - LED6 (output pushpull maximum). | ||
| 405 | */ | ||
| 406 | #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_OUTPUT(GPIOD_CS43L22_RESET) | PIN_MODE_INPUT(GPIOD_OverCurrent) | 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_OUTPUT(GPIOD_LED4) | PIN_MODE_OUTPUT(GPIOD_LED3) | PIN_MODE_OUTPUT(GPIOD_LED5) | PIN_MODE_OUTPUT(GPIOD_LED6)) | ||
| 407 | #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_CS43L22_RESET) | PIN_OTYPE_PUSHPULL(GPIOD_OverCurrent) | 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_LED4) | PIN_OTYPE_PUSHPULL(GPIOD_LED3) | PIN_OTYPE_PUSHPULL(GPIOD_LED5) | PIN_OTYPE_PUSHPULL(GPIOD_LED6)) | ||
| 408 | #define VAL_GPIOD_OSPEEDR (PIN_OSPEED_HIGH(GPIOD_PIN0) | PIN_OSPEED_HIGH(GPIOD_PIN1) | PIN_OSPEED_HIGH(GPIOD_PIN2) | PIN_OSPEED_HIGH(GPIOD_PIN3) | PIN_OSPEED_HIGH(GPIOD_CS43L22_RESET) | PIN_OSPEED_HIGH(GPIOD_OverCurrent) | PIN_OSPEED_HIGH(GPIOD_PIN6) | PIN_OSPEED_HIGH(GPIOD_PIN7) | PIN_OSPEED_HIGH(GPIOD_PIN8) | PIN_OSPEED_HIGH(GPIOD_PIN9) | PIN_OSPEED_HIGH(GPIOD_PIN10) | PIN_OSPEED_HIGH(GPIOD_PIN11) | PIN_OSPEED_HIGH(GPIOD_LED4) | PIN_OSPEED_HIGH(GPIOD_LED3) | PIN_OSPEED_HIGH(GPIOD_LED5) | PIN_OSPEED_HIGH(GPIOD_LED6)) | ||
| 409 | #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_CS43L22_RESET) | PIN_PUPDR_FLOATING(GPIOD_OverCurrent) | 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_FLOATING(GPIOD_LED4) | PIN_PUPDR_FLOATING(GPIOD_LED3) | PIN_PUPDR_FLOATING(GPIOD_LED5) | PIN_PUPDR_FLOATING(GPIOD_LED6)) | ||
| 410 | #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_CS43L22_RESET) | PIN_ODR_HIGH(GPIOD_OverCurrent) | 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_LOW(GPIOD_LED4) | PIN_ODR_LOW(GPIOD_LED3) | PIN_ODR_LOW(GPIOD_LED5) | PIN_ODR_LOW(GPIOD_LED6)) | ||
| 411 | #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_CS43L22_RESET, 0U) | PIN_AFIO_AF(GPIOD_OverCurrent, 0U) | PIN_AFIO_AF(GPIOD_PIN6, 0U) | PIN_AFIO_AF(GPIOD_PIN7, 0U)) | ||
| 412 | #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_LED4, 0U) | PIN_AFIO_AF(GPIOD_LED3, 0U) | PIN_AFIO_AF(GPIOD_LED5, 0U) | PIN_AFIO_AF(GPIOD_LED6, 0U)) | ||
| 413 | |||
| 414 | /* | ||
| 415 | * GPIOE setup: | ||
| 416 | * | ||
| 417 | * PE0 - L3GD20_INT1 (input pullup). | ||
| 418 | * PE1 - L3GD20_INT2 (input pullup). | ||
| 419 | * PE2 - LSM303DLHC_DRDY (input floating). | ||
| 420 | * PE3 - L3GD20_CS (output pushpull maximum). | ||
| 421 | * PE4 - LSM303DLHC_INT1 (output pushpull maximum). | ||
| 422 | * PE5 - LSM303DLHC_INT2 (output pushpull maximum). | ||
| 423 | * PE6 - PIN6 (input pullup). | ||
| 424 | * PE7 - PIN7 (input pullup). | ||
| 425 | * PE8 - PIN8 (input pullup). | ||
| 426 | * PE9 - PIN9 (input pullup). | ||
| 427 | * PE10 - PIN10 (input pullup). | ||
| 428 | * PE11 - PIN11 (input pullup). | ||
| 429 | * PE12 - PIN12 (input pullup). | ||
| 430 | * PE13 - PIN13 (input pullup). | ||
| 431 | * PE14 - PIN14 (input pullup). | ||
| 432 | * PE15 - PIN15 (input pullup). | ||
| 433 | */ | ||
| 434 | #define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_L3GD20_INT1) | PIN_MODE_INPUT(GPIOE_L3GD20_INT2) | PIN_MODE_INPUT(GPIOE_LSM303DLHC_DRDY) | PIN_MODE_OUTPUT(GPIOE_L3GD20_CS) | PIN_MODE_OUTPUT(GPIOE_LSM303DLHC_INT1) | PIN_MODE_OUTPUT(GPIOE_LSM303DLHC_INT2) | 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)) | ||
| 435 | #define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_L3GD20_INT1) | PIN_OTYPE_PUSHPULL(GPIOE_L3GD20_INT2) | PIN_OTYPE_PUSHPULL(GPIOE_LSM303DLHC_DRDY) | PIN_OTYPE_PUSHPULL(GPIOE_L3GD20_CS) | PIN_OTYPE_PUSHPULL(GPIOE_LSM303DLHC_INT1) | PIN_OTYPE_PUSHPULL(GPIOE_LSM303DLHC_INT2) | 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)) | ||
| 436 | #define VAL_GPIOE_OSPEEDR (PIN_OSPEED_HIGH(GPIOE_L3GD20_INT1) | PIN_OSPEED_HIGH(GPIOE_L3GD20_INT2) | PIN_OSPEED_HIGH(GPIOE_LSM303DLHC_DRDY) | PIN_OSPEED_HIGH(GPIOE_L3GD20_CS) | PIN_OSPEED_HIGH(GPIOE_LSM303DLHC_INT1) | PIN_OSPEED_HIGH(GPIOE_LSM303DLHC_INT2) | PIN_OSPEED_HIGH(GPIOE_PIN6) | PIN_OSPEED_HIGH(GPIOE_PIN7) | PIN_OSPEED_HIGH(GPIOE_PIN8) | PIN_OSPEED_HIGH(GPIOE_PIN9) | PIN_OSPEED_HIGH(GPIOE_PIN10) | PIN_OSPEED_HIGH(GPIOE_PIN11) | PIN_OSPEED_HIGH(GPIOE_PIN12) | PIN_OSPEED_HIGH(GPIOE_PIN13) | PIN_OSPEED_HIGH(GPIOE_PIN14) | PIN_OSPEED_HIGH(GPIOE_PIN15)) | ||
| 437 | #define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_L3GD20_INT1) | PIN_PUPDR_PULLUP(GPIOE_L3GD20_INT2) | PIN_PUPDR_FLOATING(GPIOE_LSM303DLHC_DRDY) | PIN_PUPDR_PULLUP(GPIOE_L3GD20_CS) | PIN_PUPDR_PULLUP(GPIOE_LSM303DLHC_INT1) | PIN_PUPDR_PULLUP(GPIOE_LSM303DLHC_INT2) | 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)) | ||
| 438 | #define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_L3GD20_INT1) | PIN_ODR_HIGH(GPIOE_L3GD20_INT2) | PIN_ODR_HIGH(GPIOE_LSM303DLHC_DRDY) | PIN_ODR_HIGH(GPIOE_L3GD20_CS) | PIN_ODR_HIGH(GPIOE_LSM303DLHC_INT1) | PIN_ODR_HIGH(GPIOE_LSM303DLHC_INT2) | 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)) | ||
| 439 | #define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_L3GD20_INT1, 0U) | PIN_AFIO_AF(GPIOE_L3GD20_INT2, 0U) | PIN_AFIO_AF(GPIOE_LSM303DLHC_DRDY, 0U) | PIN_AFIO_AF(GPIOE_L3GD20_CS, 0U) | PIN_AFIO_AF(GPIOE_LSM303DLHC_INT1, 0U) | PIN_AFIO_AF(GPIOE_LSM303DLHC_INT2, 0U) | PIN_AFIO_AF(GPIOE_PIN6, 0U) | PIN_AFIO_AF(GPIOE_PIN7, 0U)) | ||
| 440 | #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)) | ||
| 441 | |||
| 442 | /* | ||
| 443 | * GPIOF setup: | ||
| 444 | * | ||
| 445 | * PF0 - PIN0 (input pullup). | ||
| 446 | * PF1 - PIN1 (input pullup). | ||
| 447 | * PF2 - PIN2 (input pullup). | ||
| 448 | * PF3 - PIN3 (input pullup). | ||
| 449 | * PF4 - PIN4 (input pullup). | ||
| 450 | * PF5 - PIN5 (input pullup). | ||
| 451 | * PF6 - PIN6 (input pullup). | ||
| 452 | * PF7 - PIN7 (input pullup). | ||
| 453 | * PF8 - PIN8 (input pullup). | ||
| 454 | * PF9 - PIN9 (input pullup). | ||
| 455 | * PF10 - PIN10 (input pullup). | ||
| 456 | * PF11 - PIN11 (input pullup). | ||
| 457 | * PF12 - PIN12 (input pullup). | ||
| 458 | * PF13 - PIN13 (input pullup). | ||
| 459 | * PF14 - PIN14 (input pullup). | ||
| 460 | * PF15 - PIN15 (input pullup). | ||
| 461 | */ | ||
| 462 | #define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_PIN0) | PIN_MODE_INPUT(GPIOF_PIN1) | 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)) | ||
| 463 | #define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_PIN0) | PIN_OTYPE_PUSHPULL(GPIOF_PIN1) | 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)) | ||
| 464 | #define VAL_GPIOF_OSPEEDR (PIN_OSPEED_HIGH(GPIOF_PIN0) | PIN_OSPEED_HIGH(GPIOF_PIN1) | PIN_OSPEED_HIGH(GPIOF_PIN2) | PIN_OSPEED_HIGH(GPIOF_PIN3) | PIN_OSPEED_HIGH(GPIOF_PIN4) | PIN_OSPEED_HIGH(GPIOF_PIN5) | PIN_OSPEED_HIGH(GPIOF_PIN6) | PIN_OSPEED_HIGH(GPIOF_PIN7) | PIN_OSPEED_HIGH(GPIOF_PIN8) | PIN_OSPEED_HIGH(GPIOF_PIN9) | PIN_OSPEED_HIGH(GPIOF_PIN10) | PIN_OSPEED_HIGH(GPIOF_PIN11) | PIN_OSPEED_HIGH(GPIOF_PIN12) | PIN_OSPEED_HIGH(GPIOF_PIN13) | PIN_OSPEED_HIGH(GPIOF_PIN14) | PIN_OSPEED_HIGH(GPIOF_PIN15)) | ||
| 465 | #define VAL_GPIOF_PUPDR (PIN_PUPDR_PULLUP(GPIOF_PIN0) | PIN_PUPDR_PULLUP(GPIOF_PIN1) | 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)) | ||
| 466 | #define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_PIN0) | PIN_ODR_HIGH(GPIOF_PIN1) | 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)) | ||
| 467 | #define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_PIN0, 0U) | PIN_AFIO_AF(GPIOF_PIN1, 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)) | ||
| 468 | #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)) | ||
| 469 | |||
| 470 | /* | ||
| 471 | * GPIOG setup: | ||
| 472 | * | ||
| 473 | * PG0 - PIN0 (input pullup). | ||
| 474 | * PG1 - PIN1 (input pullup). | ||
| 475 | * PG2 - PIN2 (input pullup). | ||
| 476 | * PG3 - PIN3 (input pullup). | ||
| 477 | * PG4 - PIN4 (input pullup). | ||
| 478 | * PG5 - PIN5 (input pullup). | ||
| 479 | * PG6 - PIN6 (input pullup). | ||
| 480 | * PG7 - PIN7 (input pullup). | ||
| 481 | * PG8 - PIN8 (input pullup). | ||
| 482 | * PG9 - PIN9 (input pullup). | ||
| 483 | * PG10 - PIN10 (input pullup). | ||
| 484 | * PG11 - PIN11 (input pullup). | ||
| 485 | * PG12 - PIN12 (input pullup). | ||
| 486 | * PG13 - PIN13 (input pullup). | ||
| 487 | * PG14 - PIN14 (input pullup). | ||
| 488 | * PG15 - PIN15 (input pullup). | ||
| 489 | */ | ||
| 490 | #define VAL_GPIOG_MODER (PIN_MODE_INPUT(GPIOG_PIN0) | PIN_MODE_INPUT(GPIOG_PIN1) | PIN_MODE_INPUT(GPIOG_PIN2) | PIN_MODE_INPUT(GPIOG_PIN3) | PIN_MODE_INPUT(GPIOG_PIN4) | PIN_MODE_INPUT(GPIOG_PIN5) | PIN_MODE_INPUT(GPIOG_PIN6) | PIN_MODE_INPUT(GPIOG_PIN7) | PIN_MODE_INPUT(GPIOG_PIN8) | PIN_MODE_INPUT(GPIOG_PIN9) | PIN_MODE_INPUT(GPIOG_PIN10) | PIN_MODE_INPUT(GPIOG_PIN11) | PIN_MODE_INPUT(GPIOG_PIN12) | PIN_MODE_INPUT(GPIOG_PIN13) | PIN_MODE_INPUT(GPIOG_PIN14) | PIN_MODE_INPUT(GPIOG_PIN15)) | ||
| 491 | #define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_PIN0) | PIN_OTYPE_PUSHPULL(GPIOG_PIN1) | PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | PIN_OTYPE_PUSHPULL(GPIOG_PIN6) | PIN_OTYPE_PUSHPULL(GPIOG_PIN7) | PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | PIN_OTYPE_PUSHPULL(GPIOG_PIN15)) | ||
| 492 | #define VAL_GPIOG_OSPEEDR (PIN_OSPEED_HIGH(GPIOG_PIN0) | PIN_OSPEED_HIGH(GPIOG_PIN1) | PIN_OSPEED_HIGH(GPIOG_PIN2) | PIN_OSPEED_HIGH(GPIOG_PIN3) | PIN_OSPEED_HIGH(GPIOG_PIN4) | PIN_OSPEED_HIGH(GPIOG_PIN5) | PIN_OSPEED_HIGH(GPIOG_PIN6) | PIN_OSPEED_HIGH(GPIOG_PIN7) | PIN_OSPEED_HIGH(GPIOG_PIN8) | PIN_OSPEED_HIGH(GPIOG_PIN9) | PIN_OSPEED_HIGH(GPIOG_PIN10) | PIN_OSPEED_HIGH(GPIOG_PIN11) | PIN_OSPEED_HIGH(GPIOG_PIN12) | PIN_OSPEED_HIGH(GPIOG_PIN13) | PIN_OSPEED_HIGH(GPIOG_PIN14) | PIN_OSPEED_HIGH(GPIOG_PIN15)) | ||
| 493 | #define VAL_GPIOG_PUPDR (PIN_PUPDR_PULLUP(GPIOG_PIN0) | PIN_PUPDR_PULLUP(GPIOG_PIN1) | PIN_PUPDR_PULLUP(GPIOG_PIN2) | PIN_PUPDR_PULLUP(GPIOG_PIN3) | PIN_PUPDR_PULLUP(GPIOG_PIN4) | PIN_PUPDR_PULLUP(GPIOG_PIN5) | PIN_PUPDR_PULLUP(GPIOG_PIN6) | PIN_PUPDR_PULLUP(GPIOG_PIN7) | PIN_PUPDR_PULLUP(GPIOG_PIN8) | PIN_PUPDR_PULLUP(GPIOG_PIN9) | PIN_PUPDR_PULLUP(GPIOG_PIN10) | PIN_PUPDR_PULLUP(GPIOG_PIN11) | PIN_PUPDR_PULLUP(GPIOG_PIN12) | PIN_PUPDR_PULLUP(GPIOG_PIN13) | PIN_PUPDR_PULLUP(GPIOG_PIN14) | PIN_PUPDR_PULLUP(GPIOG_PIN15)) | ||
| 494 | #define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_PIN0) | PIN_ODR_HIGH(GPIOG_PIN1) | PIN_ODR_HIGH(GPIOG_PIN2) | PIN_ODR_HIGH(GPIOG_PIN3) | PIN_ODR_HIGH(GPIOG_PIN4) | PIN_ODR_HIGH(GPIOG_PIN5) | PIN_ODR_HIGH(GPIOG_PIN6) | PIN_ODR_HIGH(GPIOG_PIN7) | PIN_ODR_HIGH(GPIOG_PIN8) | PIN_ODR_HIGH(GPIOG_PIN9) | PIN_ODR_HIGH(GPIOG_PIN10) | PIN_ODR_HIGH(GPIOG_PIN11) | PIN_ODR_HIGH(GPIOG_PIN12) | PIN_ODR_HIGH(GPIOG_PIN13) | PIN_ODR_HIGH(GPIOG_PIN14) | PIN_ODR_HIGH(GPIOG_PIN15)) | ||
| 495 | #define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_PIN0, 0U) | PIN_AFIO_AF(GPIOG_PIN1, 0U) | PIN_AFIO_AF(GPIOG_PIN2, 0U) | PIN_AFIO_AF(GPIOG_PIN3, 0U) | PIN_AFIO_AF(GPIOG_PIN4, 0U) | PIN_AFIO_AF(GPIOG_PIN5, 0U) | PIN_AFIO_AF(GPIOG_PIN6, 0U) | PIN_AFIO_AF(GPIOG_PIN7, 0U)) | ||
| 496 | #define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0U) | PIN_AFIO_AF(GPIOG_PIN9, 0U) | PIN_AFIO_AF(GPIOG_PIN10, 0U) | PIN_AFIO_AF(GPIOG_PIN11, 0U) | PIN_AFIO_AF(GPIOG_PIN12, 0U) | PIN_AFIO_AF(GPIOG_PIN13, 0U) | PIN_AFIO_AF(GPIOG_PIN14, 0U) | PIN_AFIO_AF(GPIOG_PIN15, 0U)) | ||
| 497 | |||
| 498 | /* | ||
| 499 | * GPIOH setup: | ||
| 500 | * | ||
| 501 | * PH0 - OSC_IN (input floating). | ||
| 502 | * PH1 - OSC_OUT (input floating). | ||
| 503 | * PH2 - PIN2 (input pullup). | ||
| 504 | * PH3 - PIN3 (input pullup). | ||
| 505 | * PH4 - PIN4 (input pullup). | ||
| 506 | * PH5 - PIN5 (input pullup). | ||
| 507 | * PH6 - PIN6 (input pullup). | ||
| 508 | * PH7 - PIN7 (input pullup). | ||
| 509 | * PH8 - PIN8 (input pullup). | ||
| 510 | * PH9 - PIN9 (input pullup). | ||
| 511 | * PH10 - PIN10 (input pullup). | ||
| 512 | * PH11 - PIN11 (input pullup). | ||
| 513 | * PH12 - PIN12 (input pullup). | ||
| 514 | * PH13 - PIN13 (input pullup). | ||
| 515 | * PH14 - PIN14 (input pullup). | ||
| 516 | * PH15 - PIN15 (input pullup). | ||
| 517 | */ | ||
| 518 | #define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_OSC_IN) | PIN_MODE_INPUT(GPIOH_OSC_OUT) | PIN_MODE_INPUT(GPIOH_PIN2) | PIN_MODE_INPUT(GPIOH_PIN3) | PIN_MODE_INPUT(GPIOH_PIN4) | PIN_MODE_INPUT(GPIOH_PIN5) | PIN_MODE_INPUT(GPIOH_PIN6) | PIN_MODE_INPUT(GPIOH_PIN7) | PIN_MODE_INPUT(GPIOH_PIN8) | PIN_MODE_INPUT(GPIOH_PIN9) | PIN_MODE_INPUT(GPIOH_PIN10) | PIN_MODE_INPUT(GPIOH_PIN11) | PIN_MODE_INPUT(GPIOH_PIN12) | PIN_MODE_INPUT(GPIOH_PIN13) | PIN_MODE_INPUT(GPIOH_PIN14) | PIN_MODE_INPUT(GPIOH_PIN15)) | ||
| 519 | #define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_OSC_IN) | PIN_OTYPE_PUSHPULL(GPIOH_OSC_OUT) | PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | PIN_OTYPE_PUSHPULL(GPIOH_PIN15)) | ||
| 520 | #define VAL_GPIOH_OSPEEDR (PIN_OSPEED_HIGH(GPIOH_OSC_IN) | PIN_OSPEED_HIGH(GPIOH_OSC_OUT) | PIN_OSPEED_HIGH(GPIOH_PIN2) | PIN_OSPEED_HIGH(GPIOH_PIN3) | PIN_OSPEED_HIGH(GPIOH_PIN4) | PIN_OSPEED_HIGH(GPIOH_PIN5) | PIN_OSPEED_HIGH(GPIOH_PIN6) | PIN_OSPEED_HIGH(GPIOH_PIN7) | PIN_OSPEED_HIGH(GPIOH_PIN8) | PIN_OSPEED_HIGH(GPIOH_PIN9) | PIN_OSPEED_HIGH(GPIOH_PIN10) | PIN_OSPEED_HIGH(GPIOH_PIN11) | PIN_OSPEED_HIGH(GPIOH_PIN12) | PIN_OSPEED_HIGH(GPIOH_PIN13) | PIN_OSPEED_HIGH(GPIOH_PIN14) | PIN_OSPEED_HIGH(GPIOH_PIN15)) | ||
| 521 | #define VAL_GPIOH_PUPDR (PIN_PUPDR_FLOATING(GPIOH_OSC_IN) | PIN_PUPDR_FLOATING(GPIOH_OSC_OUT) | PIN_PUPDR_PULLUP(GPIOH_PIN2) | PIN_PUPDR_PULLUP(GPIOH_PIN3) | PIN_PUPDR_PULLUP(GPIOH_PIN4) | PIN_PUPDR_PULLUP(GPIOH_PIN5) | PIN_PUPDR_PULLUP(GPIOH_PIN6) | PIN_PUPDR_PULLUP(GPIOH_PIN7) | PIN_PUPDR_PULLUP(GPIOH_PIN8) | PIN_PUPDR_PULLUP(GPIOH_PIN9) | PIN_PUPDR_PULLUP(GPIOH_PIN10) | PIN_PUPDR_PULLUP(GPIOH_PIN11) | PIN_PUPDR_PULLUP(GPIOH_PIN12) | PIN_PUPDR_PULLUP(GPIOH_PIN13) | PIN_PUPDR_PULLUP(GPIOH_PIN14) | PIN_PUPDR_PULLUP(GPIOH_PIN15)) | ||
| 522 | #define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_OSC_IN) | PIN_ODR_HIGH(GPIOH_OSC_OUT) | PIN_ODR_HIGH(GPIOH_PIN2) | PIN_ODR_HIGH(GPIOH_PIN3) | PIN_ODR_HIGH(GPIOH_PIN4) | PIN_ODR_HIGH(GPIOH_PIN5) | PIN_ODR_HIGH(GPIOH_PIN6) | PIN_ODR_HIGH(GPIOH_PIN7) | PIN_ODR_HIGH(GPIOH_PIN8) | PIN_ODR_HIGH(GPIOH_PIN9) | PIN_ODR_HIGH(GPIOH_PIN10) | PIN_ODR_HIGH(GPIOH_PIN11) | PIN_ODR_HIGH(GPIOH_PIN12) | PIN_ODR_HIGH(GPIOH_PIN13) | PIN_ODR_HIGH(GPIOH_PIN14) | PIN_ODR_HIGH(GPIOH_PIN15)) | ||
| 523 | #define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_OSC_IN, 0U) | PIN_AFIO_AF(GPIOH_OSC_OUT, 0U) | PIN_AFIO_AF(GPIOH_PIN2, 0U) | PIN_AFIO_AF(GPIOH_PIN3, 0U) | PIN_AFIO_AF(GPIOH_PIN4, 0U) | PIN_AFIO_AF(GPIOH_PIN5, 0U) | PIN_AFIO_AF(GPIOH_PIN6, 0U) | PIN_AFIO_AF(GPIOH_PIN7, 0U)) | ||
| 524 | #define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0U) | PIN_AFIO_AF(GPIOH_PIN9, 0U) | PIN_AFIO_AF(GPIOH_PIN10, 0U) | PIN_AFIO_AF(GPIOH_PIN11, 0U) | PIN_AFIO_AF(GPIOH_PIN12, 0U) | PIN_AFIO_AF(GPIOH_PIN13, 0U) | PIN_AFIO_AF(GPIOH_PIN14, 0U) | PIN_AFIO_AF(GPIOH_PIN15, 0U)) | ||
| 525 | |||
| 526 | /* | ||
| 527 | * GPIOI setup: | ||
| 528 | * | ||
| 529 | * PI0 - PIN0 (input pullup). | ||
| 530 | * PI1 - PIN1 (input pullup). | ||
| 531 | * PI2 - PIN2 (input pullup). | ||
| 532 | * PI3 - PIN3 (input pullup). | ||
| 533 | * PI4 - PIN4 (input pullup). | ||
| 534 | * PI5 - PIN5 (input pullup). | ||
| 535 | * PI6 - PIN6 (input pullup). | ||
| 536 | * PI7 - PIN7 (input pullup). | ||
| 537 | * PI8 - PIN8 (input pullup). | ||
| 538 | * PI9 - PIN9 (input pullup). | ||
| 539 | * PI10 - PIN10 (input pullup). | ||
| 540 | * PI11 - PIN11 (input pullup). | ||
| 541 | * PI12 - PIN12 (input pullup). | ||
| 542 | * PI13 - PIN13 (input pullup). | ||
| 543 | * PI14 - PIN14 (input pullup). | ||
| 544 | * PI15 - PIN15 (input pullup). | ||
| 545 | */ | ||
| 546 | #define VAL_GPIOI_MODER (PIN_MODE_INPUT(GPIOI_PIN0) | PIN_MODE_INPUT(GPIOI_PIN1) | PIN_MODE_INPUT(GPIOI_PIN2) | PIN_MODE_INPUT(GPIOI_PIN3) | PIN_MODE_INPUT(GPIOI_PIN4) | PIN_MODE_INPUT(GPIOI_PIN5) | PIN_MODE_INPUT(GPIOI_PIN6) | PIN_MODE_INPUT(GPIOI_PIN7) | PIN_MODE_INPUT(GPIOI_PIN8) | PIN_MODE_INPUT(GPIOI_PIN9) | PIN_MODE_INPUT(GPIOI_PIN10) | PIN_MODE_INPUT(GPIOI_PIN11) | PIN_MODE_INPUT(GPIOI_PIN12) | PIN_MODE_INPUT(GPIOI_PIN13) | PIN_MODE_INPUT(GPIOI_PIN14) | PIN_MODE_INPUT(GPIOI_PIN15)) | ||
| 547 | #define VAL_GPIOI_OTYPER (PIN_OTYPE_PUSHPULL(GPIOI_PIN0) | PIN_OTYPE_PUSHPULL(GPIOI_PIN1) | PIN_OTYPE_PUSHPULL(GPIOI_PIN2) | PIN_OTYPE_PUSHPULL(GPIOI_PIN3) | PIN_OTYPE_PUSHPULL(GPIOI_PIN4) | PIN_OTYPE_PUSHPULL(GPIOI_PIN5) | PIN_OTYPE_PUSHPULL(GPIOI_PIN6) | PIN_OTYPE_PUSHPULL(GPIOI_PIN7) | PIN_OTYPE_PUSHPULL(GPIOI_PIN8) | PIN_OTYPE_PUSHPULL(GPIOI_PIN9) | PIN_OTYPE_PUSHPULL(GPIOI_PIN10) | PIN_OTYPE_PUSHPULL(GPIOI_PIN11) | PIN_OTYPE_PUSHPULL(GPIOI_PIN12) | PIN_OTYPE_PUSHPULL(GPIOI_PIN13) | PIN_OTYPE_PUSHPULL(GPIOI_PIN14) | PIN_OTYPE_PUSHPULL(GPIOI_PIN15)) | ||
| 548 | #define VAL_GPIOI_OSPEEDR (PIN_OSPEED_HIGH(GPIOI_PIN0) | PIN_OSPEED_HIGH(GPIOI_PIN1) | PIN_OSPEED_HIGH(GPIOI_PIN2) | PIN_OSPEED_HIGH(GPIOI_PIN3) | PIN_OSPEED_HIGH(GPIOI_PIN4) | PIN_OSPEED_HIGH(GPIOI_PIN5) | PIN_OSPEED_HIGH(GPIOI_PIN6) | PIN_OSPEED_HIGH(GPIOI_PIN7) | PIN_OSPEED_HIGH(GPIOI_PIN8) | PIN_OSPEED_HIGH(GPIOI_PIN9) | PIN_OSPEED_HIGH(GPIOI_PIN10) | PIN_OSPEED_HIGH(GPIOI_PIN11) | PIN_OSPEED_HIGH(GPIOI_PIN12) | PIN_OSPEED_HIGH(GPIOI_PIN13) | PIN_OSPEED_HIGH(GPIOI_PIN14) | PIN_OSPEED_HIGH(GPIOI_PIN15)) | ||
| 549 | #define VAL_GPIOI_PUPDR (PIN_PUPDR_PULLUP(GPIOI_PIN0) | PIN_PUPDR_PULLUP(GPIOI_PIN1) | PIN_PUPDR_PULLUP(GPIOI_PIN2) | PIN_PUPDR_PULLUP(GPIOI_PIN3) | PIN_PUPDR_PULLUP(GPIOI_PIN4) | PIN_PUPDR_PULLUP(GPIOI_PIN5) | PIN_PUPDR_PULLUP(GPIOI_PIN6) | PIN_PUPDR_PULLUP(GPIOI_PIN7) | PIN_PUPDR_PULLUP(GPIOI_PIN8) | PIN_PUPDR_PULLUP(GPIOI_PIN9) | PIN_PUPDR_PULLUP(GPIOI_PIN10) | PIN_PUPDR_PULLUP(GPIOI_PIN11) | PIN_PUPDR_PULLUP(GPIOI_PIN12) | PIN_PUPDR_PULLUP(GPIOI_PIN13) | PIN_PUPDR_PULLUP(GPIOI_PIN14) | PIN_PUPDR_PULLUP(GPIOI_PIN15)) | ||
| 550 | #define VAL_GPIOI_ODR (PIN_ODR_HIGH(GPIOI_PIN0) | PIN_ODR_HIGH(GPIOI_PIN1) | PIN_ODR_HIGH(GPIOI_PIN2) | PIN_ODR_HIGH(GPIOI_PIN3) | PIN_ODR_HIGH(GPIOI_PIN4) | PIN_ODR_HIGH(GPIOI_PIN5) | PIN_ODR_HIGH(GPIOI_PIN6) | PIN_ODR_HIGH(GPIOI_PIN7) | PIN_ODR_HIGH(GPIOI_PIN8) | PIN_ODR_HIGH(GPIOI_PIN9) | PIN_ODR_HIGH(GPIOI_PIN10) | PIN_ODR_HIGH(GPIOI_PIN11) | PIN_ODR_HIGH(GPIOI_PIN12) | PIN_ODR_HIGH(GPIOI_PIN13) | PIN_ODR_HIGH(GPIOI_PIN14) | PIN_ODR_HIGH(GPIOI_PIN15)) | ||
| 551 | #define VAL_GPIOI_AFRL (PIN_AFIO_AF(GPIOI_PIN0, 0U) | PIN_AFIO_AF(GPIOI_PIN1, 0U) | PIN_AFIO_AF(GPIOI_PIN2, 0U) | PIN_AFIO_AF(GPIOI_PIN3, 0U) | PIN_AFIO_AF(GPIOI_PIN4, 0U) | PIN_AFIO_AF(GPIOI_PIN5, 0U) | PIN_AFIO_AF(GPIOI_PIN6, 0U) | PIN_AFIO_AF(GPIOI_PIN7, 0U)) | ||
| 552 | #define VAL_GPIOI_AFRH (PIN_AFIO_AF(GPIOI_PIN8, 0U) | PIN_AFIO_AF(GPIOI_PIN9, 0U) | PIN_AFIO_AF(GPIOI_PIN10, 0U) | PIN_AFIO_AF(GPIOI_PIN11, 0U) | PIN_AFIO_AF(GPIOI_PIN12, 0U) | PIN_AFIO_AF(GPIOI_PIN13, 0U) | PIN_AFIO_AF(GPIOI_PIN14, 0U) | PIN_AFIO_AF(GPIOI_PIN15, 0U)) | ||
| 553 | |||
| 554 | /*===========================================================================*/ | ||
| 555 | /* External declarations. */ | ||
| 556 | /*===========================================================================*/ | ||
| 557 | |||
| 558 | #if !defined(_FROM_ASM_) | ||
| 559 | # ifdef __cplusplus | ||
| 560 | extern "C" { | ||
| 561 | # endif | ||
| 562 | void boardInit(void); | ||
| 563 | # ifdef __cplusplus | ||
| 564 | } | ||
| 565 | # endif | ||
| 566 | #endif /* _FROM_ASM_ */ | ||
| 567 | |||
| 568 | #endif /* BOARD_H */ | ||
diff --git a/drivers/boards/BLACKPILL_STM32_F401/board.mk b/drivers/boards/BLACKPILL_STM32_F401/board.mk deleted file mode 100644 index 33473ed6b..000000000 --- a/drivers/boards/BLACKPILL_STM32_F401/board.mk +++ /dev/null | |||
| @@ -1,9 +0,0 @@ | |||
| 1 | # List of all the board related files. | ||
| 2 | BOARDSRC = $(BOARD_PATH)/boards/BLACKPILL_STM32_F401/board.c | ||
| 3 | |||
| 4 | # Required include directories | ||
| 5 | BOARDINC = $(BOARD_PATH)/boards/BLACKPILL_STM32_F401 | ||
| 6 | |||
| 7 | # Shared variables | ||
| 8 | ALLCSRC += $(BOARDSRC) | ||
| 9 | ALLINC += $(BOARDINC) | ||
diff --git a/drivers/boards/BLACKPILL_STM32_F401/cfg/board.chcfg b/drivers/boards/BLACKPILL_STM32_F401/cfg/board.chcfg deleted file mode 100644 index 7559ceb93..000000000 --- a/drivers/boards/BLACKPILL_STM32_F401/cfg/board.chcfg +++ /dev/null | |||
| @@ -1,1193 +0,0 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <!-- STM32F4xx board Template --> | ||
| 3 | <board | ||
| 4 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| 5 | xsi:noNamespaceSchemaLocation="http://www.chibios.org/xml/schema/boards/stm32f4xx_board.xsd"> | ||
| 6 | <configuration_settings> | ||
| 7 | <templates_path>resources/gencfg/processors/boards/stm32f4xx/templates</templates_path> | ||
| 8 | <output_path>..</output_path> | ||
| 9 | <hal_version>5.0.x</hal_version> | ||
| 10 | </configuration_settings> | ||
| 11 | <board_name>STMicroelectronics STM32F401C-Discovery</board_name> | ||
| 12 | <board_id>ST_STM32F401C_DISCOVERY</board_id> | ||
| 13 | <board_functions></board_functions> | ||
| 14 | <subtype>STM32F401xC</subtype> | ||
| 15 | <clocks | ||
| 16 | HSEFrequency="8000000" | ||
| 17 | HSEBypass="false" | ||
| 18 | LSEFrequency="0" | ||
| 19 | LSEBypass="false" | ||
| 20 | VDD="300" /> | ||
| 21 | <ports> | ||
| 22 | <GPIOA> | ||
| 23 | <pin0 | ||
| 24 | ID="BUTTON" | ||
| 25 | Type="PushPull" | ||
| 26 | Level="High" | ||
| 27 | Speed="Maximum" | ||
| 28 | Resistor="Floating" | ||
| 29 | Mode="Input" | ||
| 30 | Alternate="0" /> | ||
| 31 | <pin1 | ||
| 32 | ID="" | ||
| 33 | Type="PushPull" | ||
| 34 | Level="High" | ||
| 35 | Speed="Maximum" | ||
| 36 | Resistor="PullUp" | ||
| 37 | Mode="Input" | ||
| 38 | Alternate="0" /> | ||
| 39 | <pin2 | ||
| 40 | ID="" | ||
| 41 | Type="PushPull" | ||
| 42 | Level="High" | ||
| 43 | Speed="Maximum" | ||
| 44 | Resistor="PullUp" | ||
| 45 | Mode="Input" | ||
| 46 | Alternate="0" /> | ||
| 47 | <pin3 | ||
| 48 | ID="" | ||
| 49 | Type="PushPull" | ||
| 50 | Level="High" | ||
| 51 | Speed="Maximum" | ||
| 52 | Resistor="PullUp" | ||
| 53 | Mode="Input" | ||
| 54 | Alternate="0" /> | ||
| 55 | <pin4 | ||
| 56 | ID="CS43L22_LRCK" | ||
| 57 | Type="PushPull" | ||
| 58 | Level="High" | ||
| 59 | Speed="Maximum" | ||
| 60 | Resistor="Floating" | ||
| 61 | Mode="Alternate" | ||
| 62 | Alternate="6" /> | ||
| 63 | <pin5 | ||
| 64 | ID="L3GD20_SCL" | ||
| 65 | Type="PushPull" | ||
| 66 | Level="High" | ||
| 67 | Speed="Maximum" | ||
| 68 | Resistor="Floating" | ||
| 69 | Mode="Alternate" | ||
| 70 | Alternate="5" /> | ||
| 71 | <pin6 | ||
| 72 | ID="L3GD20_SD0" | ||
| 73 | Type="PushPull" | ||
| 74 | Level="High" | ||
| 75 | Speed="Maximum" | ||
| 76 | Resistor="PullUp" | ||
| 77 | Mode="Alternate" | ||
| 78 | Alternate="5" /> | ||
| 79 | <pin7 | ||
| 80 | ID="L3GD20_SDI" | ||
| 81 | Type="PushPull" | ||
| 82 | Level="High" | ||
| 83 | Speed="Maximum" | ||
| 84 | Resistor="PullUp" | ||
| 85 | Mode="Alternate" | ||
| 86 | Alternate="5" /> | ||
| 87 | <pin8 | ||
| 88 | ID="" | ||
| 89 | Type="PushPull" | ||
| 90 | Level="High" | ||
| 91 | Speed="Maximum" | ||
| 92 | Resistor="PullUp" | ||
| 93 | Mode="Input" | ||
| 94 | Alternate="0" /> | ||
| 95 | <pin9 | ||
| 96 | ID="VBUS_FS" | ||
| 97 | Type="PushPull" | ||
| 98 | Level="High" | ||
| 99 | Speed="Maximum" | ||
| 100 | Resistor="Floating" | ||
| 101 | Mode="Input" | ||
| 102 | Alternate="0" /> | ||
| 103 | <pin10 | ||
| 104 | ID="OTG_FS_ID" | ||
| 105 | Type="PushPull" | ||
| 106 | Level="High" | ||
| 107 | Speed="Maximum" | ||
| 108 | Resistor="Floating" | ||
| 109 | Mode="Alternate" | ||
| 110 | Alternate="10" /> | ||
| 111 | <pin11 | ||
| 112 | ID="OTG_FS_DM" | ||
| 113 | Type="PushPull" | ||
| 114 | Level="High" | ||
| 115 | Speed="Maximum" | ||
| 116 | Resistor="Floating" | ||
| 117 | Mode="Alternate" | ||
| 118 | Alternate="10" /> | ||
| 119 | <pin12 | ||
| 120 | ID="OTG_FS_DP" | ||
| 121 | Type="PushPull" | ||
| 122 | Level="High" | ||
| 123 | Speed="Maximum" | ||
| 124 | Resistor="Floating" | ||
| 125 | Mode="Alternate" | ||
| 126 | Alternate="10" /> | ||
| 127 | <pin13 | ||
| 128 | ID="SWDIO" | ||
| 129 | Type="PushPull" | ||
| 130 | Level="High" | ||
| 131 | Speed="Maximum" | ||
| 132 | Resistor="Floating" | ||
| 133 | Mode="Alternate" | ||
| 134 | Alternate="0" /> | ||
| 135 | <pin14 | ||
| 136 | ID="SWCLK" | ||
| 137 | Type="PushPull" | ||
| 138 | Level="High" | ||
| 139 | Speed="Maximum" | ||
| 140 | Resistor="Floating" | ||
| 141 | Mode="Alternate" | ||
| 142 | Alternate="0" /> | ||
| 143 | <pin15 | ||
| 144 | ID="" | ||
| 145 | Type="PushPull" | ||
| 146 | Level="High" | ||
| 147 | Speed="Maximum" | ||
| 148 | Resistor="PullUp" | ||
| 149 | Mode="Input" | ||
| 150 | Alternate="0" /> | ||
| 151 | </GPIOA> | ||
| 152 | <GPIOB> | ||
| 153 | <pin0 | ||
| 154 | ID="" | ||
| 155 | Type="PushPull" | ||
| 156 | Level="High" | ||
| 157 | Speed="Maximum" | ||
| 158 | Resistor="PullUp" | ||
| 159 | Mode="Input" | ||
| 160 | Alternate="0" /> | ||
| 161 | <pin1 | ||
| 162 | ID="" | ||
| 163 | Type="PushPull" | ||
| 164 | Level="High" | ||
| 165 | Speed="Maximum" | ||
| 166 | Resistor="PullUp" | ||
| 167 | Mode="Input" | ||
| 168 | Alternate="0" /> | ||
| 169 | <pin2 | ||
| 170 | ID="" | ||
| 171 | Type="PushPull" | ||
| 172 | Level="High" | ||
| 173 | Speed="Maximum" | ||
| 174 | Resistor="PullUp" | ||
| 175 | Mode="Input" | ||
| 176 | Alternate="0" /> | ||
| 177 | <pin3 | ||
| 178 | ID="SWO" | ||
| 179 | Type="PushPull" | ||
| 180 | Level="High" | ||
| 181 | Speed="Maximum" | ||
| 182 | Resistor="PullUp" | ||
| 183 | Mode="Alternate" | ||
| 184 | Alternate="0" /> | ||
| 185 | <pin4 | ||
| 186 | ID="" | ||
| 187 | Type="PushPull" | ||
| 188 | Level="High" | ||
| 189 | Speed="Maximum" | ||
| 190 | Resistor="PullUp" | ||
| 191 | Mode="Input" | ||
| 192 | Alternate="0" /> | ||
| 193 | <pin5 | ||
| 194 | ID="" | ||
| 195 | Type="PushPull" | ||
| 196 | Level="High" | ||
| 197 | Speed="Maximum" | ||
| 198 | Resistor="PullUp" | ||
| 199 | Mode="Input" | ||
| 200 | Alternate="0" /> | ||
| 201 | <pin6 | ||
| 202 | ID="LSM303DLHC_SCL" | ||
| 203 | Type="PushPull" | ||
| 204 | Level="High" | ||
| 205 | Speed="Maximum" | ||
| 206 | Resistor="Floating" | ||
| 207 | Mode="Alternate" | ||
| 208 | Alternate="4" /> | ||
| 209 | <pin7 | ||
| 210 | ID="" | ||
| 211 | Type="PushPull" | ||
| 212 | Level="High" | ||
| 213 | Speed="Maximum" | ||
| 214 | Resistor="PullUp" | ||
| 215 | Mode="Input" | ||
| 216 | Alternate="0" /> | ||
| 217 | <pin8 | ||
| 218 | ID="" | ||
| 219 | Type="PushPull" | ||
| 220 | Level="High" | ||
| 221 | Speed="Maximum" | ||
| 222 | Resistor="PullUp" | ||
| 223 | Mode="Input" | ||
| 224 | Alternate="0" /> | ||
| 225 | <pin9 | ||
| 226 | ID="LSM303DLHC_SDA" | ||
| 227 | Type="PushPull" | ||
| 228 | Level="High" | ||
| 229 | Speed="Maximum" | ||
| 230 | Resistor="Floating" | ||
| 231 | Mode="Alternate" | ||
| 232 | Alternate="4" /> | ||
| 233 | <pin10 | ||
| 234 | ID="MP45DT02_CLK_IN" | ||
| 235 | Type="PushPull" | ||
| 236 | Level="High" | ||
| 237 | Speed="Maximum" | ||
| 238 | Resistor="Floating" | ||
| 239 | Mode="Alternate" | ||
| 240 | Alternate="5" /> | ||
| 241 | <pin11 | ||
| 242 | ID="" | ||
| 243 | Type="PushPull" | ||
| 244 | Level="High" | ||
| 245 | Speed="Maximum" | ||
| 246 | Resistor="PullUp" | ||
| 247 | Mode="Input" | ||
| 248 | Alternate="0" /> | ||
| 249 | <pin12 | ||
| 250 | ID="" | ||
| 251 | Type="PushPull" | ||
| 252 | Level="High" | ||
| 253 | Speed="Maximum" | ||
| 254 | Resistor="PullUp" | ||
| 255 | Mode="Input" | ||
| 256 | Alternate="0" /> | ||
| 257 | <pin13 | ||
| 258 | ID="" | ||
| 259 | Type="PushPull" | ||
| 260 | Level="High" | ||
| 261 | Speed="Maximum" | ||
| 262 | Resistor="PullUp" | ||
| 263 | Mode="Input" | ||
| 264 | Alternate="0" /> | ||
| 265 | <pin14 | ||
| 266 | ID="" | ||
| 267 | Type="PushPull" | ||
| 268 | Level="High" | ||
| 269 | Speed="Maximum" | ||
| 270 | Resistor="PullUp" | ||
| 271 | Mode="Input" | ||
| 272 | Alternate="0" /> | ||
| 273 | <pin15 | ||
| 274 | ID="" | ||
| 275 | Type="PushPull" | ||
| 276 | Level="High" | ||
| 277 | Speed="Maximum" | ||
| 278 | Resistor="PullUp" | ||
| 279 | Mode="Input" | ||
| 280 | Alternate="0" /> | ||
| 281 | </GPIOB> | ||
| 282 | <GPIOC> | ||
| 283 | <pin0 | ||
| 284 | ID="OTG_FS_POWER_ON" | ||
| 285 | Type="PushPull" | ||
| 286 | Level="High" | ||
| 287 | Speed="Maximum" | ||
| 288 | Resistor="PullUp" | ||
| 289 | Mode="Output" | ||
| 290 | Alternate="0" /> | ||
| 291 | <pin1 | ||
| 292 | ID="" | ||
| 293 | Type="PushPull" | ||
| 294 | Level="High" | ||
| 295 | Speed="Maximum" | ||
| 296 | Resistor="PullUp" | ||
| 297 | Mode="Input" | ||
| 298 | Alternate="0" /> | ||
| 299 | <pin2 | ||
| 300 | ID="" | ||
| 301 | Type="PushPull" | ||
| 302 | Level="High" | ||
| 303 | Speed="Maximum" | ||
| 304 | Resistor="PullUp" | ||
| 305 | Mode="Input" | ||
| 306 | Alternate="0" /> | ||
| 307 | <pin3 | ||
| 308 | ID="CS43L22_AIN4x MP45DT02_PDM_OUT" | ||
| 309 | Type="PushPull" | ||
| 310 | Level="High" | ||
| 311 | Speed="Maximum" | ||
| 312 | Resistor="Floating" | ||
| 313 | Mode="Alternate" | ||
| 314 | Alternate="5" /> | ||
| 315 | <pin4 | ||
| 316 | ID="" | ||
| 317 | Type="PushPull" | ||
| 318 | Level="High" | ||
| 319 | Speed="Maximum" | ||
| 320 | Resistor="PullUp" | ||
| 321 | Mode="Input" | ||
| 322 | Alternate="0" /> | ||
| 323 | <pin5 | ||
| 324 | ID="" | ||
| 325 | Type="PushPull" | ||
| 326 | Level="High" | ||
| 327 | Speed="Maximum" | ||
| 328 | Resistor="PullUp" | ||
| 329 | Mode="Input" | ||
| 330 | Alternate="0" /> | ||
| 331 | <pin6 | ||
| 332 | ID="" | ||
| 333 | Type="PushPull" | ||
| 334 | Level="High" | ||
| 335 | Speed="Maximum" | ||
| 336 | Resistor="PullUp" | ||
| 337 | Mode="Input" | ||
| 338 | Alternate="0" /> | ||
| 339 | <pin7 | ||
| 340 | ID="CS43L22_MCLK" | ||
| 341 | Type="PushPull" | ||
| 342 | Level="High" | ||
| 343 | Speed="Maximum" | ||
| 344 | Resistor="PullUp" | ||
| 345 | Mode="Alternate" | ||
| 346 | Alternate="6" /> | ||
| 347 | <pin8 | ||
| 348 | ID="" | ||
| 349 | Type="PushPull" | ||
| 350 | Level="High" | ||
| 351 | Speed="Maximum" | ||
| 352 | Resistor="PullUp" | ||
| 353 | Mode="Input" | ||
| 354 | Alternate="0" /> | ||
| 355 | <pin9 | ||
| 356 | ID="" | ||
| 357 | Type="PushPull" | ||
| 358 | Level="High" | ||
| 359 | Speed="Maximum" | ||
| 360 | Resistor="PullUp" | ||
| 361 | Mode="Input" | ||
| 362 | Alternate="0" /> | ||
| 363 | <pin10 | ||
| 364 | ID="CS43L22_SCLK" | ||
| 365 | Type="PushPull" | ||
| 366 | Level="High" | ||
| 367 | Speed="Maximum" | ||
| 368 | Resistor="PullUp" | ||
| 369 | Mode="Alternate" | ||
| 370 | Alternate="6" /> | ||
| 371 | <pin11 | ||
| 372 | ID="" | ||
| 373 | Type="PushPull" | ||
| 374 | Level="High" | ||
| 375 | Speed="Maximum" | ||
| 376 | Resistor="PullUp" | ||
| 377 | Mode="Input" | ||
| 378 | Alternate="0" /> | ||
| 379 | <pin12 | ||
| 380 | ID="CS43L22_SDIN" | ||
| 381 | Type="PushPull" | ||
| 382 | Level="High" | ||
| 383 | Speed="Maximum" | ||
| 384 | Resistor="PullUp" | ||
| 385 | Mode="Alternate" | ||
| 386 | Alternate="6" /> | ||
| 387 | <pin13 | ||
| 388 | ID="" | ||
| 389 | Type="PushPull" | ||
| 390 | Level="High" | ||
| 391 | Speed="Maximum" | ||
| 392 | Resistor="PullUp" | ||
| 393 | Mode="Input" | ||
| 394 | Alternate="0" /> | ||
| 395 | <pin14 | ||
| 396 | ID="OSC32_IN" | ||
| 397 | Type="PushPull" | ||
| 398 | Level="High" | ||
| 399 | Speed="Maximum" | ||
| 400 | Resistor="Floating" | ||
| 401 | Mode="Input" | ||
| 402 | Alternate="0" /> | ||
| 403 | <pin15 | ||
| 404 | ID="OSC32_OUT" | ||
| 405 | Type="PushPull" | ||
| 406 | Level="High" | ||
| 407 | Speed="Maximum" | ||
| 408 | Resistor="Floating" | ||
| 409 | Mode="Input" | ||
| 410 | Alternate="0" /> | ||
| 411 | </GPIOC> | ||
| 412 | <GPIOD> | ||
| 413 | <pin0 | ||
| 414 | ID="" | ||
| 415 | Type="PushPull" | ||
| 416 | Level="High" | ||
| 417 | Speed="Maximum" | ||
| 418 | Resistor="PullUp" | ||
| 419 | Mode="Input" | ||
| 420 | Alternate="0" /> | ||
| 421 | <pin1 | ||
| 422 | ID="" | ||
| 423 | Type="PushPull" | ||
| 424 | Level="High" | ||
| 425 | Speed="Maximum" | ||
| 426 | Resistor="PullUp" | ||
| 427 | Mode="Input" | ||
| 428 | Alternate="0" /> | ||
| 429 | <pin2 | ||
| 430 | ID="" | ||
| 431 | Type="PushPull" | ||
| 432 | Level="High" | ||
| 433 | Speed="Maximum" | ||
| 434 | Resistor="PullUp" | ||
| 435 | Mode="Input" | ||
| 436 | Alternate="0" /> | ||
| 437 | <pin3 | ||
| 438 | ID="" | ||
| 439 | Type="PushPull" | ||
| 440 | Level="High" | ||
| 441 | Speed="Maximum" | ||
| 442 | Resistor="PullUp" | ||
| 443 | Mode="Input" | ||
| 444 | Alternate="0" /> | ||
| 445 | <pin4 | ||
| 446 | ID="CS43L22_RESET" | ||
| 447 | Type="PushPull" | ||
| 448 | Level="High" | ||
| 449 | Speed="Maximum" | ||
| 450 | Resistor="PullUp" | ||
| 451 | Mode="Output" | ||
| 452 | Alternate="0" /> | ||
| 453 | <pin5 | ||
| 454 | ID="OverCurrent" | ||
| 455 | Type="PushPull" | ||
| 456 | Level="High" | ||
| 457 | Speed="Maximum" | ||
| 458 | Resistor="Floating" | ||
| 459 | Mode="Input" | ||
| 460 | Alternate="0" /> | ||
| 461 | <pin6 | ||
| 462 | ID="" | ||
| 463 | Type="PushPull" | ||
| 464 | Level="High" | ||
| 465 | Speed="Maximum" | ||
| 466 | Resistor="PullUp" | ||
| 467 | Mode="Input" | ||
| 468 | Alternate="0" /> | ||
| 469 | <pin7 | ||
| 470 | ID="" | ||
| 471 | Type="PushPull" | ||
| 472 | Level="High" | ||
| 473 | Speed="Maximum" | ||
| 474 | Resistor="PullUp" | ||
| 475 | Mode="Input" | ||
| 476 | Alternate="0" /> | ||
| 477 | <pin8 | ||
| 478 | ID="" | ||
| 479 | Type="PushPull" | ||
| 480 | Level="High" | ||
| 481 | Speed="Maximum" | ||
| 482 | Resistor="PullUp" | ||
| 483 | Mode="Input" | ||
| 484 | Alternate="0" /> | ||
| 485 | <pin9 | ||
| 486 | ID="" | ||
| 487 | Type="PushPull" | ||
| 488 | Level="High" | ||
| 489 | Speed="Maximum" | ||
| 490 | Resistor="PullUp" | ||
| 491 | Mode="Input" | ||
| 492 | Alternate="0" /> | ||
| 493 | <pin10 | ||
| 494 | ID="" | ||
| 495 | Type="PushPull" | ||
| 496 | Level="High" | ||
| 497 | Speed="Maximum" | ||
| 498 | Resistor="PullUp" | ||
| 499 | Mode="Input" | ||
| 500 | Alternate="0" /> | ||
| 501 | <pin11 | ||
| 502 | ID="" | ||
| 503 | Type="PushPull" | ||
| 504 | Level="High" | ||
| 505 | Speed="Maximum" | ||
| 506 | Resistor="PullUp" | ||
| 507 | Mode="Input" | ||
| 508 | Alternate="0" /> | ||
| 509 | <pin12 | ||
| 510 | ID="LED4" | ||
| 511 | Type="PushPull" | ||
| 512 | Level="Low" | ||
| 513 | Speed="Maximum" | ||
| 514 | Resistor="Floating" | ||
| 515 | Mode="Output" | ||
| 516 | Alternate="0" /> | ||
| 517 | <pin13 | ||
| 518 | ID="LED3" | ||
| 519 | Type="PushPull" | ||
| 520 | Level="Low" | ||
| 521 | Speed="Maximum" | ||
| 522 | Resistor="Floating" | ||
| 523 | Mode="Output" | ||
| 524 | Alternate="0" /> | ||
| 525 | <pin14 | ||
| 526 | ID="LED5" | ||
| 527 | Type="PushPull" | ||
| 528 | Level="Low" | ||
| 529 | Speed="Maximum" | ||
| 530 | Resistor="Floating" | ||
| 531 | Mode="Output" | ||
| 532 | Alternate="0" /> | ||
| 533 | <pin15 | ||
| 534 | ID="LED6" | ||
| 535 | Type="PushPull" | ||
| 536 | Level="Low" | ||
| 537 | Speed="Maximum" | ||
| 538 | Resistor="Floating" | ||
| 539 | Mode="Output" | ||
| 540 | Alternate="0" /> | ||
| 541 | </GPIOD> | ||
| 542 | <GPIOE> | ||
| 543 | <pin0 | ||
| 544 | ID="L3GD20_INT1" | ||
| 545 | Type="PushPull" | ||
| 546 | Level="High" | ||
| 547 | Speed="Maximum" | ||
| 548 | Resistor="PullUp" | ||
| 549 | Mode="Input" | ||
| 550 | Alternate="0" /> | ||
| 551 | <pin1 | ||
| 552 | ID="L3GD20_INT2" | ||
| 553 | Type="PushPull" | ||
| 554 | Level="High" | ||
| 555 | Speed="Maximum" | ||
| 556 | Resistor="PullUp" | ||
| 557 | Mode="Input" | ||
| 558 | Alternate="0" /> | ||
| 559 | <pin2 | ||
| 560 | ID="LSM303DLHC_DRDY" | ||
| 561 | Type="PushPull" | ||
| 562 | Level="High" | ||
| 563 | Speed="Maximum" | ||
| 564 | Resistor="Floating" | ||
| 565 | Mode="Input" | ||
| 566 | Alternate="0" /> | ||
| 567 | <pin3 | ||
| 568 | ID="L3GD20_CS" | ||
| 569 | Type="PushPull" | ||
| 570 | Level="High" | ||
| 571 | Speed="Maximum" | ||
| 572 | Resistor="PullUp" | ||
| 573 | Mode="Output" | ||
| 574 | Alternate="0" /> | ||
| 575 | <pin4 | ||
| 576 | ID="LSM303DLHC_INT1" | ||
| 577 | Type="PushPull" | ||
| 578 | Level="High" | ||
| 579 | Speed="Maximum" | ||
| 580 | Resistor="PullUp" | ||
| 581 | Mode="Output" | ||
| 582 | Alternate="0" /> | ||
| 583 | <pin5 | ||
| 584 | ID="LSM303DLHC_INT2" | ||
| 585 | Type="PushPull" | ||
| 586 | Level="High" | ||
| 587 | Speed="Maximum" | ||
| 588 | Resistor="PullUp" | ||
| 589 | Mode="Output" | ||
| 590 | Alternate="0" /> | ||
| 591 | <pin6 | ||
| 592 | ID="" | ||
| 593 | Type="PushPull" | ||
| 594 | Level="High" | ||
| 595 | Speed="Maximum" | ||
| 596 | Resistor="PullUp" | ||
| 597 | Mode="Input" | ||
| 598 | Alternate="0" /> | ||
| 599 | <pin7 | ||
| 600 | ID="" | ||
| 601 | Type="PushPull" | ||
| 602 | Level="High" | ||
| 603 | Speed="Maximum" | ||
| 604 | Resistor="PullUp" | ||
| 605 | Mode="Input" | ||
| 606 | Alternate="0" /> | ||
| 607 | <pin8 | ||
| 608 | ID="" | ||
| 609 | Type="PushPull" | ||
| 610 | Level="High" | ||
| 611 | Speed="Maximum" | ||
| 612 | Resistor="PullUp" | ||
| 613 | Mode="Input" | ||
| 614 | Alternate="0" /> | ||
| 615 | <pin9 | ||
| 616 | ID="" | ||
| 617 | Type="PushPull" | ||
| 618 | Level="High" | ||
| 619 | Speed="Maximum" | ||
| 620 | Resistor="PullUp" | ||
| 621 | Mode="Input" | ||
| 622 | Alternate="0" /> | ||
| 623 | <pin10 | ||
| 624 | ID="" | ||
| 625 | Type="PushPull" | ||
| 626 | Level="High" | ||
| 627 | Speed="Maximum" | ||
| 628 | Resistor="PullUp" | ||
| 629 | Mode="Input" | ||
| 630 | Alternate="0" /> | ||
| 631 | <pin11 | ||
| 632 | ID="" | ||
| 633 | Type="PushPull" | ||
| 634 | Level="High" | ||
| 635 | Speed="Maximum" | ||
| 636 | Resistor="PullUp" | ||
| 637 | Mode="Input" | ||
| 638 | Alternate="0" /> | ||
| 639 | <pin12 | ||
| 640 | ID="" | ||
| 641 | Type="PushPull" | ||
| 642 | Level="High" | ||
| 643 | Speed="Maximum" | ||
| 644 | Resistor="PullUp" | ||
| 645 | Mode="Input" | ||
| 646 | Alternate="0" /> | ||
| 647 | <pin13 | ||
| 648 | ID="" | ||
| 649 | Type="PushPull" | ||
| 650 | Level="High" | ||
| 651 | Speed="Maximum" | ||
| 652 | Resistor="PullUp" | ||
| 653 | Mode="Input" | ||
| 654 | Alternate="0" /> | ||
| 655 | <pin14 | ||
| 656 | ID="" | ||
| 657 | Type="PushPull" | ||
| 658 | Level="High" | ||
| 659 | Speed="Maximum" | ||
| 660 | Resistor="PullUp" | ||
| 661 | Mode="Input" | ||
| 662 | Alternate="0" /> | ||
| 663 | <pin15 | ||
| 664 | ID="" | ||
| 665 | Type="PushPull" | ||
| 666 | Level="High" | ||
| 667 | Speed="Maximum" | ||
| 668 | Resistor="PullUp" | ||
| 669 | Mode="Input" | ||
| 670 | Alternate="0" /> | ||
| 671 | </GPIOE> | ||
| 672 | <GPIOF> | ||
| 673 | <pin0 | ||
| 674 | ID="" | ||
| 675 | Type="PushPull" | ||
| 676 | Level="High" | ||
| 677 | Speed="Maximum" | ||
| 678 | Resistor="PullUp" | ||
| 679 | Mode="Input" | ||
| 680 | Alternate="0" /> | ||
| 681 | <pin1 | ||
| 682 | ID="" | ||
| 683 | Type="PushPull" | ||
| 684 | Level="High" | ||
| 685 | Speed="Maximum" | ||
| 686 | Resistor="PullUp" | ||
| 687 | Mode="Input" | ||
| 688 | Alternate="0" /> | ||
| 689 | <pin2 | ||
| 690 | ID="" | ||
| 691 | Type="PushPull" | ||
| 692 | Level="High" | ||
| 693 | Speed="Maximum" | ||
| 694 | Resistor="PullUp" | ||
| 695 | Mode="Input" | ||
| 696 | Alternate="0" /> | ||
| 697 | <pin3 | ||
| 698 | ID="" | ||
| 699 | Type="PushPull" | ||
| 700 | Level="High" | ||
| 701 | Speed="Maximum" | ||
| 702 | Resistor="PullUp" | ||
| 703 | Mode="Input" | ||
| 704 | Alternate="0" /> | ||
| 705 | <pin4 | ||
| 706 | ID="" | ||
| 707 | Type="PushPull" | ||
| 708 | Level="High" | ||
| 709 | Speed="Maximum" | ||
| 710 | Resistor="PullUp" | ||
| 711 | Mode="Input" | ||
| 712 | Alternate="0" /> | ||
| 713 | <pin5 | ||
| 714 | ID="" | ||
| 715 | Type="PushPull" | ||
| 716 | Level="High" | ||
| 717 | Speed="Maximum" | ||
| 718 | Resistor="PullUp" | ||
| 719 | Mode="Input" | ||
| 720 | Alternate="0" /> | ||
| 721 | <pin6 | ||
| 722 | ID="" | ||
| 723 | Type="PushPull" | ||
| 724 | Level="High" | ||
| 725 | Speed="Maximum" | ||
| 726 | Resistor="PullUp" | ||
| 727 | Mode="Input" | ||
| 728 | Alternate="0" /> | ||
| 729 | <pin7 | ||
| 730 | ID="" | ||
| 731 | Type="PushPull" | ||
| 732 | Level="High" | ||
| 733 | Speed="Maximum" | ||
| 734 | Resistor="PullUp" | ||
| 735 | Mode="Input" | ||
| 736 | Alternate="0" /> | ||
| 737 | <pin8 | ||
| 738 | ID="" | ||
| 739 | Type="PushPull" | ||
| 740 | Level="High" | ||
| 741 | Speed="Maximum" | ||
| 742 | Resistor="PullUp" | ||
| 743 | Mode="Input" | ||
| 744 | Alternate="0" /> | ||
| 745 | <pin9 | ||
| 746 | ID="" | ||
| 747 | Type="PushPull" | ||
| 748 | Level="High" | ||
| 749 | Speed="Maximum" | ||
| 750 | Resistor="PullUp" | ||
| 751 | Mode="Input" | ||
| 752 | Alternate="0" /> | ||
| 753 | <pin10 | ||
| 754 | ID="" | ||
| 755 | Type="PushPull" | ||
| 756 | Level="High" | ||
| 757 | Speed="Maximum" | ||
| 758 | Resistor="PullUp" | ||
| 759 | Mode="Input" | ||
| 760 | Alternate="0" /> | ||
| 761 | <pin11 | ||
| 762 | ID="" | ||
| 763 | Type="PushPull" | ||
| 764 | Level="High" | ||
| 765 | Speed="Maximum" | ||
| 766 | Resistor="PullUp" | ||
| 767 | Mode="Input" | ||
| 768 | Alternate="0" /> | ||
| 769 | <pin12 | ||
| 770 | ID="" | ||
| 771 | Type="PushPull" | ||
| 772 | Level="High" | ||
| 773 | Speed="Maximum" | ||
| 774 | Resistor="PullUp" | ||
| 775 | Mode="Input" | ||
| 776 | Alternate="0" /> | ||
| 777 | <pin13 | ||
| 778 | ID="" | ||
| 779 | Type="PushPull" | ||
| 780 | Level="High" | ||
| 781 | Speed="Maximum" | ||
| 782 | Resistor="PullUp" | ||
| 783 | Mode="Input" | ||
| 784 | Alternate="0" /> | ||
| 785 | <pin14 | ||
| 786 | ID="" | ||
| 787 | Type="PushPull" | ||
| 788 | Level="High" | ||
| 789 | Speed="Maximum" | ||
| 790 | Resistor="PullUp" | ||
| 791 | Mode="Input" | ||
| 792 | Alternate="0" /> | ||
| 793 | <pin15 | ||
| 794 | ID="" | ||
| 795 | Type="PushPull" | ||
| 796 | Level="High" | ||
| 797 | Speed="Maximum" | ||
| 798 | Resistor="PullUp" | ||
| 799 | Mode="Input" | ||
| 800 | Alternate="0" /> | ||
| 801 | </GPIOF> | ||
| 802 | <GPIOG> | ||
| 803 | <pin0 | ||
| 804 | ID="" | ||
| 805 | Type="PushPull" | ||
| 806 | Level="High" | ||
| 807 | Speed="Maximum" | ||
| 808 | Resistor="PullUp" | ||
| 809 | Mode="Input" | ||
| 810 | Alternate="0" /> | ||
| 811 | <pin1 | ||
| 812 | ID="" | ||
| 813 | Type="PushPull" | ||
| 814 | Level="High" | ||
| 815 | Speed="Maximum" | ||
| 816 | Resistor="PullUp" | ||
| 817 | Mode="Input" | ||
| 818 | Alternate="0" /> | ||
| 819 | <pin2 | ||
| 820 | ID="" | ||
| 821 | Type="PushPull" | ||
| 822 | Level="High" | ||
| 823 | Speed="Maximum" | ||
| 824 | Resistor="PullUp" | ||
| 825 | Mode="Input" | ||
| 826 | Alternate="0" /> | ||
| 827 | <pin3 | ||
| 828 | ID="" | ||
| 829 | Type="PushPull" | ||
| 830 | Level="High" | ||
| 831 | Speed="Maximum" | ||
| 832 | Resistor="PullUp" | ||
| 833 | Mode="Input" | ||
| 834 | Alternate="0" /> | ||
| 835 | <pin4 | ||
| 836 | ID="" | ||
| 837 | Type="PushPull" | ||
| 838 | Level="High" | ||
| 839 | Speed="Maximum" | ||
| 840 | Resistor="PullUp" | ||
| 841 | Mode="Input" | ||
| 842 | Alternate="0" /> | ||
| 843 | <pin5 | ||
| 844 | ID="" | ||
| 845 | Type="PushPull" | ||
| 846 | Level="High" | ||
| 847 | Speed="Maximum" | ||
| 848 | Resistor="PullUp" | ||
| 849 | Mode="Input" | ||
| 850 | Alternate="0" /> | ||
| 851 | <pin6 | ||
| 852 | ID="" | ||
| 853 | Type="PushPull" | ||
| 854 | Level="High" | ||
| 855 | Speed="Maximum" | ||
| 856 | Resistor="PullUp" | ||
| 857 | Mode="Input" | ||
| 858 | Alternate="0" /> | ||
| 859 | <pin7 | ||
| 860 | ID="" | ||
| 861 | Type="PushPull" | ||
| 862 | Level="High" | ||
| 863 | Speed="Maximum" | ||
| 864 | Resistor="PullUp" | ||
| 865 | Mode="Input" | ||
| 866 | Alternate="0" /> | ||
| 867 | <pin8 | ||
| 868 | ID="" | ||
| 869 | Type="PushPull" | ||
| 870 | Level="High" | ||
| 871 | Speed="Maximum" | ||
| 872 | Resistor="PullUp" | ||
| 873 | Mode="Input" | ||
| 874 | Alternate="0" /> | ||
| 875 | <pin9 | ||
| 876 | ID="" | ||
| 877 | Type="PushPull" | ||
| 878 | Level="High" | ||
| 879 | Speed="Maximum" | ||
| 880 | Resistor="PullUp" | ||
| 881 | Mode="Input" | ||
| 882 | Alternate="0" /> | ||
| 883 | <pin10 | ||
| 884 | ID="" | ||
| 885 | Type="PushPull" | ||
| 886 | Level="High" | ||
| 887 | Speed="Maximum" | ||
| 888 | Resistor="PullUp" | ||
| 889 | Mode="Input" | ||
| 890 | Alternate="0" /> | ||
| 891 | <pin11 | ||
| 892 | ID="" | ||
| 893 | Type="PushPull" | ||
| 894 | Level="High" | ||
| 895 | Speed="Maximum" | ||
| 896 | Resistor="PullUp" | ||
| 897 | Mode="Input" | ||
| 898 | Alternate="0" /> | ||
| 899 | <pin12 | ||
| 900 | ID="" | ||
| 901 | Type="PushPull" | ||
| 902 | Level="High" | ||
| 903 | Speed="Maximum" | ||
| 904 | Resistor="PullUp" | ||
| 905 | Mode="Input" | ||
| 906 | Alternate="0" /> | ||
| 907 | <pin13 | ||
| 908 | ID="" | ||
| 909 | Type="PushPull" | ||
| 910 | Level="High" | ||
| 911 | Speed="Maximum" | ||
| 912 | Resistor="PullUp" | ||
| 913 | Mode="Input" | ||
| 914 | Alternate="0" /> | ||
| 915 | <pin14 | ||
| 916 | ID="" | ||
| 917 | Type="PushPull" | ||
| 918 | Level="High" | ||
| 919 | Speed="Maximum" | ||
| 920 | Resistor="PullUp" | ||
| 921 | Mode="Input" | ||
| 922 | Alternate="0" /> | ||
| 923 | <pin15 | ||
| 924 | ID="" | ||
| 925 | Type="PushPull" | ||
| 926 | Level="High" | ||
| 927 | Speed="Maximum" | ||
| 928 | Resistor="PullUp" | ||
| 929 | Mode="Input" | ||
| 930 | Alternate="0" /> | ||
| 931 | </GPIOG> | ||
| 932 | <GPIOH> | ||
| 933 | <pin0 | ||
| 934 | ID="OSC_IN" | ||
| 935 | Type="PushPull" | ||
| 936 | Level="High" | ||
| 937 | Speed="Maximum" | ||
| 938 | Resistor="Floating" | ||
| 939 | Mode="Input" | ||
| 940 | Alternate="0" /> | ||
| 941 | <pin1 | ||
| 942 | ID="OSC_OUT" | ||
| 943 | Type="PushPull" | ||
| 944 | Level="High" | ||
| 945 | Speed="Maximum" | ||
| 946 | Resistor="Floating" | ||
| 947 | Mode="Input" | ||
| 948 | Alternate="0" /> | ||
| 949 | <pin2 | ||
| 950 | ID="" | ||
| 951 | Type="PushPull" | ||
| 952 | Level="High" | ||
| 953 | Speed="Maximum" | ||
| 954 | Resistor="PullUp" | ||
| 955 | Mode="Input" | ||
| 956 | Alternate="0" /> | ||
| 957 | <pin3 | ||
| 958 | ID="" | ||
| 959 | Type="PushPull" | ||
| 960 | Level="High" | ||
| 961 | Speed="Maximum" | ||
| 962 | Resistor="PullUp" | ||
| 963 | Mode="Input" | ||
| 964 | Alternate="0" /> | ||
| 965 | <pin4 | ||
| 966 | ID="" | ||
| 967 | Type="PushPull" | ||
| 968 | Level="High" | ||
| 969 | Speed="Maximum" | ||
| 970 | Resistor="PullUp" | ||
| 971 | Mode="Input" | ||
| 972 | Alternate="0" /> | ||
| 973 | <pin5 | ||
| 974 | ID="" | ||
| 975 | Type="PushPull" | ||
| 976 | Level="High" | ||
| 977 | Speed="Maximum" | ||
| 978 | Resistor="PullUp" | ||
| 979 | Mode="Input" | ||
| 980 | Alternate="0" /> | ||
| 981 | <pin6 | ||
| 982 | ID="" | ||
| 983 | Type="PushPull" | ||
| 984 | Level="High" | ||
| 985 | Speed="Maximum" | ||
| 986 | Resistor="PullUp" | ||
| 987 | Mode="Input" | ||
| 988 | Alternate="0" /> | ||
| 989 | <pin7 | ||
| 990 | ID="" | ||
| 991 | Type="PushPull" | ||
| 992 | Level="High" | ||
| 993 | Speed="Maximum" | ||
| 994 | Resistor="PullUp" | ||
| 995 | Mode="Input" | ||
| 996 | Alternate="0" /> | ||
| 997 | <pin8 | ||
| 998 | ID="" | ||
| 999 | Type="PushPull" | ||
| 1000 | Level="High" | ||
| 1001 | Speed="Maximum" | ||
| 1002 | Resistor="PullUp" | ||
| 1003 | Mode="Input" | ||
| 1004 | Alternate="0" /> | ||
| 1005 | <pin9 | ||
| 1006 | ID="" | ||
| 1007 | Type="PushPull" | ||
| 1008 | Level="High" | ||
| 1009 | Speed="Maximum" | ||
| 1010 | Resistor="PullUp" | ||
| 1011 | Mode="Input" | ||
| 1012 | Alternate="0" /> | ||
| 1013 | <pin10 | ||
| 1014 | ID="" | ||
| 1015 | Type="PushPull" | ||
| 1016 | Level="High" | ||
| 1017 | Speed="Maximum" | ||
| 1018 | Resistor="PullUp" | ||
| 1019 | Mode="Input" | ||
| 1020 | Alternate="0" /> | ||
| 1021 | <pin11 | ||
| 1022 | ID="" | ||
| 1023 | Type="PushPull" | ||
| 1024 | Level="High" | ||
| 1025 | Speed="Maximum" | ||
| 1026 | Resistor="PullUp" | ||
| 1027 | Mode="Input" | ||
| 1028 | Alternate="0" /> | ||
| 1029 | <pin12 | ||
| 1030 | ID="" | ||
| 1031 | Type="PushPull" | ||
| 1032 | Level="High" | ||
| 1033 | Speed="Maximum" | ||
| 1034 | Resistor="PullUp" | ||
| 1035 | Mode="Input" | ||
| 1036 | Alternate="0" /> | ||
| 1037 | <pin13 | ||
| 1038 | ID="" | ||
| 1039 | Type="PushPull" | ||
| 1040 | Level="High" | ||
| 1041 | Speed="Maximum" | ||
| 1042 | Resistor="PullUp" | ||
| 1043 | Mode="Input" | ||
| 1044 | Alternate="0" /> | ||
| 1045 | <pin14 | ||
| 1046 | ID="" | ||
| 1047 | Type="PushPull" | ||
| 1048 | Level="High" | ||
| 1049 | Speed="Maximum" | ||
| 1050 | Resistor="PullUp" | ||
| 1051 | Mode="Input" | ||
| 1052 | Alternate="0" /> | ||
| 1053 | <pin15 | ||
| 1054 | ID="" | ||
| 1055 | Type="PushPull" | ||
| 1056 | Level="High" | ||
| 1057 | Speed="Maximum" | ||
| 1058 | Resistor="PullUp" | ||
| 1059 | Mode="Input" | ||
| 1060 | Alternate="0" /> | ||
| 1061 | </GPIOH> | ||
| 1062 | <GPIOI> | ||
| 1063 | <pin0 | ||
| 1064 | ID="" | ||
| 1065 | Type="PushPull" | ||
| 1066 | Level="High" | ||
| 1067 | Speed="Maximum" | ||
| 1068 | Resistor="PullUp" | ||
| 1069 | Mode="Input" | ||
| 1070 | Alternate="0" /> | ||
| 1071 | <pin1 | ||
| 1072 | ID="" | ||
| 1073 | Type="PushPull" | ||
| 1074 | Level="High" | ||
| 1075 | Speed="Maximum" | ||
| 1076 | Resistor="PullUp" | ||
| 1077 | Mode="Input" | ||
| 1078 | Alternate="0" /> | ||
| 1079 | <pin2 | ||
| 1080 | ID="" | ||
| 1081 | Type="PushPull" | ||
| 1082 | Level="High" | ||
| 1083 | Speed="Maximum" | ||
| 1084 | Resistor="PullUp" | ||
| 1085 | Mode="Input" | ||
| 1086 | Alternate="0" /> | ||
| 1087 | <pin3 | ||
| 1088 | ID="" | ||
| 1089 | Type="PushPull" | ||
| 1090 | Level="High" | ||
| 1091 | Speed="Maximum" | ||
| 1092 | Resistor="PullUp" | ||
| 1093 | Mode="Input" | ||
| 1094 | Alternate="0" /> | ||
| 1095 | <pin4 | ||
| 1096 | ID="" | ||
| 1097 | Type="PushPull" | ||
| 1098 | Level="High" | ||
| 1099 | Speed="Maximum" | ||
| 1100 | Resistor="PullUp" | ||
| 1101 | Mode="Input" | ||
| 1102 | Alternate="0" /> | ||
| 1103 | <pin5 | ||
| 1104 | ID="" | ||
| 1105 | Type="PushPull" | ||
| 1106 | Level="High" | ||
| 1107 | Speed="Maximum" | ||
| 1108 | Resistor="PullUp" | ||
| 1109 | Mode="Input" | ||
| 1110 | Alternate="0" /> | ||
| 1111 | <pin6 | ||
| 1112 | ID="" | ||
| 1113 | Type="PushPull" | ||
| 1114 | Level="High" | ||
| 1115 | Speed="Maximum" | ||
| 1116 | Resistor="PullUp" | ||
| 1117 | Mode="Input" | ||
| 1118 | Alternate="0" /> | ||
| 1119 | <pin7 | ||
| 1120 | ID="" | ||
| 1121 | Type="PushPull" | ||
| 1122 | Level="High" | ||
| 1123 | Speed="Maximum" | ||
| 1124 | Resistor="PullUp" | ||
| 1125 | Mode="Input" | ||
| 1126 | Alternate="0" /> | ||
| 1127 | <pin8 | ||
| 1128 | ID="" | ||
| 1129 | Type="PushPull" | ||
| 1130 | Level="High" | ||
| 1131 | Speed="Maximum" | ||
| 1132 | Resistor="PullUp" | ||
| 1133 | Mode="Input" | ||
| 1134 | Alternate="0" /> | ||
| 1135 | <pin9 | ||
| 1136 | ID="" | ||
| 1137 | Type="PushPull" | ||
| 1138 | Level="High" | ||
| 1139 | Speed="Maximum" | ||
| 1140 | Resistor="PullUp" | ||
| 1141 | Mode="Input" | ||
| 1142 | Alternate="0" /> | ||
| 1143 | <pin10 | ||
| 1144 | ID="" | ||
| 1145 | Type="PushPull" | ||
| 1146 | Level="High" | ||
| 1147 | Speed="Maximum" | ||
| 1148 | Resistor="PullUp" | ||
| 1149 | Mode="Input" | ||
| 1150 | Alternate="0" /> | ||
| 1151 | <pin11 | ||
| 1152 | ID="" | ||
| 1153 | Type="PushPull" | ||
| 1154 | Level="High" | ||
| 1155 | Speed="Maximum" | ||
| 1156 | Resistor="PullUp" | ||
| 1157 | Mode="Input" | ||
| 1158 | Alternate="0" /> | ||
| 1159 | <pin12 | ||
| 1160 | ID="" | ||
| 1161 | Type="PushPull" | ||
| 1162 | Level="High" | ||
| 1163 | Speed="Maximum" | ||
| 1164 | Resistor="PullUp" | ||
| 1165 | Mode="Input" | ||
| 1166 | Alternate="0" /> | ||
| 1167 | <pin13 | ||
| 1168 | ID="" | ||
| 1169 | Type="PushPull" | ||
| 1170 | Level="High" | ||
| 1171 | Speed="Maximum" | ||
| 1172 | Resistor="PullUp" | ||
| 1173 | Mode="Input" | ||
| 1174 | Alternate="0" /> | ||
| 1175 | <pin14 | ||
| 1176 | ID="" | ||
| 1177 | Type="PushPull" | ||
| 1178 | Level="High" | ||
| 1179 | Speed="Maximum" | ||
| 1180 | Resistor="PullUp" | ||
| 1181 | Mode="Input" | ||
| 1182 | Alternate="0" /> | ||
| 1183 | <pin15 | ||
| 1184 | ID="" | ||
| 1185 | Type="PushPull" | ||
| 1186 | Level="High" | ||
| 1187 | Speed="Maximum" | ||
| 1188 | Resistor="PullUp" | ||
| 1189 | Mode="Input" | ||
| 1190 | Alternate="0" /> | ||
| 1191 | </GPIOI> | ||
| 1192 | </ports> | ||
| 1193 | </board> | ||
diff --git a/drivers/boards/BLACKPILL_STM32_F401/cfg/board.fmpp b/drivers/boards/BLACKPILL_STM32_F401/cfg/board.fmpp deleted file mode 100644 index 41754c141..000000000 --- a/drivers/boards/BLACKPILL_STM32_F401/cfg/board.fmpp +++ /dev/null | |||
| @@ -1,15 +0,0 @@ | |||
| 1 | sourceRoot: ../../../../../tools/ftl/processors/boards/stm32f4xx/templates | ||
| 2 | outputRoot: .. | ||
| 3 | dataRoot: . | ||
| 4 | |||
| 5 | freemarkerLinks: { | ||
| 6 | lib: ../../../../../tools/ftl/libs | ||
| 7 | } | ||
| 8 | |||
| 9 | data : { | ||
| 10 | doc1:xml ( | ||
| 11 | board.chcfg | ||
| 12 | { | ||
| 13 | } | ||
| 14 | ) | ||
| 15 | } | ||
diff --git a/drivers/boards/BLACKPILL_STM32_F411/board.c b/drivers/boards/BLACKPILL_STM32_F411/board.c deleted file mode 100644 index 330e06c8a..000000000 --- a/drivers/boards/BLACKPILL_STM32_F411/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 | */ | ||
| 40 | typedef struct { | ||
| 41 | uint32_t moder; | ||
| 42 | uint32_t otyper; | ||
| 43 | uint32_t ospeedr; | ||
| 44 | uint32_t pupdr; | ||
| 45 | uint32_t odr; | ||
| 46 | uint32_t afrl; | ||
| 47 | uint32_t afrh; | ||
| 48 | } gpio_setup_t; | ||
| 49 | |||
| 50 | /** | ||
| 51 | * @brief Type of STM32 GPIO initialization data. | ||
| 52 | */ | ||
| 53 | typedef 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 | */ | ||
| 92 | static 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 | |||
| 132 | static 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 | |||
| 142 | static void stm32_gpio_init(void) { | ||
| 143 | /* Enabling GPIO-related clocks, the mask comes from the | ||
| 144 | registry header file.*/ | ||
| 145 | rccResetAHB1(STM32_GPIO_EN_MASK); | ||
| 146 | rccEnableAHB1(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 | */ | ||
| 199 | void __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 | */ | ||
| 210 | bool 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 | */ | ||
| 219 | bool 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 | */ | ||
| 230 | bool 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 | */ | ||
| 239 | bool 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 | */ | ||
| 250 | void boardInit(void) {} | ||
diff --git a/drivers/boards/BLACKPILL_STM32_F411/board.h b/drivers/boards/BLACKPILL_STM32_F411/board.h deleted file mode 100644 index c0613b4a7..000000000 --- a/drivers/boards/BLACKPILL_STM32_F411/board.h +++ /dev/null | |||
| @@ -1,583 +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 STM32F411CEU6 black pill board. | ||
| 31 | */ | ||
| 32 | |||
| 33 | /* | ||
| 34 | * Board identifier. | ||
| 35 | */ | ||
| 36 | #define BOARD_BLACKPILL_STM32_F411 | ||
| 37 | #define BOARD_NAME "STM32F411CEU6 blackpill" | ||
| 38 | |||
| 39 | /* | ||
| 40 | * Allow Board to boot USB without extra A9 hardware/software config | ||
| 41 | */ | ||
| 42 | #define BOARD_OTG_NOVBUSSENS 1 | ||
| 43 | |||
| 44 | /* | ||
| 45 | * Board oscillators-related settings. | ||
| 46 | */ | ||
| 47 | #if !defined(STM32_LSECLK) | ||
| 48 | # define STM32_LSECLK 32768U | ||
| 49 | #endif | ||
| 50 | |||
| 51 | #if !defined(STM32_HSECLK) | ||
| 52 | # define STM32_HSECLK 25000000U | ||
| 53 | #endif | ||
| 54 | |||
| 55 | //#define STM32_HSE_BYPASS | ||
| 56 | |||
| 57 | /* | ||
| 58 | * Board voltages. | ||
| 59 | * Required for performance limits calculation. | ||
| 60 | */ | ||
| 61 | #define STM32_VDD 300U | ||
| 62 | |||
| 63 | /* | ||
| 64 | * MCU type as defined in the ST header. | ||
| 65 | */ | ||
| 66 | #define STM32F411xE | ||
| 67 | |||
| 68 | /* | ||
| 69 | * IO pins assignments. | ||
| 70 | */ | ||
| 71 | #define GPIOA_ARD_A0 0U | ||
| 72 | #define GPIOA_ADC1_IN0 0U | ||
| 73 | #define GPIOA_ARD_A1 1U | ||
| 74 | #define GPIOA_ADC1_IN1 1U | ||
| 75 | #define GPIOA_ARD_D1 2U | ||
| 76 | #define GPIOA_USART2_TX 2U | ||
| 77 | #define GPIOA_ARD_D0 3U | ||
| 78 | #define GPIOA_USART2_RX 3U | ||
| 79 | #define GPIOA_ARD_A2 4U | ||
| 80 | #define GPIOA_ADC1_IN4 4U | ||
| 81 | #define GPIOA_LED_GREEN 5U | ||
| 82 | #define GPIOA_ARD_D13 5U | ||
| 83 | #define GPIOA_ARD_D12 6U | ||
| 84 | #define GPIOA_ARD_D11 7U | ||
| 85 | #define GPIOA_ARD_D7 8U | ||
| 86 | #define GPIOA_ARD_D8 9U | ||
| 87 | #define GPIOA_ARD_D2 10U | ||
| 88 | #define GPIOA_OTG_FS_DM 11U | ||
| 89 | #define GPIOA_OTG_FS_DP 12U | ||
| 90 | #define GPIOA_SWDIO 13U | ||
| 91 | #define GPIOA_SWCLK 14U | ||
| 92 | #define GPIOA_PIN15 15U | ||
| 93 | |||
| 94 | #define GPIOB_ARD_A3 0U | ||
| 95 | #define GPIOB_ADC1_IN8 0U | ||
| 96 | #define GPIOB_PIN1 1U | ||
| 97 | #define GPIOB_PIN2 2U | ||
| 98 | #define GPIOB_SWO 3U | ||
| 99 | #define GPIOB_ARD_D3 3U | ||
| 100 | #define GPIOB_ARD_D5 4U | ||
| 101 | #define GPIOB_ARD_D4 5U | ||
| 102 | #define GPIOB_ARD_D10 6U | ||
| 103 | #define GPIOB_PIN7 7U | ||
| 104 | #define GPIOB_ARD_D15 8U | ||
| 105 | #define GPIOB_ARD_D14 9U | ||
| 106 | #define GPIOB_ARD_D6 10U | ||
| 107 | #define GPIOB_PIN11 11U | ||
| 108 | #define GPIOB_PIN12 12U | ||
| 109 | #define GPIOB_PIN13 13U | ||
| 110 | #define GPIOB_PIN14 14U | ||
| 111 | #define GPIOB_PIN15 15U | ||
| 112 | |||
| 113 | #define GPIOC_ARD_A5 0U | ||
| 114 | #define GPIOC_ADC1_IN10 0U | ||
| 115 | #define GPIOC_ARD_A4 1U | ||
| 116 | #define GPIOC_ADC1_IN11 1U | ||
| 117 | #define GPIOC_PIN2 2U | ||
| 118 | #define GPIOC_PIN3 3U | ||
| 119 | #define GPIOC_PIN4 4U | ||
| 120 | #define GPIOC_PIN5 5U | ||
| 121 | #define GPIOC_PIN6 6U | ||
| 122 | #define GPIOC_ARD_D9 7U | ||
| 123 | #define GPIOC_PIN8 8U | ||
| 124 | #define GPIOC_PIN9 9U | ||
| 125 | #define GPIOC_PIN10 10U | ||
| 126 | #define GPIOC_PIN11 11U | ||
| 127 | #define GPIOC_PIN12 12U | ||
| 128 | #define GPIOC_BUTTON 13U | ||
| 129 | #define GPIOC_OSC32_IN 14U | ||
| 130 | #define GPIOC_OSC32_OUT 15U | ||
| 131 | |||
| 132 | #define GPIOD_PIN0 0U | ||
| 133 | #define GPIOD_PIN1 1U | ||
| 134 | #define GPIOD_PIN2 2U | ||
| 135 | #define GPIOD_PIN3 3U | ||
| 136 | #define GPIOD_PIN4 4U | ||
| 137 | #define GPIOD_PIN5 5U | ||
| 138 | #define GPIOD_PIN6 6U | ||
| 139 | #define GPIOD_PIN7 7U | ||
| 140 | #define GPIOD_PIN8 8U | ||
| 141 | #define GPIOD_PIN9 9U | ||
| 142 | #define GPIOD_PIN10 10U | ||
| 143 | #define GPIOD_PIN11 11U | ||
| 144 | #define GPIOD_PIN12 12U | ||
| 145 | #define GPIOD_PIN13 13U | ||
| 146 | #define GPIOD_PIN14 14U | ||
| 147 | #define GPIOD_PIN15 15U | ||
| 148 | |||
| 149 | #define GPIOE_PIN0 0U | ||
| 150 | #define GPIOE_PIN1 1U | ||
| 151 | #define GPIOE_PIN2 2U | ||
| 152 | #define GPIOE_PIN3 3U | ||
| 153 | #define GPIOE_PIN4 4U | ||
| 154 | #define GPIOE_PIN5 5U | ||
| 155 | #define GPIOE_PIN6 6U | ||
| 156 | #define GPIOE_PIN7 7U | ||
| 157 | #define GPIOE_PIN8 8U | ||
| 158 | #define GPIOE_PIN9 9U | ||
| 159 | #define GPIOE_PIN10 10U | ||
| 160 | #define GPIOE_PIN11 11U | ||
| 161 | #define GPIOE_PIN12 12U | ||
| 162 | #define GPIOE_PIN13 13U | ||
| 163 | #define GPIOE_PIN14 14U | ||
| 164 | #define GPIOE_PIN15 15U | ||
| 165 | |||
| 166 | #define GPIOF_PIN0 0U | ||
| 167 | #define GPIOF_PIN1 1U | ||
| 168 | #define GPIOF_PIN2 2U | ||
| 169 | #define GPIOF_PIN3 3U | ||
| 170 | #define GPIOF_PIN4 4U | ||
| 171 | #define GPIOF_PIN5 5U | ||
| 172 | #define GPIOF_PIN6 6U | ||
| 173 | #define GPIOF_PIN7 7U | ||
| 174 | #define GPIOF_PIN8 8U | ||
| 175 | #define GPIOF_PIN9 9U | ||
| 176 | #define GPIOF_PIN10 10U | ||
| 177 | #define GPIOF_PIN11 11U | ||
| 178 | #define GPIOF_PIN12 12U | ||
| 179 | #define GPIOF_PIN13 13U | ||
| 180 | #define GPIOF_PIN14 14U | ||
| 181 | #define GPIOF_PIN15 15U | ||
| 182 | |||
| 183 | #define GPIOG_PIN0 0U | ||
| 184 | #define GPIOG_PIN1 1U | ||
| 185 | #define GPIOG_PIN2 2U | ||
| 186 | #define GPIOG_PIN3 3U | ||
| 187 | #define GPIOG_PIN4 4U | ||
| 188 | #define GPIOG_PIN5 5U | ||
| 189 | #define GPIOG_PIN6 6U | ||
| 190 | #define GPIOG_PIN7 7U | ||
| 191 | #define GPIOG_PIN8 8U | ||
| 192 | #define GPIOG_PIN9 9U | ||
| 193 | #define GPIOG_PIN10 10U | ||
| 194 | #define GPIOG_PIN11 11U | ||
| 195 | #define GPIOG_PIN12 12U | ||
| 196 | #define GPIOG_PIN13 13U | ||
| 197 | #define GPIOG_PIN14 14U | ||
| 198 | #define GPIOG_PIN15 15U | ||
| 199 | |||
| 200 | #define GPIOH_OSC_IN 0U | ||
| 201 | #define GPIOH_OSC_OUT 1U | ||
| 202 | #define GPIOH_PIN2 2U | ||
| 203 | #define GPIOH_PIN3 3U | ||
| 204 | #define GPIOH_PIN4 4U | ||
| 205 | #define GPIOH_PIN5 5U | ||
| 206 | #define GPIOH_PIN6 6U | ||
| 207 | #define GPIOH_PIN7 7U | ||
| 208 | #define GPIOH_PIN8 8U | ||
| 209 | #define GPIOH_PIN9 9U | ||
| 210 | #define GPIOH_PIN10 10U | ||
| 211 | #define GPIOH_PIN11 11U | ||
| 212 | #define GPIOH_PIN12 12U | ||
| 213 | #define GPIOH_PIN13 13U | ||
| 214 | #define GPIOH_PIN14 14U | ||
| 215 | #define GPIOH_PIN15 15U | ||
| 216 | |||
| 217 | #define GPIOI_PIN0 0U | ||
| 218 | #define GPIOI_PIN1 1U | ||
| 219 | #define GPIOI_PIN2 2U | ||
| 220 | #define GPIOI_PIN3 3U | ||
| 221 | #define GPIOI_PIN4 4U | ||
| 222 | #define GPIOI_PIN5 5U | ||
| 223 | #define GPIOI_PIN6 6U | ||
| 224 | #define GPIOI_PIN7 7U | ||
| 225 | #define GPIOI_PIN8 8U | ||
| 226 | #define GPIOI_PIN9 9U | ||
| 227 | #define GPIOI_PIN10 10U | ||
| 228 | #define GPIOI_PIN11 11U | ||
| 229 | #define GPIOI_PIN12 12U | ||
| 230 | #define GPIOI_PIN13 13U | ||
| 231 | #define GPIOI_PIN14 14U | ||
| 232 | #define GPIOI_PIN15 15U | ||
| 233 | |||
| 234 | /* | ||
| 235 | * IO lines assignments. | ||
| 236 | */ | ||
| 237 | #define LINE_ARD_A0 PAL_LINE(GPIOA, 0U) | ||
| 238 | #define LINE_ADC1_IN0 PAL_LINE(GPIOA, 0U) | ||
| 239 | #define LINE_ARD_A1 PAL_LINE(GPIOA, 1U) | ||
| 240 | #define LINE_ADC1_IN1 PAL_LINE(GPIOA, 1U) | ||
| 241 | #define LINE_ARD_D1 PAL_LINE(GPIOA, 2U) | ||
| 242 | #define LINE_USART2_TX PAL_LINE(GPIOA, 2U) | ||
| 243 | #define LINE_ARD_D0 PAL_LINE(GPIOA, 3U) | ||
| 244 | #define LINE_USART2_RX PAL_LINE(GPIOA, 3U) | ||
| 245 | #define LINE_ARD_A2 PAL_LINE(GPIOA, 4U) | ||
| 246 | #define LINE_ADC1_IN4 PAL_LINE(GPIOA, 4U) | ||
| 247 | #define LINE_LED_GREEN PAL_LINE(GPIOA, 5U) | ||
| 248 | #define LINE_ARD_D13 PAL_LINE(GPIOA, 5U) | ||
| 249 | #define LINE_ARD_D12 PAL_LINE(GPIOA, 6U) | ||
| 250 | #define LINE_ARD_D11 PAL_LINE(GPIOA, 7U) | ||
| 251 | #define LINE_ARD_D7 PAL_LINE(GPIOA, 8U) | ||
| 252 | #define LINE_ARD_D8 PAL_LINE(GPIOA, 9U) | ||
| 253 | #define LINE_ARD_D2 PAL_LINE(GPIOA, 10U) | ||
| 254 | #define LINE_OTG_FS_DM PAL_LINE(GPIOA, 11U) | ||
| 255 | #define LINE_OTG_FS_DP PAL_LINE(GPIOA, 12U) | ||
| 256 | #define LINE_SWDIO PAL_LINE(GPIOA, 13U) | ||
| 257 | #define LINE_SWCLK PAL_LINE(GPIOA, 14U) | ||
| 258 | #define LINE_ARD_A3 PAL_LINE(GPIOB, 0U) | ||
| 259 | #define LINE_ADC1_IN8 PAL_LINE(GPIOB, 0U) | ||
| 260 | #define LINE_SWO PAL_LINE(GPIOB, 3U) | ||
| 261 | #define LINE_ARD_D3 PAL_LINE(GPIOB, 3U) | ||
| 262 | #define LINE_ARD_D5 PAL_LINE(GPIOB, 4U) | ||
| 263 | #define LINE_ARD_D4 PAL_LINE(GPIOB, 5U) | ||
| 264 | #define LINE_ARD_D10 PAL_LINE(GPIOB, 6U) | ||
| 265 | #define LINE_ARD_D15 PAL_LINE(GPIOB, 8U) | ||
| 266 | #define LINE_ARD_D14 PAL_LINE(GPIOB, 9U) | ||
| 267 | #define LINE_ARD_D6 PAL_LINE(GPIOB, 10U) | ||
| 268 | #define LINE_ARD_A5 PAL_LINE(GPIOC, 0U) | ||
| 269 | #define LINE_ADC1_IN10 PAL_LINE(GPIOC, 0U) | ||
| 270 | #define LINE_ARD_A4 PAL_LINE(GPIOC, 1U) | ||
| 271 | #define LINE_ADC1_IN11 PAL_LINE(GPIOC, 1U) | ||
| 272 | #define LINE_ARD_D9 PAL_LINE(GPIOC, 7U) | ||
| 273 | #define LINE_BUTTON PAL_LINE(GPIOC, 13U) | ||
| 274 | #define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) | ||
| 275 | #define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) | ||
| 276 | #define LINE_OSC_IN PAL_LINE(GPIOH, 0U) | ||
| 277 | #define LINE_OSC_OUT PAL_LINE(GPIOH, 1U) | ||
| 278 | |||
| 279 | /*===========================================================================*/ | ||
| 280 | /* Driver pre-compile time settings. */ | ||
| 281 | /*===========================================================================*/ | ||
| 282 | |||
| 283 | /*===========================================================================*/ | ||
| 284 | /* Derived constants and error checks. */ | ||
| 285 | /*===========================================================================*/ | ||
| 286 | |||
| 287 | /*===========================================================================*/ | ||
| 288 | /* Driver data structures and types. */ | ||
| 289 | /*===========================================================================*/ | ||
| 290 | |||
| 291 | /*===========================================================================*/ | ||
| 292 | /* Driver macros. */ | ||
| 293 | /*===========================================================================*/ | ||
| 294 | |||
| 295 | /* | ||
| 296 | * I/O ports initial setup, this configuration is established soon after reset | ||
| 297 | * in the initialization code. | ||
| 298 | * Please refer to the STM32 Reference Manual for details. | ||
| 299 | */ | ||
| 300 | #define PIN_MODE_INPUT(n) (0U << ((n)*2U)) | ||
| 301 | #define PIN_MODE_OUTPUT(n) (1U << ((n)*2U)) | ||
| 302 | #define PIN_MODE_ALTERNATE(n) (2U << ((n)*2U)) | ||
| 303 | #define PIN_MODE_ANALOG(n) (3U << ((n)*2U)) | ||
| 304 | #define PIN_ODR_LOW(n) (0U << (n)) | ||
| 305 | #define PIN_ODR_HIGH(n) (1U << (n)) | ||
| 306 | #define PIN_OTYPE_PUSHPULL(n) (0U << (n)) | ||
| 307 | #define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) | ||
| 308 | #define PIN_OSPEED_VERYLOW(n) (0U << ((n)*2U)) | ||
| 309 | #define PIN_OSPEED_LOW(n) (1U << ((n)*2U)) | ||
| 310 | #define PIN_OSPEED_MEDIUM(n) (2U << ((n)*2U)) | ||
| 311 | #define PIN_OSPEED_HIGH(n) (3U << ((n)*2U)) | ||
| 312 | #define PIN_PUPDR_FLOATING(n) (0U << ((n)*2U)) | ||
| 313 | #define PIN_PUPDR_PULLUP(n) (1U << ((n)*2U)) | ||
| 314 | #define PIN_PUPDR_PULLDOWN(n) (2U << ((n)*2U)) | ||
| 315 | #define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) | ||
| 316 | |||
| 317 | /* | ||
| 318 | * GPIOA setup: | ||
| 319 | * | ||
| 320 | * PA0 - ARD_A0 ADC1_IN0 (input pullup). | ||
| 321 | * PA1 - ARD_A1 ADC1_IN1 (input pullup). | ||
| 322 | * PA2 - ARD_D1 USART2_TX (alternate 7). | ||
| 323 | * PA3 - ARD_D0 USART2_RX (alternate 7). | ||
| 324 | * PA4 - ARD_A2 ADC1_IN4 (input pullup). | ||
| 325 | * PA5 - LED_GREEN ARD_D13 (output pushpull high). | ||
| 326 | * PA6 - ARD_D12 (input pullup). | ||
| 327 | * PA7 - ARD_D11 (input pullup). | ||
| 328 | * PA8 - ARD_D7 (input pullup). | ||
| 329 | * PA9 - ARD_D8 (input pullup). | ||
| 330 | * PA10 - ARD_D2 (input pullup). | ||
| 331 | * PA11 - OTG_FS_DM (alternate 10). | ||
| 332 | * PA12 - OTG_FS_DP (alternate 10). | ||
| 333 | * PA13 - SWDIO (alternate 0). | ||
| 334 | * PA14 - SWCLK (alternate 0). | ||
| 335 | * PA15 - PIN15 (input pullup). | ||
| 336 | */ | ||
| 337 | #define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_ARD_A0) | PIN_MODE_INPUT(GPIOA_ARD_A1) | PIN_MODE_ALTERNATE(GPIOA_ARD_D1) | PIN_MODE_ALTERNATE(GPIOA_ARD_D0) | PIN_MODE_INPUT(GPIOA_ARD_A2) | PIN_MODE_OUTPUT(GPIOA_LED_GREEN) | PIN_MODE_INPUT(GPIOA_ARD_D12) | PIN_MODE_INPUT(GPIOA_ARD_D11) | PIN_MODE_INPUT(GPIOA_ARD_D7) | PIN_MODE_INPUT(GPIOA_ARD_D8) | PIN_MODE_INPUT(GPIOA_ARD_D2) | PIN_MODE_ALTERNATE(GPIOA_OTG_FS_DM) | PIN_MODE_ALTERNATE(GPIOA_OTG_FS_DP) | PIN_MODE_ALTERNATE(GPIOA_SWDIO) | PIN_MODE_ALTERNATE(GPIOA_SWCLK) | PIN_MODE_INPUT(GPIOA_PIN15)) | ||
| 338 | #define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_ARD_A0) | PIN_OTYPE_PUSHPULL(GPIOA_ARD_A1) | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D1) | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D0) | PIN_OTYPE_PUSHPULL(GPIOA_ARD_A2) | PIN_OTYPE_PUSHPULL(GPIOA_LED_GREEN) | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D12) | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D11) | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D7) | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D8) | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D2) | PIN_OTYPE_PUSHPULL(GPIOA_OTG_FS_DM) | PIN_OTYPE_PUSHPULL(GPIOA_OTG_FS_DP) | PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) | ||
| 339 | #define VAL_GPIOA_OSPEEDR (PIN_OSPEED_HIGH(GPIOA_ARD_A0) | PIN_OSPEED_HIGH(GPIOA_ARD_A1) | PIN_OSPEED_MEDIUM(GPIOA_ARD_D1) | PIN_OSPEED_MEDIUM(GPIOA_ARD_D0) | PIN_OSPEED_HIGH(GPIOA_ARD_A2) | PIN_OSPEED_MEDIUM(GPIOA_LED_GREEN) | PIN_OSPEED_HIGH(GPIOA_ARD_D12) | PIN_OSPEED_HIGH(GPIOA_ARD_D11) | PIN_OSPEED_HIGH(GPIOA_ARD_D7) | PIN_OSPEED_HIGH(GPIOA_ARD_D8) | PIN_OSPEED_HIGH(GPIOA_ARD_D2) | PIN_OSPEED_HIGH(GPIOA_OTG_FS_DM) | PIN_OSPEED_HIGH(GPIOA_OTG_FS_DP) | PIN_OSPEED_HIGH(GPIOA_SWDIO) | PIN_OSPEED_HIGH(GPIOA_SWCLK) | PIN_OSPEED_HIGH(GPIOA_PIN15)) | ||
| 340 | #define VAL_GPIOA_PUPDR (PIN_PUPDR_PULLUP(GPIOA_ARD_A0) | PIN_PUPDR_PULLUP(GPIOA_ARD_A1) | PIN_PUPDR_FLOATING(GPIOA_ARD_D1) | PIN_PUPDR_FLOATING(GPIOA_ARD_D0) | PIN_PUPDR_PULLUP(GPIOA_ARD_A2) | PIN_PUPDR_FLOATING(GPIOA_LED_GREEN) | PIN_PUPDR_PULLUP(GPIOA_ARD_D12) | PIN_PUPDR_PULLUP(GPIOA_ARD_D11) | PIN_PUPDR_PULLUP(GPIOA_ARD_D7) | PIN_PUPDR_PULLUP(GPIOA_ARD_D8) | PIN_PUPDR_PULLUP(GPIOA_ARD_D2) | PIN_PUPDR_FLOATING(GPIOA_OTG_FS_DM) | PIN_PUPDR_FLOATING(GPIOA_OTG_FS_DP) | PIN_PUPDR_PULLUP(GPIOA_SWDIO) | PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | PIN_PUPDR_PULLUP(GPIOA_PIN15)) | ||
| 341 | #define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_ARD_A0) | PIN_ODR_HIGH(GPIOA_ARD_A1) | PIN_ODR_HIGH(GPIOA_ARD_D1) | PIN_ODR_HIGH(GPIOA_ARD_D0) | PIN_ODR_HIGH(GPIOA_ARD_A2) | PIN_ODR_LOW(GPIOA_LED_GREEN) | PIN_ODR_HIGH(GPIOA_ARD_D12) | PIN_ODR_HIGH(GPIOA_ARD_D11) | PIN_ODR_HIGH(GPIOA_ARD_D7) | PIN_ODR_HIGH(GPIOA_ARD_D8) | PIN_ODR_HIGH(GPIOA_ARD_D2) | PIN_ODR_HIGH(GPIOA_OTG_FS_DM) | PIN_ODR_HIGH(GPIOA_OTG_FS_DP) | PIN_ODR_HIGH(GPIOA_SWDIO) | PIN_ODR_HIGH(GPIOA_SWCLK) | PIN_ODR_HIGH(GPIOA_PIN15)) | ||
| 342 | #define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_ARD_A0, 0U) | PIN_AFIO_AF(GPIOA_ARD_A1, 0U) | PIN_AFIO_AF(GPIOA_ARD_D1, 7U) | PIN_AFIO_AF(GPIOA_ARD_D0, 7U) | PIN_AFIO_AF(GPIOA_ARD_A2, 0U) | PIN_AFIO_AF(GPIOA_LED_GREEN, 0U) | PIN_AFIO_AF(GPIOA_ARD_D12, 0U) | PIN_AFIO_AF(GPIOA_ARD_D11, 0U)) | ||
| 343 | #define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_ARD_D7, 0U) | PIN_AFIO_AF(GPIOA_ARD_D8, 0U) | PIN_AFIO_AF(GPIOA_ARD_D2, 0U) | PIN_AFIO_AF(GPIOA_OTG_FS_DM, 10U) | PIN_AFIO_AF(GPIOA_OTG_FS_DP, 10U) | PIN_AFIO_AF(GPIOA_SWDIO, 0U) | PIN_AFIO_AF(GPIOA_SWCLK, 0U) | PIN_AFIO_AF(GPIOA_PIN15, 0U)) | ||
| 344 | |||
| 345 | /* | ||
| 346 | * GPIOB setup: | ||
| 347 | * | ||
| 348 | * PB0 - ARD_A3 ADC1_IN8 (input pullup). | ||
| 349 | * PB1 - PIN1 (input pullup). | ||
| 350 | * PB2 - PIN2 (input pullup). | ||
| 351 | * PB3 - SWO ARD_D3 (alternate 0). | ||
| 352 | * PB4 - ARD_D5 (input pullup). | ||
| 353 | * PB5 - ARD_D4 (input pullup). | ||
| 354 | * PB6 - ARD_D10 (input pullup). | ||
| 355 | * PB7 - PIN7 (input pullup). | ||
| 356 | * PB8 - ARD_D15 (input pullup). | ||
| 357 | * PB9 - ARD_D14 (input pullup). | ||
| 358 | * PB10 - ARD_D6 (input pullup). | ||
| 359 | * PB11 - PIN11 (input pullup). | ||
| 360 | * PB12 - PIN12 (input pullup). | ||
| 361 | * PB13 - PIN13 (input pullup). | ||
| 362 | * PB14 - PIN14 (input pullup). | ||
| 363 | * PB15 - PIN15 (input pullup). | ||
| 364 | */ | ||
| 365 | #define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_ARD_A3) | PIN_MODE_INPUT(GPIOB_PIN1) | PIN_MODE_INPUT(GPIOB_PIN2) | PIN_MODE_ALTERNATE(GPIOB_SWO) | PIN_MODE_INPUT(GPIOB_ARD_D5) | PIN_MODE_INPUT(GPIOB_ARD_D4) | PIN_MODE_INPUT(GPIOB_ARD_D10) | PIN_MODE_INPUT(GPIOB_PIN7) | PIN_MODE_INPUT(GPIOB_ARD_D15) | PIN_MODE_INPUT(GPIOB_ARD_D14) | PIN_MODE_INPUT(GPIOB_ARD_D6) | PIN_MODE_INPUT(GPIOB_PIN11) | PIN_MODE_INPUT(GPIOB_PIN12) | PIN_MODE_INPUT(GPIOB_PIN13) | PIN_MODE_INPUT(GPIOB_PIN14) | PIN_MODE_INPUT(GPIOB_PIN15)) | ||
| 366 | #define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_ARD_A3) | PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | PIN_OTYPE_PUSHPULL(GPIOB_SWO) | PIN_OTYPE_PUSHPULL(GPIOB_ARD_D5) | PIN_OTYPE_PUSHPULL(GPIOB_ARD_D4) | PIN_OTYPE_PUSHPULL(GPIOB_ARD_D10) | PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | PIN_OTYPE_PUSHPULL(GPIOB_ARD_D15) | PIN_OTYPE_PUSHPULL(GPIOB_ARD_D14) | PIN_OTYPE_PUSHPULL(GPIOB_ARD_D6) | PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | PIN_OTYPE_PUSHPULL(GPIOB_PIN13) | PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) | ||
| 367 | #define VAL_GPIOB_OSPEEDR (PIN_OSPEED_HIGH(GPIOB_ARD_A3) | PIN_OSPEED_HIGH(GPIOB_PIN1) | PIN_OSPEED_HIGH(GPIOB_PIN2) | PIN_OSPEED_HIGH(GPIOB_SWO) | PIN_OSPEED_HIGH(GPIOB_ARD_D5) | PIN_OSPEED_HIGH(GPIOB_ARD_D4) | PIN_OSPEED_HIGH(GPIOB_ARD_D10) | PIN_OSPEED_HIGH(GPIOB_PIN7) | PIN_OSPEED_HIGH(GPIOB_ARD_D15) | PIN_OSPEED_HIGH(GPIOB_ARD_D14) | PIN_OSPEED_HIGH(GPIOB_ARD_D6) | PIN_OSPEED_HIGH(GPIOB_PIN11) | PIN_OSPEED_HIGH(GPIOB_PIN12) | PIN_OSPEED_HIGH(GPIOB_PIN13) | PIN_OSPEED_HIGH(GPIOB_PIN14) | PIN_OSPEED_HIGH(GPIOB_PIN15)) | ||
| 368 | #define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_ARD_A3) | PIN_PUPDR_PULLUP(GPIOB_PIN1) | PIN_PUPDR_PULLUP(GPIOB_PIN2) | PIN_PUPDR_PULLUP(GPIOB_SWO) | PIN_PUPDR_PULLUP(GPIOB_ARD_D5) | PIN_PUPDR_PULLUP(GPIOB_ARD_D4) | PIN_PUPDR_PULLUP(GPIOB_ARD_D10) | PIN_PUPDR_PULLUP(GPIOB_PIN7) | PIN_PUPDR_PULLUP(GPIOB_ARD_D15) | PIN_PUPDR_PULLUP(GPIOB_ARD_D14) | PIN_PUPDR_PULLUP(GPIOB_ARD_D6) | PIN_PUPDR_PULLUP(GPIOB_PIN11) | PIN_PUPDR_PULLUP(GPIOB_PIN12) | PIN_PUPDR_PULLUP(GPIOB_PIN13) | PIN_PUPDR_PULLUP(GPIOB_PIN14) | PIN_PUPDR_PULLUP(GPIOB_PIN15)) | ||
| 369 | #define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_ARD_A3) | PIN_ODR_HIGH(GPIOB_PIN1) | PIN_ODR_HIGH(GPIOB_PIN2) | PIN_ODR_HIGH(GPIOB_SWO) | PIN_ODR_HIGH(GPIOB_ARD_D5) | PIN_ODR_HIGH(GPIOB_ARD_D4) | PIN_ODR_HIGH(GPIOB_ARD_D10) | PIN_ODR_HIGH(GPIOB_PIN7) | PIN_ODR_HIGH(GPIOB_ARD_D15) | PIN_ODR_HIGH(GPIOB_ARD_D14) | PIN_ODR_HIGH(GPIOB_ARD_D6) | PIN_ODR_HIGH(GPIOB_PIN11) | PIN_ODR_HIGH(GPIOB_PIN12) | PIN_ODR_HIGH(GPIOB_PIN13) | PIN_ODR_HIGH(GPIOB_PIN14) | PIN_ODR_HIGH(GPIOB_PIN15)) | ||
| 370 | #define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_ARD_A3, 0U) | PIN_AFIO_AF(GPIOB_PIN1, 0U) | PIN_AFIO_AF(GPIOB_PIN2, 0U) | PIN_AFIO_AF(GPIOB_SWO, 0U) | PIN_AFIO_AF(GPIOB_ARD_D5, 0U) | PIN_AFIO_AF(GPIOB_ARD_D4, 0U) | PIN_AFIO_AF(GPIOB_ARD_D10, 0U) | PIN_AFIO_AF(GPIOB_PIN7, 0U)) | ||
| 371 | #define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_ARD_D15, 0U) | PIN_AFIO_AF(GPIOB_ARD_D14, 0U) | PIN_AFIO_AF(GPIOB_ARD_D6, 0U) | PIN_AFIO_AF(GPIOB_PIN11, 0U) | PIN_AFIO_AF(GPIOB_PIN12, 0U) | PIN_AFIO_AF(GPIOB_PIN13, 0U) | PIN_AFIO_AF(GPIOB_PIN14, 0U) | PIN_AFIO_AF(GPIOB_PIN15, 0U)) | ||
| 372 | |||
| 373 | /* | ||
| 374 | * GPIOC setup: | ||
| 375 | * | ||
| 376 | * PC0 - ARD_A5 ADC1_IN10 (input pullup). | ||
| 377 | * PC1 - ARD_A4 ADC1_IN11 (input pullup). | ||
| 378 | * PC2 - PIN2 (input pullup). | ||
| 379 | * PC3 - PIN3 (input pullup). | ||
| 380 | * PC4 - PIN4 (input pullup). | ||
| 381 | * PC5 - PIN5 (input pullup). | ||
| 382 | * PC6 - PIN6 (input pullup). | ||
| 383 | * PC7 - ARD_D9 (input pullup). | ||
| 384 | * PC8 - PIN8 (input pullup). | ||
| 385 | * PC9 - PIN9 (input pullup). | ||
| 386 | * PC10 - PIN10 (input pullup). | ||
| 387 | * PC11 - PIN11 (input pullup). | ||
| 388 | * PC12 - PIN12 (input pullup). | ||
| 389 | * PC13 - BUTTON (input floating). | ||
| 390 | * PC14 - OSC32_IN (input floating). | ||
| 391 | * PC15 - OSC32_OUT (input floating). | ||
| 392 | */ | ||
| 393 | #define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_ARD_A5) | PIN_MODE_INPUT(GPIOC_ARD_A4) | PIN_MODE_INPUT(GPIOC_PIN2) | PIN_MODE_INPUT(GPIOC_PIN3) | PIN_MODE_INPUT(GPIOC_PIN4) | PIN_MODE_INPUT(GPIOC_PIN5) | PIN_MODE_INPUT(GPIOC_PIN6) | PIN_MODE_INPUT(GPIOC_ARD_D9) | PIN_MODE_INPUT(GPIOC_PIN8) | PIN_MODE_INPUT(GPIOC_PIN9) | PIN_MODE_INPUT(GPIOC_PIN10) | PIN_MODE_INPUT(GPIOC_PIN11) | PIN_MODE_INPUT(GPIOC_PIN12) | PIN_MODE_INPUT(GPIOC_BUTTON) | PIN_MODE_INPUT(GPIOC_OSC32_IN) | PIN_MODE_INPUT(GPIOC_OSC32_OUT)) | ||
| 394 | #define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_ARD_A5) | PIN_OTYPE_PUSHPULL(GPIOC_ARD_A4) | PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | PIN_OTYPE_PUSHPULL(GPIOC_PIN6) | PIN_OTYPE_PUSHPULL(GPIOC_ARD_D9) | PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | PIN_OTYPE_PUSHPULL(GPIOC_BUTTON) | PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT)) | ||
| 395 | #define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_ARD_A5) | PIN_OSPEED_HIGH(GPIOC_ARD_A4) | PIN_OSPEED_HIGH(GPIOC_PIN2) | PIN_OSPEED_HIGH(GPIOC_PIN3) | PIN_OSPEED_HIGH(GPIOC_PIN4) | PIN_OSPEED_HIGH(GPIOC_PIN5) | PIN_OSPEED_HIGH(GPIOC_PIN6) | PIN_OSPEED_HIGH(GPIOC_ARD_D9) | PIN_OSPEED_HIGH(GPIOC_PIN8) | PIN_OSPEED_HIGH(GPIOC_PIN9) | PIN_OSPEED_HIGH(GPIOC_PIN10) | PIN_OSPEED_HIGH(GPIOC_PIN11) | PIN_OSPEED_HIGH(GPIOC_PIN12) | PIN_OSPEED_HIGH(GPIOC_BUTTON) | PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | PIN_OSPEED_HIGH(GPIOC_OSC32_OUT)) | ||
| 396 | #define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_ARD_A5) | PIN_PUPDR_PULLUP(GPIOC_ARD_A4) | PIN_PUPDR_PULLUP(GPIOC_PIN2) | PIN_PUPDR_PULLUP(GPIOC_PIN3) | PIN_PUPDR_PULLUP(GPIOC_PIN4) | PIN_PUPDR_PULLUP(GPIOC_PIN5) | PIN_PUPDR_PULLUP(GPIOC_PIN6) | PIN_PUPDR_PULLUP(GPIOC_ARD_D9) | PIN_PUPDR_PULLUP(GPIOC_PIN8) | PIN_PUPDR_PULLUP(GPIOC_PIN9) | PIN_PUPDR_PULLUP(GPIOC_PIN10) | PIN_PUPDR_PULLUP(GPIOC_PIN11) | PIN_PUPDR_PULLUP(GPIOC_PIN12) | PIN_PUPDR_FLOATING(GPIOC_BUTTON) | PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT)) | ||
| 397 | #define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_ARD_A5) | PIN_ODR_HIGH(GPIOC_ARD_A4) | PIN_ODR_HIGH(GPIOC_PIN2) | PIN_ODR_HIGH(GPIOC_PIN3) | PIN_ODR_HIGH(GPIOC_PIN4) | PIN_ODR_HIGH(GPIOC_PIN5) | PIN_ODR_HIGH(GPIOC_PIN6) | PIN_ODR_HIGH(GPIOC_ARD_D9) | PIN_ODR_HIGH(GPIOC_PIN8) | PIN_ODR_HIGH(GPIOC_PIN9) | PIN_ODR_HIGH(GPIOC_PIN10) | PIN_ODR_HIGH(GPIOC_PIN11) | PIN_ODR_HIGH(GPIOC_PIN12) | PIN_ODR_HIGH(GPIOC_BUTTON) | PIN_ODR_HIGH(GPIOC_OSC32_IN) | PIN_ODR_HIGH(GPIOC_OSC32_OUT)) | ||
| 398 | #define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_ARD_A5, 0U) | PIN_AFIO_AF(GPIOC_ARD_A4, 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_PIN6, 0U) | PIN_AFIO_AF(GPIOC_ARD_D9, 0U)) | ||
| 399 | #define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0U) | PIN_AFIO_AF(GPIOC_PIN9, 0U) | PIN_AFIO_AF(GPIOC_PIN10, 0U) | PIN_AFIO_AF(GPIOC_PIN11, 0U) | PIN_AFIO_AF(GPIOC_PIN12, 0U) | PIN_AFIO_AF(GPIOC_BUTTON, 0U) | PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U)) | ||
| 400 | |||
| 401 | /* | ||
| 402 | * GPIOD setup: | ||
| 403 | * | ||
| 404 | * PD0 - PIN0 (input pullup). | ||
| 405 | * PD1 - PIN1 (input pullup). | ||
| 406 | * PD2 - PIN2 (input pullup). | ||
| 407 | * PD3 - PIN3 (input pullup). | ||
| 408 | * PD4 - PIN4 (input pullup). | ||
| 409 | * PD5 - PIN5 (input pullup). | ||
| 410 | * PD6 - PIN6 (input pullup). | ||
| 411 | * PD7 - PIN7 (input pullup). | ||
| 412 | * PD8 - PIN8 (input pullup). | ||
| 413 | * PD9 - PIN9 (input pullup). | ||
| 414 | * PD10 - PIN10 (input pullup). | ||
| 415 | * PD11 - PIN11 (input pullup). | ||
| 416 | * PD12 - PIN12 (input pullup). | ||
| 417 | * PD13 - PIN13 (input pullup). | ||
| 418 | * PD14 - PIN14 (input pullup). | ||
| 419 | * PD15 - PIN15 (input pullup). | ||
| 420 | */ | ||
| 421 | #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)) | ||
| 422 | #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)) | ||
| 423 | #define VAL_GPIOD_OSPEEDR (PIN_OSPEED_HIGH(GPIOD_PIN0) | PIN_OSPEED_HIGH(GPIOD_PIN1) | PIN_OSPEED_HIGH(GPIOD_PIN2) | PIN_OSPEED_HIGH(GPIOD_PIN3) | PIN_OSPEED_HIGH(GPIOD_PIN4) | PIN_OSPEED_HIGH(GPIOD_PIN5) | PIN_OSPEED_HIGH(GPIOD_PIN6) | PIN_OSPEED_HIGH(GPIOD_PIN7) | PIN_OSPEED_HIGH(GPIOD_PIN8) | PIN_OSPEED_HIGH(GPIOD_PIN9) | PIN_OSPEED_HIGH(GPIOD_PIN10) | PIN_OSPEED_HIGH(GPIOD_PIN11) | PIN_OSPEED_HIGH(GPIOD_PIN12) | PIN_OSPEED_HIGH(GPIOD_PIN13) | PIN_OSPEED_HIGH(GPIOD_PIN14) | PIN_OSPEED_HIGH(GPIOD_PIN15)) | ||
| 424 | #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)) | ||
| 425 | #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)) | ||
| 426 | #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)) | ||
| 427 | #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)) | ||
| 428 | |||
| 429 | /* | ||
| 430 | * GPIOE setup: | ||
| 431 | * | ||
| 432 | * PE0 - PIN0 (input pullup). | ||
| 433 | * PE1 - PIN1 (input pullup). | ||
| 434 | * PE2 - PIN2 (input pullup). | ||
| 435 | * PE3 - PIN3 (input pullup). | ||
| 436 | * PE4 - PIN4 (input pullup). | ||
| 437 | * PE5 - PIN5 (input pullup). | ||
| 438 | * PE6 - PIN6 (input pullup). | ||
| 439 | * PE7 - PIN7 (input pullup). | ||
| 440 | * PE8 - PIN8 (input pullup). | ||
| 441 | * PE9 - PIN9 (input pullup). | ||
| 442 | * PE10 - PIN10 (input pullup). | ||
| 443 | * PE11 - PIN11 (input pullup). | ||
| 444 | * PE12 - PIN12 (input pullup). | ||
| 445 | * PE13 - PIN13 (input pullup). | ||
| 446 | * PE14 - PIN14 (input pullup). | ||
| 447 | * PE15 - PIN15 (input pullup). | ||
| 448 | */ | ||
| 449 | #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)) | ||
| 450 | #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)) | ||
| 451 | #define VAL_GPIOE_OSPEEDR (PIN_OSPEED_HIGH(GPIOE_PIN0) | PIN_OSPEED_HIGH(GPIOE_PIN1) | PIN_OSPEED_HIGH(GPIOE_PIN2) | PIN_OSPEED_HIGH(GPIOE_PIN3) | PIN_OSPEED_HIGH(GPIOE_PIN4) | PIN_OSPEED_HIGH(GPIOE_PIN5) | PIN_OSPEED_HIGH(GPIOE_PIN6) | PIN_OSPEED_HIGH(GPIOE_PIN7) | PIN_OSPEED_HIGH(GPIOE_PIN8) | PIN_OSPEED_HIGH(GPIOE_PIN9) | PIN_OSPEED_HIGH(GPIOE_PIN10) | PIN_OSPEED_HIGH(GPIOE_PIN11) | PIN_OSPEED_HIGH(GPIOE_PIN12) | PIN_OSPEED_HIGH(GPIOE_PIN13) | PIN_OSPEED_HIGH(GPIOE_PIN14) | PIN_OSPEED_HIGH(GPIOE_PIN15)) | ||
| 452 | #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)) | ||
| 453 | #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)) | ||
| 454 | #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)) | ||
| 455 | #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)) | ||
| 456 | |||
| 457 | /* | ||
| 458 | * GPIOF setup: | ||
| 459 | * | ||
| 460 | * PF0 - PIN0 (input pullup). | ||
| 461 | * PF1 - PIN1 (input pullup). | ||
| 462 | * PF2 - PIN2 (input pullup). | ||
| 463 | * PF3 - PIN3 (input pullup). | ||
| 464 | * PF4 - PIN4 (input pullup). | ||
| 465 | * PF5 - PIN5 (input pullup). | ||
| 466 | * PF6 - PIN6 (input pullup). | ||
| 467 | * PF7 - PIN7 (input pullup). | ||
| 468 | * PF8 - PIN8 (input pullup). | ||
| 469 | * PF9 - PIN9 (input pullup). | ||
| 470 | * PF10 - PIN10 (input pullup). | ||
| 471 | * PF11 - PIN11 (input pullup). | ||
| 472 | * PF12 - PIN12 (input pullup). | ||
| 473 | * PF13 - PIN13 (input pullup). | ||
| 474 | * PF14 - PIN14 (input pullup). | ||
| 475 | * PF15 - PIN15 (input pullup). | ||
| 476 | */ | ||
| 477 | #define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_PIN0) | PIN_MODE_INPUT(GPIOF_PIN1) | 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)) | ||
| 478 | #define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_PIN0) | PIN_OTYPE_PUSHPULL(GPIOF_PIN1) | 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)) | ||
| 479 | #define VAL_GPIOF_OSPEEDR (PIN_OSPEED_HIGH(GPIOF_PIN0) | PIN_OSPEED_HIGH(GPIOF_PIN1) | PIN_OSPEED_HIGH(GPIOF_PIN2) | PIN_OSPEED_HIGH(GPIOF_PIN3) | PIN_OSPEED_HIGH(GPIOF_PIN4) | PIN_OSPEED_HIGH(GPIOF_PIN5) | PIN_OSPEED_HIGH(GPIOF_PIN6) | PIN_OSPEED_HIGH(GPIOF_PIN7) | PIN_OSPEED_HIGH(GPIOF_PIN8) | PIN_OSPEED_HIGH(GPIOF_PIN9) | PIN_OSPEED_HIGH(GPIOF_PIN10) | PIN_OSPEED_HIGH(GPIOF_PIN11) | PIN_OSPEED_HIGH(GPIOF_PIN12) | PIN_OSPEED_HIGH(GPIOF_PIN13) | PIN_OSPEED_HIGH(GPIOF_PIN14) | PIN_OSPEED_HIGH(GPIOF_PIN15)) | ||
| 480 | #define VAL_GPIOF_PUPDR (PIN_PUPDR_PULLUP(GPIOF_PIN0) | PIN_PUPDR_PULLUP(GPIOF_PIN1) | 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)) | ||
| 481 | #define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_PIN0) | PIN_ODR_HIGH(GPIOF_PIN1) | 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)) | ||
| 482 | #define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_PIN0, 0U) | PIN_AFIO_AF(GPIOF_PIN1, 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)) | ||
| 483 | #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)) | ||
| 484 | |||
| 485 | /* | ||
| 486 | * GPIOG setup: | ||
| 487 | * | ||
| 488 | * PG0 - PIN0 (input pullup). | ||
| 489 | * PG1 - PIN1 (input pullup). | ||
| 490 | * PG2 - PIN2 (input pullup). | ||
| 491 | * PG3 - PIN3 (input pullup). | ||
| 492 | * PG4 - PIN4 (input pullup). | ||
| 493 | * PG5 - PIN5 (input pullup). | ||
| 494 | * PG6 - PIN6 (input pullup). | ||
| 495 | * PG7 - PIN7 (input pullup). | ||
| 496 | * PG8 - PIN8 (input pullup). | ||
| 497 | * PG9 - PIN9 (input pullup). | ||
| 498 | * PG10 - PIN10 (input pullup). | ||
| 499 | * PG11 - PIN11 (input pullup). | ||
| 500 | * PG12 - PIN12 (input pullup). | ||
| 501 | * PG13 - PIN13 (input pullup). | ||
| 502 | * PG14 - PIN14 (input pullup). | ||
| 503 | * PG15 - PIN15 (input pullup). | ||
| 504 | */ | ||
| 505 | #define VAL_GPIOG_MODER (PIN_MODE_INPUT(GPIOG_PIN0) | PIN_MODE_INPUT(GPIOG_PIN1) | PIN_MODE_INPUT(GPIOG_PIN2) | PIN_MODE_INPUT(GPIOG_PIN3) | PIN_MODE_INPUT(GPIOG_PIN4) | PIN_MODE_INPUT(GPIOG_PIN5) | PIN_MODE_INPUT(GPIOG_PIN6) | PIN_MODE_INPUT(GPIOG_PIN7) | PIN_MODE_INPUT(GPIOG_PIN8) | PIN_MODE_INPUT(GPIOG_PIN9) | PIN_MODE_INPUT(GPIOG_PIN10) | PIN_MODE_INPUT(GPIOG_PIN11) | PIN_MODE_INPUT(GPIOG_PIN12) | PIN_MODE_INPUT(GPIOG_PIN13) | PIN_MODE_INPUT(GPIOG_PIN14) | PIN_MODE_INPUT(GPIOG_PIN15)) | ||
| 506 | #define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_PIN0) | PIN_OTYPE_PUSHPULL(GPIOG_PIN1) | PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | PIN_OTYPE_PUSHPULL(GPIOG_PIN6) | PIN_OTYPE_PUSHPULL(GPIOG_PIN7) | PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | PIN_OTYPE_PUSHPULL(GPIOG_PIN15)) | ||
| 507 | #define VAL_GPIOG_OSPEEDR (PIN_OSPEED_HIGH(GPIOG_PIN0) | PIN_OSPEED_HIGH(GPIOG_PIN1) | PIN_OSPEED_HIGH(GPIOG_PIN2) | PIN_OSPEED_HIGH(GPIOG_PIN3) | PIN_OSPEED_HIGH(GPIOG_PIN4) | PIN_OSPEED_HIGH(GPIOG_PIN5) | PIN_OSPEED_HIGH(GPIOG_PIN6) | PIN_OSPEED_HIGH(GPIOG_PIN7) | PIN_OSPEED_HIGH(GPIOG_PIN8) | PIN_OSPEED_HIGH(GPIOG_PIN9) | PIN_OSPEED_HIGH(GPIOG_PIN10) | PIN_OSPEED_HIGH(GPIOG_PIN11) | PIN_OSPEED_HIGH(GPIOG_PIN12) | PIN_OSPEED_HIGH(GPIOG_PIN13) | PIN_OSPEED_HIGH(GPIOG_PIN14) | PIN_OSPEED_HIGH(GPIOG_PIN15)) | ||
| 508 | #define VAL_GPIOG_PUPDR (PIN_PUPDR_PULLUP(GPIOG_PIN0) | PIN_PUPDR_PULLUP(GPIOG_PIN1) | PIN_PUPDR_PULLUP(GPIOG_PIN2) | PIN_PUPDR_PULLUP(GPIOG_PIN3) | PIN_PUPDR_PULLUP(GPIOG_PIN4) | PIN_PUPDR_PULLUP(GPIOG_PIN5) | PIN_PUPDR_PULLUP(GPIOG_PIN6) | PIN_PUPDR_PULLUP(GPIOG_PIN7) | PIN_PUPDR_PULLUP(GPIOG_PIN8) | PIN_PUPDR_PULLUP(GPIOG_PIN9) | PIN_PUPDR_PULLUP(GPIOG_PIN10) | PIN_PUPDR_PULLUP(GPIOG_PIN11) | PIN_PUPDR_PULLUP(GPIOG_PIN12) | PIN_PUPDR_PULLUP(GPIOG_PIN13) | PIN_PUPDR_PULLUP(GPIOG_PIN14) | PIN_PUPDR_PULLUP(GPIOG_PIN15)) | ||
| 509 | #define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_PIN0) | PIN_ODR_HIGH(GPIOG_PIN1) | PIN_ODR_HIGH(GPIOG_PIN2) | PIN_ODR_HIGH(GPIOG_PIN3) | PIN_ODR_HIGH(GPIOG_PIN4) | PIN_ODR_HIGH(GPIOG_PIN5) | PIN_ODR_HIGH(GPIOG_PIN6) | PIN_ODR_HIGH(GPIOG_PIN7) | PIN_ODR_HIGH(GPIOG_PIN8) | PIN_ODR_HIGH(GPIOG_PIN9) | PIN_ODR_HIGH(GPIOG_PIN10) | PIN_ODR_HIGH(GPIOG_PIN11) | PIN_ODR_HIGH(GPIOG_PIN12) | PIN_ODR_HIGH(GPIOG_PIN13) | PIN_ODR_HIGH(GPIOG_PIN14) | PIN_ODR_HIGH(GPIOG_PIN15)) | ||
| 510 | #define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_PIN0, 0U) | PIN_AFIO_AF(GPIOG_PIN1, 0U) | PIN_AFIO_AF(GPIOG_PIN2, 0U) | PIN_AFIO_AF(GPIOG_PIN3, 0U) | PIN_AFIO_AF(GPIOG_PIN4, 0U) | PIN_AFIO_AF(GPIOG_PIN5, 0U) | PIN_AFIO_AF(GPIOG_PIN6, 0U) | PIN_AFIO_AF(GPIOG_PIN7, 0U)) | ||
| 511 | #define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0U) | PIN_AFIO_AF(GPIOG_PIN9, 0U) | PIN_AFIO_AF(GPIOG_PIN10, 0U) | PIN_AFIO_AF(GPIOG_PIN11, 0U) | PIN_AFIO_AF(GPIOG_PIN12, 0U) | PIN_AFIO_AF(GPIOG_PIN13, 0U) | PIN_AFIO_AF(GPIOG_PIN14, 0U) | PIN_AFIO_AF(GPIOG_PIN15, 0U)) | ||
| 512 | |||
| 513 | /* | ||
| 514 | * GPIOH setup: | ||
| 515 | * | ||
| 516 | * PH0 - OSC_IN (input floating). | ||
| 517 | * PH1 - OSC_OUT (input floating). | ||
| 518 | * PH2 - PIN2 (input pullup). | ||
| 519 | * PH3 - PIN3 (input pullup). | ||
| 520 | * PH4 - PIN4 (input pullup). | ||
| 521 | * PH5 - PIN5 (input pullup). | ||
| 522 | * PH6 - PIN6 (input pullup). | ||
| 523 | * PH7 - PIN7 (input pullup). | ||
| 524 | * PH8 - PIN8 (input pullup). | ||
| 525 | * PH9 - PIN9 (input pullup). | ||
| 526 | * PH10 - PIN10 (input pullup). | ||
| 527 | * PH11 - PIN11 (input pullup). | ||
| 528 | * PH12 - PIN12 (input pullup). | ||
| 529 | * PH13 - PIN13 (input pullup). | ||
| 530 | * PH14 - PIN14 (input pullup). | ||
| 531 | * PH15 - PIN15 (input pullup). | ||
| 532 | */ | ||
| 533 | #define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_OSC_IN) | PIN_MODE_INPUT(GPIOH_OSC_OUT) | PIN_MODE_INPUT(GPIOH_PIN2) | PIN_MODE_INPUT(GPIOH_PIN3) | PIN_MODE_INPUT(GPIOH_PIN4) | PIN_MODE_INPUT(GPIOH_PIN5) | PIN_MODE_INPUT(GPIOH_PIN6) | PIN_MODE_INPUT(GPIOH_PIN7) | PIN_MODE_INPUT(GPIOH_PIN8) | PIN_MODE_INPUT(GPIOH_PIN9) | PIN_MODE_INPUT(GPIOH_PIN10) | PIN_MODE_INPUT(GPIOH_PIN11) | PIN_MODE_INPUT(GPIOH_PIN12) | PIN_MODE_INPUT(GPIOH_PIN13) | PIN_MODE_INPUT(GPIOH_PIN14) | PIN_MODE_INPUT(GPIOH_PIN15)) | ||
| 534 | #define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_OSC_IN) | PIN_OTYPE_PUSHPULL(GPIOH_OSC_OUT) | PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | PIN_OTYPE_PUSHPULL(GPIOH_PIN15)) | ||
| 535 | #define VAL_GPIOH_OSPEEDR (PIN_OSPEED_HIGH(GPIOH_OSC_IN) | PIN_OSPEED_HIGH(GPIOH_OSC_OUT) | PIN_OSPEED_HIGH(GPIOH_PIN2) | PIN_OSPEED_HIGH(GPIOH_PIN3) | PIN_OSPEED_HIGH(GPIOH_PIN4) | PIN_OSPEED_HIGH(GPIOH_PIN5) | PIN_OSPEED_HIGH(GPIOH_PIN6) | PIN_OSPEED_HIGH(GPIOH_PIN7) | PIN_OSPEED_HIGH(GPIOH_PIN8) | PIN_OSPEED_HIGH(GPIOH_PIN9) | PIN_OSPEED_HIGH(GPIOH_PIN10) | PIN_OSPEED_HIGH(GPIOH_PIN11) | PIN_OSPEED_HIGH(GPIOH_PIN12) | PIN_OSPEED_HIGH(GPIOH_PIN13) | PIN_OSPEED_HIGH(GPIOH_PIN14) | PIN_OSPEED_HIGH(GPIOH_PIN15)) | ||
| 536 | #define VAL_GPIOH_PUPDR (PIN_PUPDR_FLOATING(GPIOH_OSC_IN) | PIN_PUPDR_FLOATING(GPIOH_OSC_OUT) | PIN_PUPDR_PULLUP(GPIOH_PIN2) | PIN_PUPDR_PULLUP(GPIOH_PIN3) | PIN_PUPDR_PULLUP(GPIOH_PIN4) | PIN_PUPDR_PULLUP(GPIOH_PIN5) | PIN_PUPDR_PULLUP(GPIOH_PIN6) | PIN_PUPDR_PULLUP(GPIOH_PIN7) | PIN_PUPDR_PULLUP(GPIOH_PIN8) | PIN_PUPDR_PULLUP(GPIOH_PIN9) | PIN_PUPDR_PULLUP(GPIOH_PIN10) | PIN_PUPDR_PULLUP(GPIOH_PIN11) | PIN_PUPDR_PULLUP(GPIOH_PIN12) | PIN_PUPDR_PULLUP(GPIOH_PIN13) | PIN_PUPDR_PULLUP(GPIOH_PIN14) | PIN_PUPDR_PULLUP(GPIOH_PIN15)) | ||
| 537 | #define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_OSC_IN) | PIN_ODR_HIGH(GPIOH_OSC_OUT) | PIN_ODR_HIGH(GPIOH_PIN2) | PIN_ODR_HIGH(GPIOH_PIN3) | PIN_ODR_HIGH(GPIOH_PIN4) | PIN_ODR_HIGH(GPIOH_PIN5) | PIN_ODR_HIGH(GPIOH_PIN6) | PIN_ODR_HIGH(GPIOH_PIN7) | PIN_ODR_HIGH(GPIOH_PIN8) | PIN_ODR_HIGH(GPIOH_PIN9) | PIN_ODR_HIGH(GPIOH_PIN10) | PIN_ODR_HIGH(GPIOH_PIN11) | PIN_ODR_HIGH(GPIOH_PIN12) | PIN_ODR_HIGH(GPIOH_PIN13) | PIN_ODR_HIGH(GPIOH_PIN14) | PIN_ODR_HIGH(GPIOH_PIN15)) | ||
| 538 | #define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_OSC_IN, 0U) | PIN_AFIO_AF(GPIOH_OSC_OUT, 0U) | PIN_AFIO_AF(GPIOH_PIN2, 0U) | PIN_AFIO_AF(GPIOH_PIN3, 0U) | PIN_AFIO_AF(GPIOH_PIN4, 0U) | PIN_AFIO_AF(GPIOH_PIN5, 0U) | PIN_AFIO_AF(GPIOH_PIN6, 0U) | PIN_AFIO_AF(GPIOH_PIN7, 0U)) | ||
| 539 | #define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0U) | PIN_AFIO_AF(GPIOH_PIN9, 0U) | PIN_AFIO_AF(GPIOH_PIN10, 0U) | PIN_AFIO_AF(GPIOH_PIN11, 0U) | PIN_AFIO_AF(GPIOH_PIN12, 0U) | PIN_AFIO_AF(GPIOH_PIN13, 0U) | PIN_AFIO_AF(GPIOH_PIN14, 0U) | PIN_AFIO_AF(GPIOH_PIN15, 0U)) | ||
| 540 | |||
| 541 | /* | ||
| 542 | * GPIOI setup: | ||
| 543 | * | ||
| 544 | * PI0 - PIN0 (input pullup). | ||
| 545 | * PI1 - PIN1 (input pullup). | ||
| 546 | * PI2 - PIN2 (input pullup). | ||
| 547 | * PI3 - PIN3 (input pullup). | ||
| 548 | * PI4 - PIN4 (input pullup). | ||
| 549 | * PI5 - PIN5 (input pullup). | ||
| 550 | * PI6 - PIN6 (input pullup). | ||
| 551 | * PI7 - PIN7 (input pullup). | ||
| 552 | * PI8 - PIN8 (input pullup). | ||
| 553 | * PI9 - PIN9 (input pullup). | ||
| 554 | * PI10 - PIN10 (input pullup). | ||
| 555 | * PI11 - PIN11 (input pullup). | ||
| 556 | * PI12 - PIN12 (input pullup). | ||
| 557 | * PI13 - PIN13 (input pullup). | ||
| 558 | * PI14 - PIN14 (input pullup). | ||
| 559 | * PI15 - PIN15 (input pullup). | ||
| 560 | */ | ||
| 561 | #define VAL_GPIOI_MODER (PIN_MODE_INPUT(GPIOI_PIN0) | PIN_MODE_INPUT(GPIOI_PIN1) | PIN_MODE_INPUT(GPIOI_PIN2) | PIN_MODE_INPUT(GPIOI_PIN3) | PIN_MODE_INPUT(GPIOI_PIN4) | PIN_MODE_INPUT(GPIOI_PIN5) | PIN_MODE_INPUT(GPIOI_PIN6) | PIN_MODE_INPUT(GPIOI_PIN7) | PIN_MODE_INPUT(GPIOI_PIN8) | PIN_MODE_INPUT(GPIOI_PIN9) | PIN_MODE_INPUT(GPIOI_PIN10) | PIN_MODE_INPUT(GPIOI_PIN11) | PIN_MODE_INPUT(GPIOI_PIN12) | PIN_MODE_INPUT(GPIOI_PIN13) | PIN_MODE_INPUT(GPIOI_PIN14) | PIN_MODE_INPUT(GPIOI_PIN15)) | ||
| 562 | #define VAL_GPIOI_OTYPER (PIN_OTYPE_PUSHPULL(GPIOI_PIN0) | PIN_OTYPE_PUSHPULL(GPIOI_PIN1) | PIN_OTYPE_PUSHPULL(GPIOI_PIN2) | PIN_OTYPE_PUSHPULL(GPIOI_PIN3) | PIN_OTYPE_PUSHPULL(GPIOI_PIN4) | PIN_OTYPE_PUSHPULL(GPIOI_PIN5) | PIN_OTYPE_PUSHPULL(GPIOI_PIN6) | PIN_OTYPE_PUSHPULL(GPIOI_PIN7) | PIN_OTYPE_PUSHPULL(GPIOI_PIN8) | PIN_OTYPE_PUSHPULL(GPIOI_PIN9) | PIN_OTYPE_PUSHPULL(GPIOI_PIN10) | PIN_OTYPE_PUSHPULL(GPIOI_PIN11) | PIN_OTYPE_PUSHPULL(GPIOI_PIN12) | PIN_OTYPE_PUSHPULL(GPIOI_PIN13) | PIN_OTYPE_PUSHPULL(GPIOI_PIN14) | PIN_OTYPE_PUSHPULL(GPIOI_PIN15)) | ||
| 563 | #define VAL_GPIOI_OSPEEDR (PIN_OSPEED_HIGH(GPIOI_PIN0) | PIN_OSPEED_HIGH(GPIOI_PIN1) | PIN_OSPEED_HIGH(GPIOI_PIN2) | PIN_OSPEED_HIGH(GPIOI_PIN3) | PIN_OSPEED_HIGH(GPIOI_PIN4) | PIN_OSPEED_HIGH(GPIOI_PIN5) | PIN_OSPEED_HIGH(GPIOI_PIN6) | PIN_OSPEED_HIGH(GPIOI_PIN7) | PIN_OSPEED_HIGH(GPIOI_PIN8) | PIN_OSPEED_HIGH(GPIOI_PIN9) | PIN_OSPEED_HIGH(GPIOI_PIN10) | PIN_OSPEED_HIGH(GPIOI_PIN11) | PIN_OSPEED_HIGH(GPIOI_PIN12) | PIN_OSPEED_HIGH(GPIOI_PIN13) | PIN_OSPEED_HIGH(GPIOI_PIN14) | PIN_OSPEED_HIGH(GPIOI_PIN15)) | ||
| 564 | #define VAL_GPIOI_PUPDR (PIN_PUPDR_PULLUP(GPIOI_PIN0) | PIN_PUPDR_PULLUP(GPIOI_PIN1) | PIN_PUPDR_PULLUP(GPIOI_PIN2) | PIN_PUPDR_PULLUP(GPIOI_PIN3) | PIN_PUPDR_PULLUP(GPIOI_PIN4) | PIN_PUPDR_PULLUP(GPIOI_PIN5) | PIN_PUPDR_PULLUP(GPIOI_PIN6) | PIN_PUPDR_PULLUP(GPIOI_PIN7) | PIN_PUPDR_PULLUP(GPIOI_PIN8) | PIN_PUPDR_PULLUP(GPIOI_PIN9) | PIN_PUPDR_PULLUP(GPIOI_PIN10) | PIN_PUPDR_PULLUP(GPIOI_PIN11) | PIN_PUPDR_PULLUP(GPIOI_PIN12) | PIN_PUPDR_PULLUP(GPIOI_PIN13) | PIN_PUPDR_PULLUP(GPIOI_PIN14) | PIN_PUPDR_PULLUP(GPIOI_PIN15)) | ||
| 565 | #define VAL_GPIOI_ODR (PIN_ODR_HIGH(GPIOI_PIN0) | PIN_ODR_HIGH(GPIOI_PIN1) | PIN_ODR_HIGH(GPIOI_PIN2) | PIN_ODR_HIGH(GPIOI_PIN3) | PIN_ODR_HIGH(GPIOI_PIN4) | PIN_ODR_HIGH(GPIOI_PIN5) | PIN_ODR_HIGH(GPIOI_PIN6) | PIN_ODR_HIGH(GPIOI_PIN7) | PIN_ODR_HIGH(GPIOI_PIN8) | PIN_ODR_HIGH(GPIOI_PIN9) | PIN_ODR_HIGH(GPIOI_PIN10) | PIN_ODR_HIGH(GPIOI_PIN11) | PIN_ODR_HIGH(GPIOI_PIN12) | PIN_ODR_HIGH(GPIOI_PIN13) | PIN_ODR_HIGH(GPIOI_PIN14) | PIN_ODR_HIGH(GPIOI_PIN15)) | ||
| 566 | #define VAL_GPIOI_AFRL (PIN_AFIO_AF(GPIOI_PIN0, 0U) | PIN_AFIO_AF(GPIOI_PIN1, 0U) | PIN_AFIO_AF(GPIOI_PIN2, 0U) | PIN_AFIO_AF(GPIOI_PIN3, 0U) | PIN_AFIO_AF(GPIOI_PIN4, 0U) | PIN_AFIO_AF(GPIOI_PIN5, 0U) | PIN_AFIO_AF(GPIOI_PIN6, 0U) | PIN_AFIO_AF(GPIOI_PIN7, 0U)) | ||
| 567 | #define VAL_GPIOI_AFRH (PIN_AFIO_AF(GPIOI_PIN8, 0U) | PIN_AFIO_AF(GPIOI_PIN9, 0U) | PIN_AFIO_AF(GPIOI_PIN10, 0U) | PIN_AFIO_AF(GPIOI_PIN11, 0U) | PIN_AFIO_AF(GPIOI_PIN12, 0U) | PIN_AFIO_AF(GPIOI_PIN13, 0U) | PIN_AFIO_AF(GPIOI_PIN14, 0U) | PIN_AFIO_AF(GPIOI_PIN15, 0U)) | ||
| 568 | |||
| 569 | /*===========================================================================*/ | ||
| 570 | /* External declarations. */ | ||
| 571 | /*===========================================================================*/ | ||
| 572 | |||
| 573 | #if !defined(_FROM_ASM_) | ||
| 574 | # ifdef __cplusplus | ||
| 575 | extern "C" { | ||
| 576 | # endif | ||
| 577 | void boardInit(void); | ||
| 578 | # ifdef __cplusplus | ||
| 579 | } | ||
| 580 | # endif | ||
| 581 | #endif /* _FROM_ASM_ */ | ||
| 582 | |||
| 583 | #endif /* BOARD_H */ | ||
diff --git a/drivers/boards/BLACKPILL_STM32_F411/board.mk b/drivers/boards/BLACKPILL_STM32_F411/board.mk deleted file mode 100644 index 93c1e62f5..000000000 --- a/drivers/boards/BLACKPILL_STM32_F411/board.mk +++ /dev/null | |||
| @@ -1,9 +0,0 @@ | |||
| 1 | # List of all the board related files. | ||
| 2 | BOARDSRC = $(BOARD_PATH)/boards/BLACKPILL_STM32_F411/board.c | ||
| 3 | |||
| 4 | # Required include directories | ||
| 5 | BOARDINC = $(BOARD_PATH)/boards/BLACKPILL_STM32_F411 | ||
| 6 | |||
| 7 | # Shared variables | ||
| 8 | ALLCSRC += $(BOARDSRC) | ||
| 9 | ALLINC += $(BOARDINC) | ||
diff --git a/drivers/boards/BLACKPILL_STM32_F411/cfg/board.chcfg b/drivers/boards/BLACKPILL_STM32_F411/cfg/board.chcfg deleted file mode 100644 index 3095409cc..000000000 --- a/drivers/boards/BLACKPILL_STM32_F411/cfg/board.chcfg +++ /dev/null | |||
| @@ -1,1193 +0,0 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <!-- STM32F4xx board Template --> | ||
| 3 | <board | ||
| 4 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| 5 | xsi:noNamespaceSchemaLocation="http://www.chibios.org/xml/schema/boards/stm32f4xx_board.xsd"> | ||
| 6 | <configuration_settings> | ||
| 7 | <templates_path>resources/gencfg/processors/boards/stm32f4xx/templates</templates_path> | ||
| 8 | <output_path>..</output_path> | ||
| 9 | <hal_version>5.0.x</hal_version> | ||
| 10 | </configuration_settings> | ||
| 11 | <board_name>STMicroelectronics STM32 Nucleo64-F411RE</board_name> | ||
| 12 | <board_id>ST_NUCLEO64_F411RE</board_id> | ||
| 13 | <board_functions></board_functions> | ||
| 14 | <subtype>STM32F411xE</subtype> | ||
| 15 | <clocks | ||
| 16 | HSEFrequency="8000000" | ||
| 17 | HSEBypass="true" | ||
| 18 | LSEFrequency="0" | ||
| 19 | LSEBypass="false" | ||
| 20 | VDD="300" /> | ||
| 21 | <ports> | ||
| 22 | <GPIOA> | ||
| 23 | <pin0 | ||
| 24 | ID="ARD_A0 ADC1_IN0" | ||
| 25 | Type="PushPull" | ||
| 26 | Level="High" | ||
| 27 | Speed="Maximum" | ||
| 28 | Resistor="PullUp" | ||
| 29 | Mode="Input" | ||
| 30 | Alternate="0" /> | ||
| 31 | <pin1 | ||
| 32 | ID="ARD_A1 ADC1_IN1" | ||
| 33 | Type="PushPull" | ||
| 34 | Level="High" | ||
| 35 | Speed="Maximum" | ||
| 36 | Resistor="PullUp" | ||
| 37 | Mode="Input" | ||
| 38 | Alternate="0" /> | ||
| 39 | <pin2 | ||
| 40 | ID="ARD_D1 USART2_TX" | ||
| 41 | Type="PushPull" | ||
| 42 | Level="High" | ||
| 43 | Speed="High" | ||
| 44 | Resistor="Floating" | ||
| 45 | Mode="Alternate" | ||
| 46 | Alternate="7" /> | ||
| 47 | <pin3 | ||
| 48 | ID="ARD_D0 USART2_RX" | ||
| 49 | Type="PushPull" | ||
| 50 | Level="High" | ||
| 51 | Speed="High" | ||
| 52 | Resistor="Floating" | ||
| 53 | Mode="Alternate" | ||
| 54 | Alternate="7" /> | ||
| 55 | <pin4 | ||
| 56 | ID="ARD_A2 ADC1_IN4" | ||
| 57 | Type="PushPull" | ||
| 58 | Level="High" | ||
| 59 | Speed="Maximum" | ||
| 60 | Resistor="PullUp" | ||
| 61 | Mode="Input" | ||
| 62 | Alternate="0" /> | ||
| 63 | <pin5 | ||
| 64 | ID="LED_GREEN ARD_D13" | ||
| 65 | Type="PushPull" | ||
| 66 | Level="Low" | ||
| 67 | Speed="High" | ||
| 68 | Resistor="Floating" | ||
| 69 | Mode="Output" | ||
| 70 | Alternate="0" /> | ||
| 71 | <pin6 | ||
| 72 | ID="ARD_D12" | ||
| 73 | Type="PushPull" | ||
| 74 | Level="High" | ||
| 75 | Speed="Maximum" | ||
| 76 | Resistor="PullUp" | ||
| 77 | Mode="Input" | ||
| 78 | Alternate="0" /> | ||
| 79 | <pin7 | ||
| 80 | ID="ARD_D11" | ||
| 81 | Type="PushPull" | ||
| 82 | Level="High" | ||
| 83 | Speed="Maximum" | ||
| 84 | Resistor="PullUp" | ||
| 85 | Mode="Input" | ||
| 86 | Alternate="0" /> | ||
| 87 | <pin8 | ||
| 88 | ID="ARD_D7" | ||
| 89 | Type="PushPull" | ||
| 90 | Level="High" | ||
| 91 | Speed="Maximum" | ||
| 92 | Resistor="PullUp" | ||
| 93 | Mode="Input" | ||
| 94 | Alternate="0" /> | ||
| 95 | <pin9 | ||
| 96 | ID="ARD_D8" | ||
| 97 | Type="PushPull" | ||
| 98 | Level="High" | ||
| 99 | Speed="Maximum" | ||
| 100 | Resistor="PullUp" | ||
| 101 | Mode="Input" | ||
| 102 | Alternate="0" /> | ||
| 103 | <pin10 | ||
| 104 | ID="ARD_D2" | ||
| 105 | Type="PushPull" | ||
| 106 | Level="High" | ||
| 107 | Speed="Maximum" | ||
| 108 | Resistor="PullUp" | ||
| 109 | Mode="Input" | ||
| 110 | Alternate="0" /> | ||
| 111 | <pin11 | ||
| 112 | ID="OTG_FS_DM" | ||
| 113 | Type="PushPull" | ||
| 114 | Level="High" | ||
| 115 | Speed="Maximum" | ||
| 116 | Resistor="Floating" | ||
| 117 | Mode="Alternate" | ||
| 118 | Alternate="10" /> | ||
| 119 | <pin12 | ||
| 120 | ID="OTG_FS_DP" | ||
| 121 | Type="PushPull" | ||
| 122 | Level="High" | ||
| 123 | Speed="Maximum" | ||
| 124 | Resistor="Floating" | ||
| 125 | Mode="Alternate" | ||
| 126 | Alternate="10" /> | ||
| 127 | <pin13 | ||
| 128 | ID="SWDIO" | ||
| 129 | Type="PushPull" | ||
| 130 | Level="High" | ||
| 131 | Speed="Maximum" | ||
| 132 | Resistor="PullUp" | ||
| 133 | Mode="Alternate" | ||
| 134 | Alternate="0" /> | ||
| 135 | <pin14 | ||
| 136 | ID="SWCLK" | ||
| 137 | Type="PushPull" | ||
| 138 | Level="High" | ||
| 139 | Speed="Maximum" | ||
| 140 | Resistor="PullDown" | ||
| 141 | Mode="Alternate" | ||
| 142 | Alternate="0" /> | ||
| 143 | <pin15 | ||
| 144 | ID="" | ||
| 145 | Type="PushPull" | ||
| 146 | Level="High" | ||
| 147 | Speed="Maximum" | ||
| 148 | Resistor="PullUp" | ||
| 149 | Mode="Input" | ||
| 150 | Alternate="0" /> | ||
| 151 | </GPIOA> | ||
| 152 | <GPIOB> | ||
| 153 | <pin0 | ||
| 154 | ID="ARD_A3 ADC1_IN8" | ||
| 155 | Type="PushPull" | ||
| 156 | Level="High" | ||
| 157 | Speed="Maximum" | ||
| 158 | Resistor="PullUp" | ||
| 159 | Mode="Input" | ||
| 160 | Alternate="0" /> | ||
| 161 | <pin1 | ||
| 162 | ID="" | ||
| 163 | Type="PushPull" | ||
| 164 | Level="High" | ||
| 165 | Speed="Maximum" | ||
| 166 | Resistor="PullUp" | ||
| 167 | Mode="Input" | ||
| 168 | Alternate="0" /> | ||
| 169 | <pin2 | ||
| 170 | ID="" | ||
| 171 | Type="PushPull" | ||
| 172 | Level="High" | ||
| 173 | Speed="Maximum" | ||
| 174 | Resistor="PullUp" | ||
| 175 | Mode="Input" | ||
| 176 | Alternate="0" /> | ||
| 177 | <pin3 | ||
| 178 | ID="SWO ARD_D3" | ||
| 179 | Type="PushPull" | ||
| 180 | Level="High" | ||
| 181 | Speed="Maximum" | ||
| 182 | Resistor="PullUp" | ||
| 183 | Mode="Alternate" | ||
| 184 | Alternate="0" /> | ||
| 185 | <pin4 | ||
| 186 | ID="ARD_D5" | ||
| 187 | Type="PushPull" | ||
| 188 | Level="High" | ||
| 189 | Speed="Maximum" | ||
| 190 | Resistor="PullUp" | ||
| 191 | Mode="Input" | ||
| 192 | Alternate="0" /> | ||
| 193 | <pin5 | ||
| 194 | ID="ARD_D4" | ||
| 195 | Type="PushPull" | ||
| 196 | Level="High" | ||
| 197 | Speed="Maximum" | ||
| 198 | Resistor="PullUp" | ||
| 199 | Mode="Input" | ||
| 200 | Alternate="0" /> | ||
| 201 | <pin6 | ||
| 202 | ID="ARD_D10" | ||
| 203 | Type="PushPull" | ||
| 204 | Level="High" | ||
| 205 | Speed="Maximum" | ||
| 206 | Resistor="PullUp" | ||
| 207 | Mode="Input" | ||
| 208 | Alternate="0" /> | ||
| 209 | <pin7 | ||
| 210 | ID="" | ||
| 211 | Type="PushPull" | ||
| 212 | Level="High" | ||
| 213 | Speed="Maximum" | ||
| 214 | Resistor="PullUp" | ||
| 215 | Mode="Input" | ||
| 216 | Alternate="0" /> | ||
| 217 | <pin8 | ||
| 218 | ID="ARD_D15" | ||
| 219 | Type="PushPull" | ||
| 220 | Level="High" | ||
| 221 | Speed="Maximum" | ||
| 222 | Resistor="PullUp" | ||
| 223 | Mode="Input" | ||
| 224 | Alternate="0" /> | ||
| 225 | <pin9 | ||
| 226 | ID="ARD_D14" | ||
| 227 | Type="PushPull" | ||
| 228 | Level="High" | ||
| 229 | Speed="Maximum" | ||
| 230 | Resistor="PullUp" | ||
| 231 | Mode="Input" | ||
| 232 | Alternate="0" /> | ||
| 233 | <pin10 | ||
| 234 | ID="ARD_D6" | ||
| 235 | Type="PushPull" | ||
| 236 | Level="High" | ||
| 237 | Speed="Maximum" | ||
| 238 | Resistor="PullUp" | ||
| 239 | Mode="Input" | ||
| 240 | Alternate="0" /> | ||
| 241 | <pin11 | ||
| 242 | ID="" | ||
| 243 | Type="PushPull" | ||
| 244 | Level="High" | ||
| 245 | Speed="Maximum" | ||
| 246 | Resistor="PullUp" | ||
| 247 | Mode="Input" | ||
| 248 | Alternate="0" /> | ||
| 249 | <pin12 | ||
| 250 | ID="" | ||
| 251 | Type="PushPull" | ||
| 252 | Level="High" | ||
| 253 | Speed="Maximum" | ||
| 254 | Resistor="PullUp" | ||
| 255 | Mode="Input" | ||
| 256 | Alternate="0" /> | ||
| 257 | <pin13 | ||
| 258 | ID="" | ||
| 259 | Type="PushPull" | ||
| 260 | Level="High" | ||
| 261 | Speed="Maximum" | ||
| 262 | Resistor="PullUp" | ||
| 263 | Mode="Input" | ||
| 264 | Alternate="0" /> | ||
| 265 | <pin14 | ||
| 266 | ID="" | ||
| 267 | Type="PushPull" | ||
| 268 | Level="High" | ||
| 269 | Speed="Maximum" | ||
| 270 | Resistor="PullUp" | ||
| 271 | Mode="Input" | ||
| 272 | Alternate="0" /> | ||
| 273 | <pin15 | ||
| 274 | ID="" | ||
| 275 | Type="PushPull" | ||
| 276 | Level="High" | ||
| 277 | Speed="Maximum" | ||
| 278 | Resistor="PullUp" | ||
| 279 | Mode="Input" | ||
| 280 | Alternate="0" /> | ||
| 281 | </GPIOB> | ||
| 282 | <GPIOC> | ||
| 283 | <pin0 | ||
| 284 | ID="ARD_A5 ADC1_IN10" | ||
| 285 | Type="PushPull" | ||
| 286 | Level="High" | ||
| 287 | Speed="Maximum" | ||
| 288 | Resistor="PullUp" | ||
| 289 | Mode="Input" | ||
| 290 | Alternate="0" /> | ||
| 291 | <pin1 | ||
| 292 | ID="ARD_A4 ADC1_IN11" | ||
| 293 | Type="PushPull" | ||
| 294 | Level="High" | ||
| 295 | Speed="Maximum" | ||
| 296 | Resistor="PullUp" | ||
| 297 | Mode="Input" | ||
| 298 | Alternate="0" /> | ||
| 299 | <pin2 | ||
| 300 | ID="" | ||
| 301 | Type="PushPull" | ||
| 302 | Level="High" | ||
| 303 | Speed="Maximum" | ||
| 304 | Resistor="PullUp" | ||
| 305 | Mode="Input" | ||
| 306 | Alternate="0" /> | ||
| 307 | <pin3 | ||
| 308 | ID="" | ||
| 309 | Type="PushPull" | ||
| 310 | Level="High" | ||
| 311 | Speed="Maximum" | ||
| 312 | Resistor="PullUp" | ||
| 313 | Mode="Input" | ||
| 314 | Alternate="0" /> | ||
| 315 | <pin4 | ||
| 316 | ID="" | ||
| 317 | Type="PushPull" | ||
| 318 | Level="High" | ||
| 319 | Speed="Maximum" | ||
| 320 | Resistor="PullUp" | ||
| 321 | Mode="Input" | ||
| 322 | Alternate="0" /> | ||
| 323 | <pin5 | ||
| 324 | ID="" | ||
| 325 | Type="PushPull" | ||
| 326 | Level="High" | ||
| 327 | Speed="Maximum" | ||
| 328 | Resistor="PullUp" | ||
| 329 | Mode="Input" | ||
| 330 | Alternate="0" /> | ||
| 331 | <pin6 | ||
| 332 | ID="" | ||
| 333 | Type="PushPull" | ||
| 334 | Level="High" | ||
| 335 | Speed="Maximum" | ||
| 336 | Resistor="PullUp" | ||
| 337 | Mode="Input" | ||
| 338 | Alternate="0" /> | ||
| 339 | <pin7 | ||
| 340 | ID="ARD_D9" | ||
| 341 | Type="PushPull" | ||
| 342 | Level="High" | ||
| 343 | Speed="Maximum" | ||
| 344 | Resistor="PullUp" | ||
| 345 | Mode="Input" | ||
| 346 | Alternate="0" /> | ||
| 347 | <pin8 | ||
| 348 | ID="" | ||
| 349 | Type="PushPull" | ||
| 350 | Level="High" | ||
| 351 | Speed="Maximum" | ||
| 352 | Resistor="PullUp" | ||
| 353 | Mode="Input" | ||
| 354 | Alternate="0" /> | ||
| 355 | <pin9 | ||
| 356 | ID="" | ||
| 357 | Type="PushPull" | ||
| 358 | Level="High" | ||
| 359 | Speed="Maximum" | ||
| 360 | Resistor="PullUp" | ||
| 361 | Mode="Input" | ||
| 362 | Alternate="0" /> | ||
| 363 | <pin10 | ||
| 364 | ID="" | ||
| 365 | Type="PushPull" | ||
| 366 | Level="High" | ||
| 367 | Speed="Maximum" | ||
| 368 | Resistor="PullUp" | ||
| 369 | Mode="Input" | ||
| 370 | Alternate="0" /> | ||
| 371 | <pin11 | ||
| 372 | ID="" | ||
| 373 | Type="PushPull" | ||
| 374 | Level="High" | ||
| 375 | Speed="Maximum" | ||
| 376 | Resistor="PullUp" | ||
| 377 | Mode="Input" | ||
| 378 | Alternate="0" /> | ||
| 379 | <pin12 | ||
| 380 | ID="" | ||
| 381 | Type="PushPull" | ||
| 382 | Level="High" | ||
| 383 | Speed="Maximum" | ||
| 384 | Resistor="PullUp" | ||
| 385 | Mode="Input" | ||
| 386 | Alternate="0" /> | ||
| 387 | <pin13 | ||
| 388 | ID="BUTTON" | ||
| 389 | Type="PushPull" | ||
| 390 | Level="High" | ||
| 391 | Speed="Maximum" | ||
| 392 | Resistor="Floating" | ||
| 393 | Mode="Input" | ||
| 394 | Alternate="0" /> | ||
| 395 | <pin14 | ||
| 396 | ID="OSC32_IN" | ||
| 397 | Type="PushPull" | ||
| 398 | Level="High" | ||
| 399 | Speed="Maximum" | ||
| 400 | Resistor="Floating" | ||
| 401 | Mode="Input" | ||
| 402 | Alternate="0" /> | ||
| 403 | <pin15 | ||
| 404 | ID="OSC32_OUT" | ||
| 405 | Type="PushPull" | ||
| 406 | Level="High" | ||
| 407 | Speed="Maximum" | ||
| 408 | Resistor="Floating" | ||
| 409 | Mode="Input" | ||
| 410 | Alternate="0" /> | ||
| 411 | </GPIOC> | ||
| 412 | <GPIOD> | ||
| 413 | <pin0 | ||
| 414 | ID="" | ||
| 415 | Type="PushPull" | ||
| 416 | Level="High" | ||
| 417 | Speed="Maximum" | ||
| 418 | Resistor="PullUp" | ||
| 419 | Mode="Input" | ||
| 420 | Alternate="0" /> | ||
| 421 | <pin1 | ||
| 422 | ID="" | ||
| 423 | Type="PushPull" | ||
| 424 | Level="High" | ||
| 425 | Speed="Maximum" | ||
| 426 | Resistor="PullUp" | ||
| 427 | Mode="Input" | ||
| 428 | Alternate="0" /> | ||
| 429 | <pin2 | ||
| 430 | ID="" | ||
| 431 | Type="PushPull" | ||
| 432 | Level="High" | ||
| 433 | Speed="Maximum" | ||
| 434 | Resistor="PullUp" | ||
| 435 | Mode="Input" | ||
| 436 | Alternate="0" /> | ||
| 437 | <pin3 | ||
| 438 | ID="" | ||
| 439 | Type="PushPull" | ||
| 440 | Level="High" | ||
| 441 | Speed="Maximum" | ||
| 442 | Resistor="PullUp" | ||
| 443 | Mode="Input" | ||
| 444 | Alternate="0" /> | ||
| 445 | <pin4 | ||
| 446 | ID="" | ||
| 447 | Type="PushPull" | ||
| 448 | Level="High" | ||
| 449 | Speed="Maximum" | ||
| 450 | Resistor="PullUp" | ||
| 451 | Mode="Input" | ||
| 452 | Alternate="0" /> | ||
| 453 | <pin5 | ||
| 454 | ID="" | ||
| 455 | Type="PushPull" | ||
| 456 | Level="High" | ||
| 457 | Speed="Maximum" | ||
| 458 | Resistor="PullUp" | ||
| 459 | Mode="Input" | ||
| 460 | Alternate="0" /> | ||
| 461 | <pin6 | ||
| 462 | ID="" | ||
| 463 | Type="PushPull" | ||
| 464 | Level="High" | ||
| 465 | Speed="Maximum" | ||
| 466 | Resistor="PullUp" | ||
| 467 | Mode="Input" | ||
| 468 | Alternate="0" /> | ||
| 469 | <pin7 | ||
| 470 | ID="" | ||
| 471 | Type="PushPull" | ||
| 472 | Level="High" | ||
| 473 | Speed="Maximum" | ||
| 474 | Resistor="PullUp" | ||
| 475 | Mode="Input" | ||
| 476 | Alternate="0" /> | ||
| 477 | <pin8 | ||
| 478 | ID="" | ||
| 479 | Type="PushPull" | ||
| 480 | Level="High" | ||
| 481 | Speed="Maximum" | ||
| 482 | Resistor="PullUp" | ||
| 483 | Mode="Input" | ||
| 484 | Alternate="0" /> | ||
| 485 | <pin9 | ||
| 486 | ID="" | ||
| 487 | Type="PushPull" | ||
| 488 | Level="High" | ||
| 489 | Speed="Maximum" | ||
| 490 | Resistor="PullUp" | ||
| 491 | Mode="Input" | ||
| 492 | Alternate="0" /> | ||
| 493 | <pin10 | ||
| 494 | ID="" | ||
| 495 | Type="PushPull" | ||
| 496 | Level="High" | ||
| 497 | Speed="Maximum" | ||
| 498 | Resistor="PullUp" | ||
| 499 | Mode="Input" | ||
| 500 | Alternate="0" /> | ||
| 501 | <pin11 | ||
| 502 | ID="" | ||
| 503 | Type="PushPull" | ||
| 504 | Level="High" | ||
| 505 | Speed="Maximum" | ||
| 506 | Resistor="PullUp" | ||
| 507 | Mode="Input" | ||
| 508 | Alternate="0" /> | ||
| 509 | <pin12 | ||
| 510 | ID="" | ||
| 511 | Type="PushPull" | ||
| 512 | Level="High" | ||
| 513 | Speed="Maximum" | ||
| 514 | Resistor="PullUp" | ||
| 515 | Mode="Input" | ||
| 516 | Alternate="0" /> | ||
| 517 | <pin13 | ||
| 518 | ID="" | ||
| 519 | Type="PushPull" | ||
| 520 | Level="High" | ||
| 521 | Speed="Maximum" | ||
| 522 | Resistor="PullUp" | ||
| 523 | Mode="Input" | ||
| 524 | Alternate="0" /> | ||
| 525 | <pin14 | ||
| 526 | ID="" | ||
| 527 | Type="PushPull" | ||
| 528 | Level="High" | ||
| 529 | Speed="Maximum" | ||
| 530 | Resistor="PullUp" | ||
| 531 | Mode="Input" | ||
| 532 | Alternate="0" /> | ||
| 533 | <pin15 | ||
| 534 | ID="" | ||
| 535 | Type="PushPull" | ||
| 536 | Level="High" | ||
| 537 | Speed="Maximum" | ||
| 538 | Resistor="PullUp" | ||
| 539 | Mode="Input" | ||
| 540 | Alternate="0" /> | ||
| 541 | </GPIOD> | ||
| 542 | <GPIOE> | ||
| 543 | <pin0 | ||
| 544 | ID="" | ||
| 545 | Type="PushPull" | ||
| 546 | Level="High" | ||
| 547 | Speed="Maximum" | ||
| 548 | Resistor="PullUp" | ||
| 549 | Mode="Input" | ||
| 550 | Alternate="0" /> | ||
| 551 | <pin1 | ||
| 552 | ID="" | ||
| 553 | Type="PushPull" | ||
| 554 | Level="High" | ||
| 555 | Speed="Maximum" | ||
| 556 | Resistor="PullUp" | ||
| 557 | Mode="Input" | ||
| 558 | Alternate="0" /> | ||
| 559 | <pin2 | ||
| 560 | ID="" | ||
| 561 | Type="PushPull" | ||
| 562 | Level="High" | ||
| 563 | Speed="Maximum" | ||
| 564 | Resistor="PullUp" | ||
| 565 | Mode="Input" | ||
| 566 | Alternate="0" /> | ||
| 567 | <pin3 | ||
| 568 | ID="" | ||
| 569 | Type="PushPull" | ||
| 570 | Level="High" | ||
| 571 | Speed="Maximum" | ||
| 572 | Resistor="PullUp" | ||
| 573 | Mode="Input" | ||
| 574 | Alternate="0" /> | ||
| 575 | <pin4 | ||
| 576 | ID="" | ||
| 577 | Type="PushPull" | ||
| 578 | Level="High" | ||
| 579 | Speed="Maximum" | ||
| 580 | Resistor="PullUp" | ||
| 581 | Mode="Input" | ||
| 582 | Alternate="0" /> | ||
| 583 | <pin5 | ||
| 584 | ID="" | ||
| 585 | Type="PushPull" | ||
| 586 | Level="High" | ||
| 587 | Speed="Maximum" | ||
| 588 | Resistor="PullUp" | ||
| 589 | Mode="Input" | ||
| 590 | Alternate="0" /> | ||
| 591 | <pin6 | ||
| 592 | ID="" | ||
| 593 | Type="PushPull" | ||
| 594 | Level="High" | ||
| 595 | Speed="Maximum" | ||
| 596 | Resistor="PullUp" | ||
| 597 | Mode="Input" | ||
| 598 | Alternate="0" /> | ||
| 599 | <pin7 | ||
| 600 | ID="" | ||
| 601 | Type="PushPull" | ||
| 602 | Level="High" | ||
| 603 | Speed="Maximum" | ||
| 604 | Resistor="PullUp" | ||
| 605 | Mode="Input" | ||
| 606 | Alternate="0" /> | ||
| 607 | <pin8 | ||
| 608 | ID="" | ||
| 609 | Type="PushPull" | ||
| 610 | Level="High" | ||
| 611 | Speed="Maximum" | ||
| 612 | Resistor="PullUp" | ||
| 613 | Mode="Input" | ||
| 614 | Alternate="0" /> | ||
| 615 | <pin9 | ||
| 616 | ID="" | ||
| 617 | Type="PushPull" | ||
| 618 | Level="High" | ||
| 619 | Speed="Maximum" | ||
| 620 | Resistor="PullUp" | ||
| 621 | Mode="Input" | ||
| 622 | Alternate="0" /> | ||
| 623 | <pin10 | ||
| 624 | ID="" | ||
| 625 | Type="PushPull" | ||
| 626 | Level="High" | ||
| 627 | Speed="Maximum" | ||
| 628 | Resistor="PullUp" | ||
| 629 | Mode="Input" | ||
| 630 | Alternate="0" /> | ||
| 631 | <pin11 | ||
| 632 | ID="" | ||
| 633 | Type="PushPull" | ||
| 634 | Level="High" | ||
| 635 | Speed="Maximum" | ||
| 636 | Resistor="PullUp" | ||
| 637 | Mode="Input" | ||
| 638 | Alternate="0" /> | ||
| 639 | <pin12 | ||
| 640 | ID="" | ||
| 641 | Type="PushPull" | ||
| 642 | Level="High" | ||
| 643 | Speed="Maximum" | ||
| 644 | Resistor="PullUp" | ||
| 645 | Mode="Input" | ||
| 646 | Alternate="0" /> | ||
| 647 | <pin13 | ||
| 648 | ID="" | ||
| 649 | Type="PushPull" | ||
| 650 | Level="High" | ||
| 651 | Speed="Maximum" | ||
| 652 | Resistor="PullUp" | ||
| 653 | Mode="Input" | ||
| 654 | Alternate="0" /> | ||
| 655 | <pin14 | ||
| 656 | ID="" | ||
| 657 | Type="PushPull" | ||
| 658 | Level="High" | ||
| 659 | Speed="Maximum" | ||
| 660 | Resistor="PullUp" | ||
| 661 | Mode="Input" | ||
| 662 | Alternate="0" /> | ||
| 663 | <pin15 | ||
| 664 | ID="" | ||
| 665 | Type="PushPull" | ||
| 666 | Level="High" | ||
| 667 | Speed="Maximum" | ||
| 668 | Resistor="PullUp" | ||
| 669 | Mode="Input" | ||
| 670 | Alternate="0" /> | ||
| 671 | </GPIOE> | ||
| 672 | <GPIOF> | ||
| 673 | <pin0 | ||
| 674 | ID="" | ||
| 675 | Type="PushPull" | ||
| 676 | Level="High" | ||
| 677 | Speed="Maximum" | ||
| 678 | Resistor="PullUp" | ||
| 679 | Mode="Input" | ||
| 680 | Alternate="0" /> | ||
| 681 | <pin1 | ||
| 682 | ID="" | ||
| 683 | Type="PushPull" | ||
| 684 | Level="High" | ||
| 685 | Speed="Maximum" | ||
| 686 | Resistor="PullUp" | ||
| 687 | Mode="Input" | ||
| 688 | Alternate="0" /> | ||
| 689 | <pin2 | ||
| 690 | ID="" | ||
| 691 | Type="PushPull" | ||
| 692 | Level="High" | ||
| 693 | Speed="Maximum" | ||
| 694 | Resistor="PullUp" | ||
| 695 | Mode="Input" | ||
| 696 | Alternate="0" /> | ||
| 697 | <pin3 | ||
| 698 | ID="" | ||
| 699 | Type="PushPull" | ||
| 700 | Level="High" | ||
| 701 | Speed="Maximum" | ||
| 702 | Resistor="PullUp" | ||
| 703 | Mode="Input" | ||
| 704 | Alternate="0" /> | ||
| 705 | <pin4 | ||
| 706 | ID="" | ||
| 707 | Type="PushPull" | ||
| 708 | Level="High" | ||
| 709 | Speed="Maximum" | ||
| 710 | Resistor="PullUp" | ||
| 711 | Mode="Input" | ||
| 712 | Alternate="0" /> | ||
| 713 | <pin5 | ||
| 714 | ID="" | ||
| 715 | Type="PushPull" | ||
| 716 | Level="High" | ||
| 717 | Speed="Maximum" | ||
| 718 | Resistor="PullUp" | ||
| 719 | Mode="Input" | ||
| 720 | Alternate="0" /> | ||
| 721 | <pin6 | ||
| 722 | ID="" | ||
| 723 | Type="PushPull" | ||
| 724 | Level="High" | ||
| 725 | Speed="Maximum" | ||
| 726 | Resistor="PullUp" | ||
| 727 | Mode="Input" | ||
| 728 | Alternate="0" /> | ||
| 729 | <pin7 | ||
| 730 | ID="" | ||
| 731 | Type="PushPull" | ||
| 732 | Level="High" | ||
| 733 | Speed="Maximum" | ||
| 734 | Resistor="PullUp" | ||
| 735 | Mode="Input" | ||
| 736 | Alternate="0" /> | ||
| 737 | <pin8 | ||
| 738 | ID="" | ||
| 739 | Type="PushPull" | ||
| 740 | Level="High" | ||
| 741 | Speed="Maximum" | ||
| 742 | Resistor="PullUp" | ||
| 743 | Mode="Input" | ||
| 744 | Alternate="0" /> | ||
| 745 | <pin9 | ||
| 746 | ID="" | ||
| 747 | Type="PushPull" | ||
| 748 | Level="High" | ||
| 749 | Speed="Maximum" | ||
| 750 | Resistor="PullUp" | ||
| 751 | Mode="Input" | ||
| 752 | Alternate="0" /> | ||
| 753 | <pin10 | ||
| 754 | ID="" | ||
| 755 | Type="PushPull" | ||
| 756 | Level="High" | ||
| 757 | Speed="Maximum" | ||
| 758 | Resistor="PullUp" | ||
| 759 | Mode="Input" | ||
| 760 | Alternate="0" /> | ||
| 761 | <pin11 | ||
| 762 | ID="" | ||
| 763 | Type="PushPull" | ||
| 764 | Level="High" | ||
| 765 | Speed="Maximum" | ||
| 766 | Resistor="PullUp" | ||
| 767 | Mode="Input" | ||
| 768 | Alternate="0" /> | ||
| 769 | <pin12 | ||
| 770 | ID="" | ||
| 771 | Type="PushPull" | ||
| 772 | Level="High" | ||
| 773 | Speed="Maximum" | ||
| 774 | Resistor="PullUp" | ||
| 775 | Mode="Input" | ||
| 776 | Alternate="0" /> | ||
| 777 | <pin13 | ||
| 778 | ID="" | ||
| 779 | Type="PushPull" | ||
| 780 | Level="High" | ||
| 781 | Speed="Maximum" | ||
| 782 | Resistor="PullUp" | ||
| 783 | Mode="Input" | ||
| 784 | Alternate="0" /> | ||
| 785 | <pin14 | ||
| 786 | ID="" | ||
| 787 | Type="PushPull" | ||
| 788 | Level="High" | ||
| 789 | Speed="Maximum" | ||
| 790 | Resistor="PullUp" | ||
| 791 | Mode="Input" | ||
| 792 | Alternate="0" /> | ||
| 793 | <pin15 | ||
| 794 | ID="" | ||
| 795 | Type="PushPull" | ||
| 796 | Level="High" | ||
| 797 | Speed="Maximum" | ||
| 798 | Resistor="PullUp" | ||
| 799 | Mode="Input" | ||
| 800 | Alternate="0" /> | ||
| 801 | </GPIOF> | ||
| 802 | <GPIOG> | ||
| 803 | <pin0 | ||
| 804 | ID="" | ||
| 805 | Type="PushPull" | ||
| 806 | Level="High" | ||
| 807 | Speed="Maximum" | ||
| 808 | Resistor="PullUp" | ||
| 809 | Mode="Input" | ||
| 810 | Alternate="0" /> | ||
| 811 | <pin1 | ||
| 812 | ID="" | ||
| 813 | Type="PushPull" | ||
| 814 | Level="High" | ||
| 815 | Speed="Maximum" | ||
| 816 | Resistor="PullUp" | ||
| 817 | Mode="Input" | ||
| 818 | Alternate="0" /> | ||
| 819 | <pin2 | ||
| 820 | ID="" | ||
| 821 | Type="PushPull" | ||
| 822 | Level="High" | ||
| 823 | Speed="Maximum" | ||
| 824 | Resistor="PullUp" | ||
| 825 | Mode="Input" | ||
| 826 | Alternate="0" /> | ||
| 827 | <pin3 | ||
| 828 | ID="" | ||
| 829 | Type="PushPull" | ||
| 830 | Level="High" | ||
| 831 | Speed="Maximum" | ||
| 832 | Resistor="PullUp" | ||
| 833 | Mode="Input" | ||
| 834 | Alternate="0" /> | ||
| 835 | <pin4 | ||
| 836 | ID="" | ||
| 837 | Type="PushPull" | ||
| 838 | Level="High" | ||
| 839 | Speed="Maximum" | ||
| 840 | Resistor="PullUp" | ||
| 841 | Mode="Input" | ||
| 842 | Alternate="0" /> | ||
| 843 | <pin5 | ||
| 844 | ID="" | ||
| 845 | Type="PushPull" | ||
| 846 | Level="High" | ||
| 847 | Speed="Maximum" | ||
| 848 | Resistor="PullUp" | ||
| 849 | Mode="Input" | ||
| 850 | Alternate="0" /> | ||
| 851 | <pin6 | ||
| 852 | ID="" | ||
| 853 | Type="PushPull" | ||
| 854 | Level="High" | ||
| 855 | Speed="Maximum" | ||
| 856 | Resistor="PullUp" | ||
| 857 | Mode="Input" | ||
| 858 | Alternate="0" /> | ||
| 859 | <pin7 | ||
| 860 | ID="" | ||
| 861 | Type="PushPull" | ||
| 862 | Level="High" | ||
| 863 | Speed="Maximum" | ||
| 864 | Resistor="PullUp" | ||
| 865 | Mode="Input" | ||
| 866 | Alternate="0" /> | ||
| 867 | <pin8 | ||
| 868 | ID="" | ||
| 869 | Type="PushPull" | ||
| 870 | Level="High" | ||
| 871 | Speed="Maximum" | ||
| 872 | Resistor="PullUp" | ||
| 873 | Mode="Input" | ||
| 874 | Alternate="0" /> | ||
| 875 | <pin9 | ||
| 876 | ID="" | ||
| 877 | Type="PushPull" | ||
| 878 | Level="High" | ||
| 879 | Speed="Maximum" | ||
| 880 | Resistor="PullUp" | ||
| 881 | Mode="Input" | ||
| 882 | Alternate="0" /> | ||
| 883 | <pin10 | ||
| 884 | ID="" | ||
| 885 | Type="PushPull" | ||
| 886 | Level="High" | ||
| 887 | Speed="Maximum" | ||
| 888 | Resistor="PullUp" | ||
| 889 | Mode="Input" | ||
| 890 | Alternate="0" /> | ||
| 891 | <pin11 | ||
| 892 | ID="" | ||
| 893 | Type="PushPull" | ||
| 894 | Level="High" | ||
| 895 | Speed="Maximum" | ||
| 896 | Resistor="PullUp" | ||
| 897 | Mode="Input" | ||
| 898 | Alternate="0" /> | ||
| 899 | <pin12 | ||
| 900 | ID="" | ||
| 901 | Type="PushPull" | ||
| 902 | Level="High" | ||
| 903 | Speed="Maximum" | ||
| 904 | Resistor="PullUp" | ||
| 905 | Mode="Input" | ||
| 906 | Alternate="0" /> | ||
| 907 | <pin13 | ||
| 908 | ID="" | ||
| 909 | Type="PushPull" | ||
| 910 | Level="High" | ||
| 911 | Speed="Maximum" | ||
| 912 | Resistor="PullUp" | ||
| 913 | Mode="Input" | ||
| 914 | Alternate="0" /> | ||
| 915 | <pin14 | ||
| 916 | ID="" | ||
| 917 | Type="PushPull" | ||
| 918 | Level="High" | ||
| 919 | Speed="Maximum" | ||
| 920 | Resistor="PullUp" | ||
| 921 | Mode="Input" | ||
| 922 | Alternate="0" /> | ||
| 923 | <pin15 | ||
| 924 | ID="" | ||
| 925 | Type="PushPull" | ||
| 926 | Level="High" | ||
| 927 | Speed="Maximum" | ||
| 928 | Resistor="PullUp" | ||
| 929 | Mode="Input" | ||
| 930 | Alternate="0" /> | ||
| 931 | </GPIOG> | ||
| 932 | <GPIOH> | ||
| 933 | <pin0 | ||
| 934 | ID="OSC_IN" | ||
| 935 | Type="PushPull" | ||
| 936 | Level="High" | ||
| 937 | Speed="Maximum" | ||
| 938 | Resistor="Floating" | ||
| 939 | Mode="Input" | ||
| 940 | Alternate="0" /> | ||
| 941 | <pin1 | ||
| 942 | ID="OSC_OUT" | ||
| 943 | Type="PushPull" | ||
| 944 | Level="High" | ||
| 945 | Speed="Maximum" | ||
| 946 | Resistor="Floating" | ||
| 947 | Mode="Input" | ||
| 948 | Alternate="0" /> | ||
| 949 | <pin2 | ||
| 950 | ID="" | ||
| 951 | Type="PushPull" | ||
| 952 | Level="High" | ||
| 953 | Speed="Maximum" | ||
| 954 | Resistor="PullUp" | ||
| 955 | Mode="Input" | ||
| 956 | Alternate="0" /> | ||
| 957 | <pin3 | ||
| 958 | ID="" | ||
| 959 | Type="PushPull" | ||
| 960 | Level="High" | ||
| 961 | Speed="Maximum" | ||
| 962 | Resistor="PullUp" | ||
| 963 | Mode="Input" | ||
| 964 | Alternate="0" /> | ||
| 965 | <pin4 | ||
| 966 | ID="" | ||
| 967 | Type="PushPull" | ||
| 968 | Level="High" | ||
| 969 | Speed="Maximum" | ||
| 970 | Resistor="PullUp" | ||
| 971 | Mode="Input" | ||
| 972 | Alternate="0" /> | ||
| 973 | <pin5 | ||
| 974 | ID="" | ||
| 975 | Type="PushPull" | ||
| 976 | Level="High" | ||
| 977 | Speed="Maximum" | ||
| 978 | Resistor="PullUp" | ||
| 979 | Mode="Input" | ||
| 980 | Alternate="0" /> | ||
| 981 | <pin6 | ||
| 982 | ID="" | ||
| 983 | Type="PushPull" | ||
| 984 | Level="High" | ||
| 985 | Speed="Maximum" | ||
| 986 | Resistor="PullUp" | ||
| 987 | Mode="Input" | ||
| 988 | Alternate="0" /> | ||
| 989 | <pin7 | ||
| 990 | ID="" | ||
| 991 | Type="PushPull" | ||
| 992 | Level="High" | ||
| 993 | Speed="Maximum" | ||
| 994 | Resistor="PullUp" | ||
| 995 | Mode="Input" | ||
| 996 | Alternate="0" /> | ||
| 997 | <pin8 | ||
| 998 | ID="" | ||
| 999 | Type="PushPull" | ||
| 1000 | Level="High" | ||
| 1001 | Speed="Maximum" | ||
| 1002 | Resistor="PullUp" | ||
| 1003 | Mode="Input" | ||
| 1004 | Alternate="0" /> | ||
| 1005 | <pin9 | ||
| 1006 | ID="" | ||
| 1007 | Type="PushPull" | ||
| 1008 | Level="High" | ||
| 1009 | Speed="Maximum" | ||
| 1010 | Resistor="PullUp" | ||
| 1011 | Mode="Input" | ||
| 1012 | Alternate="0" /> | ||
| 1013 | <pin10 | ||
| 1014 | ID="" | ||
| 1015 | Type="PushPull" | ||
| 1016 | Level="High" | ||
| 1017 | Speed="Maximum" | ||
| 1018 | Resistor="PullUp" | ||
| 1019 | Mode="Input" | ||
| 1020 | Alternate="0" /> | ||
| 1021 | <pin11 | ||
| 1022 | ID="" | ||
| 1023 | Type="PushPull" | ||
| 1024 | Level="High" | ||
| 1025 | Speed="Maximum" | ||
| 1026 | Resistor="PullUp" | ||
| 1027 | Mode="Input" | ||
| 1028 | Alternate="0" /> | ||
| 1029 | <pin12 | ||
| 1030 | ID="" | ||
| 1031 | Type="PushPull" | ||
| 1032 | Level="High" | ||
| 1033 | Speed="Maximum" | ||
| 1034 | Resistor="PullUp" | ||
| 1035 | Mode="Input" | ||
| 1036 | Alternate="0" /> | ||
| 1037 | <pin13 | ||
| 1038 | ID="" | ||
| 1039 | Type="PushPull" | ||
| 1040 | Level="High" | ||
| 1041 | Speed="Maximum" | ||
| 1042 | Resistor="PullUp" | ||
| 1043 | Mode="Input" | ||
| 1044 | Alternate="0" /> | ||
| 1045 | <pin14 | ||
| 1046 | ID="" | ||
| 1047 | Type="PushPull" | ||
| 1048 | Level="High" | ||
| 1049 | Speed="Maximum" | ||
| 1050 | Resistor="PullUp" | ||
| 1051 | Mode="Input" | ||
| 1052 | Alternate="0" /> | ||
| 1053 | <pin15 | ||
| 1054 | ID="" | ||
| 1055 | Type="PushPull" | ||
| 1056 | Level="High" | ||
| 1057 | Speed="Maximum" | ||
| 1058 | Resistor="PullUp" | ||
| 1059 | Mode="Input" | ||
| 1060 | Alternate="0" /> | ||
| 1061 | </GPIOH> | ||
| 1062 | <GPIOI> | ||
| 1063 | <pin0 | ||
| 1064 | ID="" | ||
| 1065 | Type="PushPull" | ||
| 1066 | Level="High" | ||
| 1067 | Speed="Maximum" | ||
| 1068 | Resistor="PullUp" | ||
| 1069 | Mode="Input" | ||
| 1070 | Alternate="0" /> | ||
| 1071 | <pin1 | ||
| 1072 | ID="" | ||
| 1073 | Type="PushPull" | ||
| 1074 | Level="High" | ||
| 1075 | Speed="Maximum" | ||
| 1076 | Resistor="PullUp" | ||
| 1077 | Mode="Input" | ||
| 1078 | Alternate="0" /> | ||
| 1079 | <pin2 | ||
| 1080 | ID="" | ||
| 1081 | Type="PushPull" | ||
| 1082 | Level="High" | ||
| 1083 | Speed="Maximum" | ||
| 1084 | Resistor="PullUp" | ||
| 1085 | Mode="Input" | ||
| 1086 | Alternate="0" /> | ||
| 1087 | <pin3 | ||
| 1088 | ID="" | ||
| 1089 | Type="PushPull" | ||
| 1090 | Level="High" | ||
| 1091 | Speed="Maximum" | ||
| 1092 | Resistor="PullUp" | ||
| 1093 | Mode="Input" | ||
| 1094 | Alternate="0" /> | ||
| 1095 | <pin4 | ||
| 1096 | ID="" | ||
| 1097 | Type="PushPull" | ||
| 1098 | Level="High" | ||
| 1099 | Speed="Maximum" | ||
| 1100 | Resistor="PullUp" | ||
| 1101 | Mode="Input" | ||
| 1102 | Alternate="0" /> | ||
| 1103 | <pin5 | ||
| 1104 | ID="" | ||
| 1105 | Type="PushPull" | ||
| 1106 | Level="High" | ||
| 1107 | Speed="Maximum" | ||
| 1108 | Resistor="PullUp" | ||
| 1109 | Mode="Input" | ||
| 1110 | Alternate="0" /> | ||
| 1111 | <pin6 | ||
| 1112 | ID="" | ||
| 1113 | Type="PushPull" | ||
| 1114 | Level="High" | ||
| 1115 | Speed="Maximum" | ||
| 1116 | Resistor="PullUp" | ||
| 1117 | Mode="Input" | ||
| 1118 | Alternate="0" /> | ||
| 1119 | <pin7 | ||
| 1120 | ID="" | ||
| 1121 | Type="PushPull" | ||
| 1122 | Level="High" | ||
| 1123 | Speed="Maximum" | ||
| 1124 | Resistor="PullUp" | ||
| 1125 | Mode="Input" | ||
| 1126 | Alternate="0" /> | ||
| 1127 | <pin8 | ||
| 1128 | ID="" | ||
| 1129 | Type="PushPull" | ||
| 1130 | Level="High" | ||
| 1131 | Speed="Maximum" | ||
| 1132 | Resistor="PullUp" | ||
| 1133 | Mode="Input" | ||
| 1134 | Alternate="0" /> | ||
| 1135 | <pin9 | ||
| 1136 | ID="" | ||
| 1137 | Type="PushPull" | ||
| 1138 | Level="High" | ||
| 1139 | Speed="Maximum" | ||
| 1140 | Resistor="PullUp" | ||
| 1141 | Mode="Input" | ||
| 1142 | Alternate="0" /> | ||
| 1143 | <pin10 | ||
| 1144 | ID="" | ||
| 1145 | Type="PushPull" | ||
| 1146 | Level="High" | ||
| 1147 | Speed="Maximum" | ||
| 1148 | Resistor="PullUp" | ||
| 1149 | Mode="Input" | ||
| 1150 | Alternate="0" /> | ||
| 1151 | <pin11 | ||
| 1152 | ID="" | ||
| 1153 | Type="PushPull" | ||
| 1154 | Level="High" | ||
| 1155 | Speed="Maximum" | ||
| 1156 | Resistor="PullUp" | ||
| 1157 | Mode="Input" | ||
| 1158 | Alternate="0" /> | ||
| 1159 | <pin12 | ||
| 1160 | ID="" | ||
| 1161 | Type="PushPull" | ||
| 1162 | Level="High" | ||
| 1163 | Speed="Maximum" | ||
| 1164 | Resistor="PullUp" | ||
| 1165 | Mode="Input" | ||
| 1166 | Alternate="0" /> | ||
| 1167 | <pin13 | ||
| 1168 | ID="" | ||
| 1169 | Type="PushPull" | ||
| 1170 | Level="High" | ||
| 1171 | Speed="Maximum" | ||
| 1172 | Resistor="PullUp" | ||
| 1173 | Mode="Input" | ||
| 1174 | Alternate="0" /> | ||
| 1175 | <pin14 | ||
| 1176 | ID="" | ||
| 1177 | Type="PushPull" | ||
| 1178 | Level="High" | ||
| 1179 | Speed="Maximum" | ||
| 1180 | Resistor="PullUp" | ||
| 1181 | Mode="Input" | ||
| 1182 | Alternate="0" /> | ||
| 1183 | <pin15 | ||
| 1184 | ID="" | ||
| 1185 | Type="PushPull" | ||
| 1186 | Level="High" | ||
| 1187 | Speed="Maximum" | ||
| 1188 | Resistor="PullUp" | ||
| 1189 | Mode="Input" | ||
| 1190 | Alternate="0" /> | ||
| 1191 | </GPIOI> | ||
| 1192 | </ports> | ||
| 1193 | </board> | ||
diff --git a/drivers/boards/BLACKPILL_STM32_F411/cfg/board.fmpp b/drivers/boards/BLACKPILL_STM32_F411/cfg/board.fmpp deleted file mode 100644 index 41754c141..000000000 --- a/drivers/boards/BLACKPILL_STM32_F411/cfg/board.fmpp +++ /dev/null | |||
| @@ -1,15 +0,0 @@ | |||
| 1 | sourceRoot: ../../../../../tools/ftl/processors/boards/stm32f4xx/templates | ||
| 2 | outputRoot: .. | ||
| 3 | dataRoot: . | ||
| 4 | |||
| 5 | freemarkerLinks: { | ||
| 6 | lib: ../../../../../tools/ftl/libs | ||
| 7 | } | ||
| 8 | |||
| 9 | data : { | ||
| 10 | doc1:xml ( | ||
| 11 | board.chcfg | ||
| 12 | { | ||
| 13 | } | ||
| 14 | ) | ||
| 15 | } | ||
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 | */ | ||
| 40 | typedef struct { | ||
| 41 | uint32_t moder; | ||
| 42 | uint32_t otyper; | ||
| 43 | uint32_t ospeedr; | ||
| 44 | uint32_t pupdr; | ||
| 45 | uint32_t odr; | ||
| 46 | uint32_t afrl; | ||
| 47 | uint32_t afrh; | ||
| 48 | } gpio_setup_t; | ||
| 49 | |||
| 50 | /** | ||
| 51 | * @brief Type of STM32 GPIO initialization data. | ||
| 52 | */ | ||
| 53 | typedef 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 | */ | ||
| 92 | static 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 | |||
| 132 | static 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 | |||
| 142 | static 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 | */ | ||
| 199 | void __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 | */ | ||
| 210 | bool 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 | */ | ||
| 219 | bool 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 | */ | ||
| 230 | bool 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 | */ | ||
| 239 | bool 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 | */ | ||
| 250 | void 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 | ||
| 399 | extern "C" { | ||
| 400 | # endif | ||
| 401 | void 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. | ||
| 2 | BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F072XB/board.c | ||
| 3 | |||
| 4 | # Required include directories | ||
| 5 | BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F072XB | ||
| 6 | |||
| 7 | # Shared variables | ||
| 8 | ALLCSRC += $(BOARDSRC) | ||
| 9 | ALLINC += $(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 @@ | |||
| 1 | sourceRoot: ../../../../../tools/ftl/processors/boards/stm32f0xx/templates | ||
| 2 | outputRoot: .. | ||
| 3 | dataRoot: . | ||
| 4 | |||
| 5 | freemarkerLinks: { | ||
| 6 | lib: ../../../../../tools/ftl/libs | ||
| 7 | } | ||
| 8 | |||
| 9 | data : { | ||
| 10 | doc1:xml ( | ||
| 11 | board.chcfg | ||
| 12 | { | ||
| 13 | } | ||
| 14 | ) | ||
| 15 | } | ||
diff --git a/drivers/boards/GENERIC_STM32_F303XC/board.c b/drivers/boards/GENERIC_STM32_F303XC/board.c deleted file mode 100644 index 9b0fc1b6b..000000000 --- a/drivers/boards/GENERIC_STM32_F303XC/board.c +++ /dev/null | |||
| @@ -1,242 +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 | #include "hal.h" | ||
| 23 | #include "stm32_gpio.h" | ||
| 24 | |||
| 25 | /*===========================================================================*/ | ||
| 26 | /* Driver local definitions. */ | ||
| 27 | /*===========================================================================*/ | ||
| 28 | |||
| 29 | /*===========================================================================*/ | ||
| 30 | /* Driver exported variables. */ | ||
| 31 | /*===========================================================================*/ | ||
| 32 | |||
| 33 | /*===========================================================================*/ | ||
| 34 | /* Driver local variables and types. */ | ||
| 35 | /*===========================================================================*/ | ||
| 36 | |||
| 37 | /** | ||
| 38 | * @brief Type of STM32 GPIO port setup. | ||
| 39 | */ | ||
| 40 | typedef struct { | ||
| 41 | uint32_t moder; | ||
| 42 | uint32_t otyper; | ||
| 43 | uint32_t ospeedr; | ||
| 44 | uint32_t pupdr; | ||
| 45 | uint32_t odr; | ||
| 46 | uint32_t afrl; | ||
| 47 | uint32_t afrh; | ||
| 48 | } gpio_setup_t; | ||
| 49 | |||
| 50 | /** | ||
| 51 | * @brief Type of STM32 GPIO initialization data. | ||
| 52 | */ | ||
| 53 | typedef 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 | */ | ||
| 92 | static 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 | |||
| 132 | static 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 | |||
| 142 | static 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 | void enter_bootloader_mode_if_requested(void); | ||
| 185 | |||
| 186 | /** | ||
| 187 | * @brief Early initialization code. | ||
| 188 | * @details This initialization must be performed just after stack setup | ||
| 189 | * and before any other initialization. | ||
| 190 | */ | ||
| 191 | void __early_init(void) { | ||
| 192 | enter_bootloader_mode_if_requested(); | ||
| 193 | |||
| 194 | stm32_gpio_init(); | ||
| 195 | stm32_clock_init(); | ||
| 196 | } | ||
| 197 | |||
| 198 | #if HAL_USE_SDC || defined(__DOXYGEN__) | ||
| 199 | /** | ||
| 200 | * @brief SDC card detection. | ||
| 201 | */ | ||
| 202 | bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { | ||
| 203 | (void)sdcp; | ||
| 204 | /* TODO: Fill the implementation.*/ | ||
| 205 | return true; | ||
| 206 | } | ||
| 207 | |||
| 208 | /** | ||
| 209 | * @brief SDC card write protection detection. | ||
| 210 | */ | ||
| 211 | bool sdc_lld_is_write_protected(SDCDriver *sdcp) { | ||
| 212 | (void)sdcp; | ||
| 213 | /* TODO: Fill the implementation.*/ | ||
| 214 | return false; | ||
| 215 | } | ||
| 216 | #endif /* HAL_USE_SDC */ | ||
| 217 | |||
| 218 | #if HAL_USE_MMC_SPI || defined(__DOXYGEN__) | ||
| 219 | /** | ||
| 220 | * @brief MMC_SPI card detection. | ||
| 221 | */ | ||
| 222 | bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { | ||
| 223 | (void)mmcp; | ||
| 224 | /* TODO: Fill the implementation.*/ | ||
| 225 | return true; | ||
| 226 | } | ||
| 227 | |||
| 228 | /** | ||
| 229 | * @brief MMC_SPI card write protection detection. | ||
| 230 | */ | ||
| 231 | bool mmc_lld_is_write_protected(MMCDriver *mmcp) { | ||
| 232 | (void)mmcp; | ||
| 233 | /* TODO: Fill the implementation.*/ | ||
| 234 | return false; | ||
| 235 | } | ||
| 236 | #endif | ||
| 237 | |||
| 238 | /** | ||
| 239 | * @brief Board-specific initialization code. | ||
| 240 | * @todo Add your board-specific code, if any. | ||
| 241 | */ | ||
| 242 | void boardInit(void) {} | ||
diff --git a/drivers/boards/GENERIC_STM32_F303XC/board.h b/drivers/boards/GENERIC_STM32_F303XC/board.h deleted file mode 100644 index 3579c8277..000000000 --- a/drivers/boards/GENERIC_STM32_F303XC/board.h +++ /dev/null | |||
| @@ -1,475 +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 | #ifndef _BOARD_H_ | ||
| 18 | #define _BOARD_H_ | ||
| 19 | |||
| 20 | /* | ||
| 21 | * Setup for Generic STM32_F303 Board | ||
| 22 | */ | ||
| 23 | |||
| 24 | /* | ||
| 25 | * Board identifier. | ||
| 26 | */ | ||
| 27 | #define BOARD_GENERIC_STM32_F303XC | ||
| 28 | #define BOARD_NAME "STM32_F303" | ||
| 29 | |||
| 30 | /* | ||
| 31 | * Board oscillators-related settings. | ||
| 32 | * NOTE: LSE not fitted. | ||
| 33 | */ | ||
| 34 | #if !defined(STM32_LSECLK) | ||
| 35 | # define STM32_LSECLK 0U | ||
| 36 | #endif | ||
| 37 | |||
| 38 | #define STM32_LSEDRV (3U << 3U) | ||
| 39 | |||
| 40 | #if !defined(STM32_HSECLK) | ||
| 41 | # define STM32_HSECLK 8000000U | ||
| 42 | #endif | ||
| 43 | |||
| 44 | // #define STM32_HSE_BYPASS | ||
| 45 | |||
| 46 | /* | ||
| 47 | * MCU type as defined in the ST header. | ||
| 48 | */ | ||
| 49 | #define STM32F303xC | ||
| 50 | |||
| 51 | /* | ||
| 52 | * IO pins assignments. | ||
| 53 | */ | ||
| 54 | #define GPIOA_PIN0 0U | ||
| 55 | #define GPIOA_PIN1 1U | ||
| 56 | #define GPIOA_PIN2 2U | ||
| 57 | #define GPIOA_PIN3 3U | ||
| 58 | #define GPIOA_PIN4 4U | ||
| 59 | #define GPIOA_PIN5 5U | ||
| 60 | #define GPIOA_PIN6 6U | ||
| 61 | #define GPIOA_PIN7 7U | ||
| 62 | #define GPIOA_PIN8 8U | ||
| 63 | #define GPIOA_PIN9 9U | ||
| 64 | #define GPIOA_PIN10 10U | ||
| 65 | #define GPIOA_USB_DM 11U | ||
| 66 | #define GPIOA_USB_DP 12U | ||
| 67 | #define GPIOA_SWDIO 13U | ||
| 68 | #define GPIOA_SWCLK 14U | ||
| 69 | #define GPIOA_PIN15 15U | ||
| 70 | |||
| 71 | #define GPIOB_PIN0 0U | ||
| 72 | #define GPIOB_PIN1 1U | ||
| 73 | #define GPIOB_PIN2 2U | ||
| 74 | #define GPIOB_PIN3 3U | ||
| 75 | #define GPIOB_PIN4 4U | ||
| 76 | #define GPIOB_PIN5 5U | ||
| 77 | #define GPIOB_PIN6 6U | ||
| 78 | #define GPIOB_PIN7 7U | ||
| 79 | #define GPIOB_PIN8 8U | ||
| 80 | #define GPIOB_PIN9 9U | ||
| 81 | #define GPIOB_PIN10 10U | ||
| 82 | #define GPIOB_PIN11 11U | ||
| 83 | #define GPIOB_PIN12 12U | ||
| 84 | #define GPIOB_PIN13 13U | ||
| 85 | #define GPIOB_PIN14 14U | ||
| 86 | #define GPIOB_PIN15 15U | ||
| 87 | |||
| 88 | #define GPIOC_PIN0 0U | ||
| 89 | #define GPIOC_PIN1 1U | ||
| 90 | #define GPIOC_PIN2 2U | ||
| 91 | #define GPIOC_PIN3 3U | ||
| 92 | #define GPIOC_PIN4 4U | ||
| 93 | #define GPIOC_PIN5 5U | ||
| 94 | #define GPIOC_PIN6 6U | ||
| 95 | #define GPIOC_PIN7 7U | ||
| 96 | #define GPIOC_PIN8 8U | ||
| 97 | #define GPIOC_PIN9 9U | ||
| 98 | #define GPIOC_PIN10 10U | ||
| 99 | #define GPIOC_PIN11 11U | ||
| 100 | #define GPIOC_PIN12 12U | ||
| 101 | #define GPIOC_PIN13 13U | ||
| 102 | #define GPIOC_PIN14 14U | ||
| 103 | #define GPIOC_PIN15 15U | ||
| 104 | |||
| 105 | #define GPIOD_PIN0 0U | ||
| 106 | #define GPIOD_PIN1 1U | ||
| 107 | #define GPIOD_PIN2 2U | ||
| 108 | #define GPIOD_PIN3 3U | ||
| 109 | #define GPIOD_PIN4 4U | ||
| 110 | #define GPIOD_PIN5 5U | ||
| 111 | #define GPIOD_PIN6 6U | ||
| 112 | #define GPIOD_PIN7 7U | ||
| 113 | #define GPIOD_PIN8 8U | ||
| 114 | #define GPIOD_PIN9 9U | ||
| 115 | #define GPIOD_PIN10 10U | ||
| 116 | #define GPIOD_PIN11 11U | ||
| 117 | #define GPIOD_PIN12 12U | ||
| 118 | #define GPIOD_PIN13 13U | ||
| 119 | #define GPIOD_PIN14 14U | ||
| 120 | #define GPIOD_PIN15 15U | ||
| 121 | |||
| 122 | #define GPIOE_PIN0 0U | ||
| 123 | #define GPIOE_PIN1 1U | ||
| 124 | #define GPIOE_PIN2 2U | ||
| 125 | #define GPIOE_PIN3 3U | ||
| 126 | #define GPIOE_PIN4 4U | ||
| 127 | #define GPIOE_PIN5 5U | ||
| 128 | #define GPIOE_PIN6 6U | ||
| 129 | #define GPIOE_PIN7 7U | ||
| 130 | #define GPIOE_PIN8 8U | ||
| 131 | #define GPIOE_PIN9 9U | ||
| 132 | #define GPIOE_PIN10 10U | ||
| 133 | #define GPIOE_PIN11 11U | ||
| 134 | #define GPIOE_PIN12 12U | ||
| 135 | #define GPIOE_PIN13 13U | ||
| 136 | #define GPIOE_PIN14 14U | ||
| 137 | #define GPIOE_PIN15 15U | ||
| 138 | |||
| 139 | #define GPIOF_I2C2_SDA 0U | ||
| 140 | #define GPIOF_I2C2_SCL 1U | ||
| 141 | #define GPIOF_PIN2 2U | ||
| 142 | #define GPIOF_PIN3 3U | ||
| 143 | #define GPIOF_PIN4 4U | ||
| 144 | #define GPIOF_PIN5 5U | ||
| 145 | #define GPIOF_PIN6 6U | ||
| 146 | #define GPIOF_PIN7 7U | ||
| 147 | #define GPIOF_PIN8 8U | ||
| 148 | #define GPIOF_PIN9 9U | ||
| 149 | #define GPIOF_PIN10 10U | ||
| 150 | #define GPIOF_PIN11 11U | ||
| 151 | #define GPIOF_PIN12 12U | ||
| 152 | #define GPIOF_PIN13 13U | ||
| 153 | #define GPIOF_PIN14 14U | ||
| 154 | #define GPIOF_PIN15 15U | ||
| 155 | |||
| 156 | #define GPIOG_PIN0 0U | ||
| 157 | #define GPIOG_PIN1 1U | ||
| 158 | #define GPIOG_PIN2 2U | ||
| 159 | #define GPIOG_PIN3 3U | ||
| 160 | #define GPIOG_PIN4 4U | ||
| 161 | #define GPIOG_PIN5 5U | ||
| 162 | #define GPIOG_PIN6 6U | ||
| 163 | #define GPIOG_PIN7 7U | ||
| 164 | #define GPIOG_PIN8 8U | ||
| 165 | #define GPIOG_PIN9 9U | ||
| 166 | #define GPIOG_PIN10 10U | ||
| 167 | #define GPIOG_PIN11 11U | ||
| 168 | #define GPIOG_PIN12 12U | ||
| 169 | #define GPIOG_PIN13 13U | ||
| 170 | #define GPIOG_PIN14 14U | ||
| 171 | #define GPIOG_PIN15 15U | ||
| 172 | |||
| 173 | #define GPIOH_PIN0 0U | ||
| 174 | #define GPIOH_PIN1 1U | ||
| 175 | #define GPIOH_PIN2 2U | ||
| 176 | #define GPIOH_PIN3 3U | ||
| 177 | #define GPIOH_PIN4 4U | ||
| 178 | #define GPIOH_PIN5 5U | ||
| 179 | #define GPIOH_PIN6 6U | ||
| 180 | #define GPIOH_PIN7 7U | ||
| 181 | #define GPIOH_PIN8 8U | ||
| 182 | #define GPIOH_PIN9 9U | ||
| 183 | #define GPIOH_PIN10 10U | ||
| 184 | #define GPIOH_PIN11 11U | ||
| 185 | #define GPIOH_PIN12 12U | ||
| 186 | #define GPIOH_PIN13 13U | ||
| 187 | #define GPIOH_PIN14 14U | ||
| 188 | #define GPIOH_PIN15 15U | ||
| 189 | |||
| 190 | /* | ||
| 191 | * IO lines assignments. | ||
| 192 | */ | ||
| 193 | #define LINE_L3GD20_SDI PAL_LINE(GPIOA, 7U) | ||
| 194 | #define LINE_USB_DM PAL_LINE(GPIOA, 11U) | ||
| 195 | #define LINE_USB_DP PAL_LINE(GPIOA, 12U) | ||
| 196 | #define LINE_SWDIO PAL_LINE(GPIOA, 13U) | ||
| 197 | #define LINE_SWCLK PAL_LINE(GPIOA, 14U) | ||
| 198 | |||
| 199 | #define LINE_PIN6 PAL_LINE(GPIOF, 0U) | ||
| 200 | #define LINE_PIN7 PAL_LINE(GPIOF, 1U) | ||
| 201 | |||
| 202 | #define LINE_CAPS_LOCK PAL_LINE(GPIOB, 7U) | ||
| 203 | |||
| 204 | /* | ||
| 205 | * I/O ports initial setup, this configuration is established soon after reset | ||
| 206 | * in the initialization code. | ||
| 207 | * Please refer to the STM32 Reference Manual for details. | ||
| 208 | */ | ||
| 209 | #define PIN_MODE_INPUT(n) (0U << ((n)*2U)) | ||
| 210 | #define PIN_MODE_OUTPUT(n) (1U << ((n)*2U)) | ||
| 211 | #define PIN_MODE_ALTERNATE(n) (2U << ((n)*2U)) | ||
| 212 | #define PIN_MODE_ANALOG(n) (3U << ((n)*2U)) | ||
| 213 | #define PIN_ODR_LOW(n) (0U << (n)) | ||
| 214 | #define PIN_ODR_HIGH(n) (1U << (n)) | ||
| 215 | #define PIN_OTYPE_PUSHPULL(n) (0U << (n)) | ||
| 216 | #define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) | ||
| 217 | #define PIN_OSPEED_VERYLOW(n) (0U << ((n)*2U)) | ||
| 218 | #define PIN_OSPEED_LOW(n) (1U << ((n)*2U)) | ||
| 219 | #define PIN_OSPEED_MEDIUM(n) (2U << ((n)*2U)) | ||
| 220 | #define PIN_OSPEED_HIGH(n) (3U << ((n)*2U)) | ||
| 221 | #define PIN_PUPDR_FLOATING(n) (0U << ((n)*2U)) | ||
| 222 | #define PIN_PUPDR_PULLUP(n) (1U << ((n)*2U)) | ||
| 223 | #define PIN_PUPDR_PULLDOWN(n) (2U << ((n)*2U)) | ||
| 224 | #define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) | ||
| 225 | |||
| 226 | /* | ||
| 227 | * GPIOA setup: | ||
| 228 | * | ||
| 229 | * PA0 - NC | ||
| 230 | * PA1 - NC | ||
| 231 | * PA2 - COL1 | ||
| 232 | * PA3 - COL2 | ||
| 233 | * PA4 - SPEAKER1 | ||
| 234 | * PA5 - SPEAKER2 | ||
| 235 | * PA6 - COL3 | ||
| 236 | * PA7 - COL8 | ||
| 237 | * PA8 - COL6 | ||
| 238 | * PA9 - COL7 | ||
| 239 | * PA10 - ROW5 | ||
| 240 | * PA11 - USB_DM (alternate 14). | ||
| 241 | * PA12 - USB_DP (alternate 14). | ||
| 242 | * PA13 - SWDIO (alternate 0). | ||
| 243 | * PA14 - SWCLK (alternate 0). | ||
| 244 | * PA15 - ROW4 | ||
| 245 | */ | ||
| 246 | #define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_PIN0) | PIN_MODE_ALTERNATE(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_ALTERNATE(GPIOA_USB_DM) | PIN_MODE_ALTERNATE(GPIOA_USB_DP) | PIN_MODE_ALTERNATE(GPIOA_SWDIO) | PIN_MODE_ALTERNATE(GPIOA_SWCLK) | PIN_MODE_INPUT(GPIOA_PIN15)) | ||
| 247 | #define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_PIN0) | 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)) | ||
| 248 | #define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_PIN0) | PIN_OSPEED_HIGH(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_HIGH(GPIOA_USB_DM) | PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | PIN_OSPEED_HIGH(GPIOA_SWDIO) | PIN_OSPEED_HIGH(GPIOA_SWCLK) | PIN_OSPEED_VERYLOW(GPIOA_PIN15)) | ||
| 249 | #define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_PIN0) | PIN_PUPDR_FLOATING(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_FLOATING(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)) | ||
| 250 | #define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_PIN0) | 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)) | ||
| 251 | #define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_PIN0, 0) | PIN_AFIO_AF(GPIOA_PIN1, 1) | PIN_AFIO_AF(GPIOA_PIN2, 0) | PIN_AFIO_AF(GPIOA_PIN3, 0) | PIN_AFIO_AF(GPIOA_PIN4, 0) | PIN_AFIO_AF(GPIOA_PIN5, 5) | PIN_AFIO_AF(GPIOA_PIN6, 5) | PIN_AFIO_AF(GPIOA_PIN7, 5)) | ||
| 252 | #define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0) | PIN_AFIO_AF(GPIOA_PIN9, 0) | PIN_AFIO_AF(GPIOA_PIN10, 0) | PIN_AFIO_AF(GPIOA_USB_DM, 14) | PIN_AFIO_AF(GPIOA_USB_DP, 14) | PIN_AFIO_AF(GPIOA_SWDIO, 0) | PIN_AFIO_AF(GPIOA_SWCLK, 0) | PIN_AFIO_AF(GPIOA_PIN15, 0)) | ||
| 253 | |||
| 254 | /* | ||
| 255 | * GPIOB setup: | ||
| 256 | * | ||
| 257 | * PB0 - PIN0 (input pullup). | ||
| 258 | * PB1 - PIN1 (input pullup). | ||
| 259 | * PB2 - PIN2 (input pullup). | ||
| 260 | * PB3 - PIN3 (alternate 0). | ||
| 261 | * PB4 - PIN4 (input pullup). | ||
| 262 | * PB5 - PIN5 (input pullup). | ||
| 263 | * PB6 - PIN6 LSM303DLHC_SCL (alternate 4). | ||
| 264 | * PB7 - PIN7 LSM303DLHC_SDA (alternate 4). | ||
| 265 | * PB8 - PIN8 (input pullup). | ||
| 266 | * PB9 - PIN9 (input pullup). | ||
| 267 | * PB10 - PIN10 (input pullup). | ||
| 268 | * PB11 - PIN11 (input pullup). | ||
| 269 | * PB12 - PIN12 (input pullup). | ||
| 270 | * PB13 - PIN13 (input pullup). | ||
| 271 | * PB14 - PIN14 (input pullup). | ||
| 272 | * PB15 - PIN15 (input pullup). | ||
| 273 | */ | ||
| 274 | #define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | PIN_MODE_INPUT(GPIOB_PIN1) | PIN_MODE_INPUT(GPIOB_PIN2) | PIN_MODE_ALTERNATE(GPIOB_PIN3) | PIN_MODE_INPUT(GPIOB_PIN4) | PIN_MODE_INPUT(GPIOB_PIN5) | PIN_MODE_ALTERNATE(GPIOB_PIN6) | PIN_MODE_OUTPUT(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_INPUT(GPIOB_PIN13) | PIN_MODE_INPUT(GPIOB_PIN14) | PIN_MODE_INPUT(GPIOB_PIN15)) | ||
| 275 | #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_OPENDRAIN(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_PIN13) | PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) | ||
| 276 | #define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | PIN_OSPEED_VERYLOW(GPIOB_PIN1) | PIN_OSPEED_VERYLOW(GPIOB_PIN2) | PIN_OSPEED_HIGH(GPIOB_PIN3) | PIN_OSPEED_VERYLOW(GPIOB_PIN4) | PIN_OSPEED_VERYLOW(GPIOB_PIN5) | PIN_OSPEED_HIGH(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_PIN13) | PIN_OSPEED_VERYLOW(GPIOB_PIN14) | PIN_OSPEED_VERYLOW(GPIOB_PIN15)) | ||
| 277 | #define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | PIN_PUPDR_PULLUP(GPIOB_PIN1) | PIN_PUPDR_PULLUP(GPIOB_PIN2) | PIN_PUPDR_FLOATING(GPIOB_PIN3) | PIN_PUPDR_PULLUP(GPIOB_PIN4) | PIN_PUPDR_PULLUP(GPIOB_PIN5) | PIN_PUPDR_FLOATING(GPIOB_PIN6) | PIN_PUPDR_PULLDOWN(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_PULLUP(GPIOB_PIN13) | PIN_PUPDR_PULLUP(GPIOB_PIN14) | PIN_PUPDR_PULLUP(GPIOB_PIN15)) | ||
| 278 | #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_LOW(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_PIN13) | PIN_ODR_HIGH(GPIOB_PIN14) | PIN_ODR_HIGH(GPIOB_PIN15)) | ||
| 279 | #define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0) | PIN_AFIO_AF(GPIOB_PIN1, 0) | PIN_AFIO_AF(GPIOB_PIN2, 0) | PIN_AFIO_AF(GPIOB_PIN3, 0) | PIN_AFIO_AF(GPIOB_PIN4, 0) | PIN_AFIO_AF(GPIOB_PIN5, 0) | PIN_AFIO_AF(GPIOB_PIN6, 4) | PIN_AFIO_AF(GPIOB_PIN7, 0)) | ||
| 280 | #define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0) | PIN_AFIO_AF(GPIOB_PIN9, 0) | PIN_AFIO_AF(GPIOB_PIN10, 0) | PIN_AFIO_AF(GPIOB_PIN11, 0) | PIN_AFIO_AF(GPIOB_PIN12, 0) | PIN_AFIO_AF(GPIOB_PIN13, 0) | PIN_AFIO_AF(GPIOB_PIN14, 0) | PIN_AFIO_AF(GPIOB_PIN15, 0)) | ||
| 281 | |||
| 282 | /* | ||
| 283 | * GPIOC setup: | ||
| 284 | * | ||
| 285 | * PC0 - PIN0 (input pullup). | ||
| 286 | * PC1 - PIN1 (input pullup). | ||
| 287 | * PC2 - PIN2 (input pullup). | ||
| 288 | * PC3 - PIN3 (input pullup). | ||
| 289 | * PC4 - PIN4 (input pullup). | ||
| 290 | * PC5 - PIN5 (input pullup). | ||
| 291 | * PC6 - PIN6 (input pullup). | ||
| 292 | * PC7 - PIN7 (input pullup). | ||
| 293 | * PC8 - PIN8 (input pullup). | ||
| 294 | * PC9 - PIN9 (input pullup). | ||
| 295 | * PC10 - PIN10 (input pullup). | ||
| 296 | * PC11 - PIN11 (input pullup). | ||
| 297 | * PC12 - PIN12 (input pullup). | ||
| 298 | * PC13 - PIN13 (input pullup). | ||
| 299 | * PC14 - PIN14 (input floating). | ||
| 300 | * PC15 - PIN15 (input floating). | ||
| 301 | */ | ||
| 302 | #define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_PIN0) | 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_INPUT(GPIOC_PIN6) | PIN_MODE_INPUT(GPIOC_PIN7) | PIN_MODE_INPUT(GPIOC_PIN8) | PIN_MODE_INPUT(GPIOC_PIN9) | PIN_MODE_INPUT(GPIOC_PIN10) | PIN_MODE_INPUT(GPIOC_PIN11) | PIN_MODE_INPUT(GPIOC_PIN12) | PIN_MODE_INPUT(GPIOC_PIN13) | PIN_MODE_INPUT(GPIOC_PIN14) | PIN_MODE_INPUT(GPIOC_PIN15)) | ||
| 303 | #define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_PIN0) | 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_PIN6) | PIN_OTYPE_PUSHPULL(GPIOC_PIN7) | PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | PIN_OTYPE_PUSHPULL(GPIOC_PIN14) | PIN_OTYPE_PUSHPULL(GPIOC_PIN15)) | ||
| 304 | #define VAL_GPIOC_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOC_PIN0) | 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_VERYLOW(GPIOC_PIN6) | PIN_OSPEED_VERYLOW(GPIOC_PIN7) | PIN_OSPEED_VERYLOW(GPIOC_PIN8) | PIN_OSPEED_VERYLOW(GPIOC_PIN9) | PIN_OSPEED_VERYLOW(GPIOC_PIN10) | PIN_OSPEED_VERYLOW(GPIOC_PIN11) | PIN_OSPEED_VERYLOW(GPIOC_PIN12) | PIN_OSPEED_VERYLOW(GPIOC_PIN13) | PIN_OSPEED_HIGH(GPIOC_PIN14) | PIN_OSPEED_HIGH(GPIOC_PIN15)) | ||
| 305 | #define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_PIN0) | 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_PULLUP(GPIOC_PIN6) | PIN_PUPDR_PULLUP(GPIOC_PIN7) | PIN_PUPDR_PULLUP(GPIOC_PIN8) | PIN_PUPDR_PULLUP(GPIOC_PIN9) | PIN_PUPDR_PULLUP(GPIOC_PIN10) | PIN_PUPDR_PULLUP(GPIOC_PIN11) | PIN_PUPDR_PULLUP(GPIOC_PIN12) | PIN_PUPDR_PULLUP(GPIOC_PIN13) | PIN_PUPDR_FLOATING(GPIOC_PIN14) | PIN_PUPDR_FLOATING(GPIOC_PIN15)) | ||
| 306 | #define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_PIN0) | 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_HIGH(GPIOC_PIN6) | PIN_ODR_HIGH(GPIOC_PIN7) | PIN_ODR_HIGH(GPIOC_PIN8) | PIN_ODR_HIGH(GPIOC_PIN9) | PIN_ODR_HIGH(GPIOC_PIN10) | PIN_ODR_HIGH(GPIOC_PIN11) | PIN_ODR_HIGH(GPIOC_PIN12) | PIN_ODR_HIGH(GPIOC_PIN13) | PIN_ODR_HIGH(GPIOC_PIN14) | PIN_ODR_HIGH(GPIOC_PIN15)) | ||
| 307 | #define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_PIN0, 0) | PIN_AFIO_AF(GPIOC_PIN1, 0) | PIN_AFIO_AF(GPIOC_PIN2, 0) | PIN_AFIO_AF(GPIOC_PIN3, 0) | PIN_AFIO_AF(GPIOC_PIN4, 0) | PIN_AFIO_AF(GPIOC_PIN5, 0) | PIN_AFIO_AF(GPIOC_PIN6, 0) | PIN_AFIO_AF(GPIOC_PIN7, 0)) | ||
| 308 | #define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0) | PIN_AFIO_AF(GPIOC_PIN9, 0) | PIN_AFIO_AF(GPIOC_PIN10, 0) | PIN_AFIO_AF(GPIOC_PIN11, 0) | PIN_AFIO_AF(GPIOC_PIN12, 0) | PIN_AFIO_AF(GPIOC_PIN13, 0) | PIN_AFIO_AF(GPIOC_PIN14, 0) | PIN_AFIO_AF(GPIOC_PIN15, 0)) | ||
| 309 | |||
| 310 | /* | ||
| 311 | * GPIOD setup: | ||
| 312 | * | ||
| 313 | * PD0 - PIN0 (input pullup). | ||
| 314 | * PD1 - PIN1 (input pullup). | ||
| 315 | * PD2 - PIN2 (input pullup). | ||
| 316 | * PD3 - PIN3 (input pullup). | ||
| 317 | * PD4 - PIN4 (input pullup). | ||
| 318 | * PD5 - PIN5 (input pullup). | ||
| 319 | * PD6 - PIN6 (input pullup). | ||
| 320 | * PD7 - PIN7 (input pullup). | ||
| 321 | * PD8 - PIN8 (input pullup). | ||
| 322 | * PD9 - PIN9 (input pullup). | ||
| 323 | * PD11 - PIN10 (input pullup). | ||
| 324 | * PD11 - PIN11 (input pullup). | ||
| 325 | * PD12 - PIN12 (input pullup). | ||
| 326 | * PD13 - PIN13 (input pullup). | ||
| 327 | * PD14 - PIN14 (input pullup). | ||
| 328 | * PD15 - PIN15 (input pullup). | ||
| 329 | */ | ||
| 330 | #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)) | ||
| 331 | #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)) | ||
| 332 | #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)) | ||
| 333 | #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)) | ||
| 334 | #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)) | ||
| 335 | #define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0) | PIN_AFIO_AF(GPIOD_PIN1, 0) | PIN_AFIO_AF(GPIOD_PIN2, 0) | PIN_AFIO_AF(GPIOD_PIN3, 0) | PIN_AFIO_AF(GPIOD_PIN4, 0) | PIN_AFIO_AF(GPIOD_PIN5, 0) | PIN_AFIO_AF(GPIOD_PIN6, 0) | PIN_AFIO_AF(GPIOD_PIN7, 0)) | ||
| 336 | #define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0) | PIN_AFIO_AF(GPIOD_PIN9, 0) | PIN_AFIO_AF(GPIOD_PIN10, 0) | PIN_AFIO_AF(GPIOD_PIN11, 0) | PIN_AFIO_AF(GPIOD_PIN12, 0) | PIN_AFIO_AF(GPIOD_PIN13, 0) | PIN_AFIO_AF(GPIOD_PIN14, 0) | PIN_AFIO_AF(GPIOD_PIN15, 0)) | ||
| 337 | |||
| 338 | /* | ||
| 339 | * GPIOE setup: | ||
| 340 | * | ||
| 341 | * PE0 - PIN0 (input pullup). | ||
| 342 | * PE1 - PIN1 (input pullup). | ||
| 343 | * PE2 - PIN2 (input pullup). | ||
| 344 | * PE3 - PIN3 L3GD20_CS (output pushpull maximum). | ||
| 345 | * PE4 - PIN4 (input pullup). | ||
| 346 | * PE5 - PIN5 (input pullup). | ||
| 347 | * PE6 - PIN6 (input pullup). | ||
| 348 | * PE7 - PIN7 (input pullup). | ||
| 349 | * PE8 - PIN8 (output pushpull maximum). | ||
| 350 | * PE9 - PIN9 (output pushpull maximum). | ||
| 351 | * PE10 - PIN10 (output pushpull maximum). | ||
| 352 | * PE11 - PIN11 (output pushpull maximum). | ||
| 353 | * PE12 - PIN12 (output pushpull maximum). | ||
| 354 | * PE13 - PIN13 (output pushpull maximum). | ||
| 355 | * PE14 - PIN14 (output pushpull maximum). | ||
| 356 | * PE15 - PIN15 (output pushpull maximum). | ||
| 357 | */ | ||
| 358 | #define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | PIN_MODE_INPUT(GPIOE_PIN1) | PIN_MODE_INPUT(GPIOE_PIN2) | PIN_MODE_OUTPUT(GPIOE_PIN3) | PIN_MODE_INPUT(GPIOE_PIN4) | PIN_MODE_INPUT(GPIOE_PIN5) | PIN_MODE_INPUT(GPIOE_PIN6) | PIN_MODE_INPUT(GPIOE_PIN7) | PIN_MODE_OUTPUT(GPIOE_PIN8) | PIN_MODE_OUTPUT(GPIOE_PIN9) | PIN_MODE_OUTPUT(GPIOE_PIN10) | PIN_MODE_OUTPUT(GPIOE_PIN11) | PIN_MODE_OUTPUT(GPIOE_PIN12) | PIN_MODE_OUTPUT(GPIOE_PIN13) | PIN_MODE_OUTPUT(GPIOE_PIN14) | PIN_MODE_OUTPUT(GPIOE_PIN15)) | ||
| 359 | #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)) | ||
| 360 | #define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | PIN_OSPEED_VERYLOW(GPIOE_PIN1) | PIN_OSPEED_VERYLOW(GPIOE_PIN2) | PIN_OSPEED_HIGH(GPIOE_PIN3) | PIN_OSPEED_VERYLOW(GPIOE_PIN4) | PIN_OSPEED_VERYLOW(GPIOE_PIN5) | PIN_OSPEED_VERYLOW(GPIOE_PIN6) | PIN_OSPEED_VERYLOW(GPIOE_PIN7) | PIN_OSPEED_HIGH(GPIOE_PIN8) | PIN_OSPEED_HIGH(GPIOE_PIN9) | PIN_OSPEED_HIGH(GPIOE_PIN10) | PIN_OSPEED_HIGH(GPIOE_PIN11) | PIN_OSPEED_HIGH(GPIOE_PIN12) | PIN_OSPEED_HIGH(GPIOE_PIN13) | PIN_OSPEED_HIGH(GPIOE_PIN14) | PIN_OSPEED_HIGH(GPIOE_PIN15)) | ||
| 361 | #define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | PIN_PUPDR_PULLUP(GPIOE_PIN1) | PIN_PUPDR_PULLUP(GPIOE_PIN2) | PIN_PUPDR_FLOATING(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_FLOATING(GPIOE_PIN11) | PIN_PUPDR_PULLUP(GPIOE_PIN12) | PIN_PUPDR_FLOATING(GPIOE_PIN13) | PIN_PUPDR_FLOATING(GPIOE_PIN14) | PIN_PUPDR_FLOATING(GPIOE_PIN15)) | ||
| 362 | #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_LOW(GPIOE_PIN8) | PIN_ODR_LOW(GPIOE_PIN9) | PIN_ODR_LOW(GPIOE_PIN10) | PIN_ODR_LOW(GPIOE_PIN11) | PIN_ODR_LOW(GPIOE_PIN12) | PIN_ODR_LOW(GPIOE_PIN13) | PIN_ODR_LOW(GPIOE_PIN14) | PIN_ODR_LOW(GPIOE_PIN15)) | ||
| 363 | #define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0) | PIN_AFIO_AF(GPIOE_PIN1, 0) | PIN_AFIO_AF(GPIOE_PIN2, 0) | PIN_AFIO_AF(GPIOE_PIN3, 0) | PIN_AFIO_AF(GPIOE_PIN4, 0) | PIN_AFIO_AF(GPIOE_PIN5, 0) | PIN_AFIO_AF(GPIOE_PIN6, 0) | PIN_AFIO_AF(GPIOE_PIN7, 0)) | ||
| 364 | #define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0) | PIN_AFIO_AF(GPIOE_PIN9, 0) | PIN_AFIO_AF(GPIOE_PIN10, 0) | PIN_AFIO_AF(GPIOE_PIN11, 0) | PIN_AFIO_AF(GPIOE_PIN12, 0) | PIN_AFIO_AF(GPIOE_PIN13, 0) | PIN_AFIO_AF(GPIOE_PIN14, 0) | PIN_AFIO_AF(GPIOE_PIN15, 0)) | ||
| 365 | |||
| 366 | /* | ||
| 367 | * GPIOF setup: | ||
| 368 | * | ||
| 369 | * PF0 - I2C2_SDA (input floating). | ||
| 370 | * PF1 - I2C2_SCL (input floating). | ||
| 371 | * PF2 - PIN2 (input pullup). | ||
| 372 | * PF3 - PIN3 (input pullup). | ||
| 373 | * PF4 - PIN4 (input pullup). | ||
| 374 | * PF5 - PIN5 (input pullup). | ||
| 375 | * PF6 - PIN6 (input pullup). | ||
| 376 | * PF7 - PIN7 (input pullup). | ||
| 377 | * PF8 - PIN8 (input pullup). | ||
| 378 | * PF9 - PIN9 (input pullup). | ||
| 379 | * PF10 - PIN10 (input pullup). | ||
| 380 | * PF11 - PIN11 (input pullup). | ||
| 381 | * PF12 - PIN12 (input pullup). | ||
| 382 | * PF13 - PIN13 (input pullup). | ||
| 383 | * PF14 - PIN14 (input pullup). | ||
| 384 | * PF15 - PIN15 (input pullup). | ||
| 385 | */ | ||
| 386 | #define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_I2C2_SDA) | PIN_MODE_INPUT(GPIOF_I2C2_SCL) | 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)) | ||
| 387 | #define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SDA) | PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SCL) | 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)) | ||
| 388 | #define VAL_GPIOF_OSPEEDR (PIN_OSPEED_HIGH(GPIOF_I2C2_SDA) | PIN_OSPEED_HIGH(GPIOF_I2C2_SCL) | 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)) | ||
| 389 | #define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_I2C2_SDA) | PIN_PUPDR_FLOATING(GPIOF_I2C2_SCL) | 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)) | ||
| 390 | #define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_I2C2_SDA) | PIN_ODR_HIGH(GPIOF_I2C2_SCL) | 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)) | ||
| 391 | #define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_I2C2_SDA, 0) | PIN_AFIO_AF(GPIOF_I2C2_SCL, 0) | PIN_AFIO_AF(GPIOF_PIN2, 0) | PIN_AFIO_AF(GPIOF_PIN3, 0) | PIN_AFIO_AF(GPIOF_PIN4, 0) | PIN_AFIO_AF(GPIOF_PIN5, 0) | PIN_AFIO_AF(GPIOF_PIN6, 0) | PIN_AFIO_AF(GPIOF_PIN7, 0)) | ||
| 392 | #define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0) | PIN_AFIO_AF(GPIOF_PIN9, 0) | PIN_AFIO_AF(GPIOF_PIN10, 0) | PIN_AFIO_AF(GPIOF_PIN11, 0) | PIN_AFIO_AF(GPIOF_PIN12, 0) | PIN_AFIO_AF(GPIOF_PIN13, 0) | PIN_AFIO_AF(GPIOF_PIN14, 0) | PIN_AFIO_AF(GPIOF_PIN15, 0)) | ||
| 393 | |||
| 394 | /* | ||
| 395 | * GPIOG setup: | ||
| 396 | * | ||
| 397 | * PG0 - PIN0 (input pullup). | ||
| 398 | * PG1 - PIN1 (input pullup). | ||
| 399 | * PG2 - PIN2 (input pullup). | ||
| 400 | * PG3 - PIN3 (input pullup). | ||
| 401 | * PG4 - PIN4 (input pullup). | ||
| 402 | * PG5 - PIN5 (input pullup). | ||
| 403 | * PG6 - PIN6 (input pullup). | ||
| 404 | * PG7 - PIN7 (input pullup). | ||
| 405 | * PG8 - PIN8 (input pullup). | ||
| 406 | * PG9 - PIN9 (input pullup). | ||
| 407 | * PG10 - PIN10 (input pullup). | ||
| 408 | * PG11 - PIN11 (input pullup). | ||
| 409 | * PG12 - PIN12 (input pullup). | ||
| 410 | * PG13 - PIN13 (input pullup). | ||
| 411 | * PG14 - PIN14 (input pullup). | ||
| 412 | * PG15 - PIN15 (input pullup). | ||
| 413 | */ | ||
| 414 | #define VAL_GPIOG_MODER (PIN_MODE_INPUT(GPIOG_PIN0) | PIN_MODE_INPUT(GPIOG_PIN1) | PIN_MODE_INPUT(GPIOG_PIN2) | PIN_MODE_INPUT(GPIOG_PIN3) | PIN_MODE_INPUT(GPIOG_PIN4) | PIN_MODE_INPUT(GPIOG_PIN5) | PIN_MODE_INPUT(GPIOG_PIN6) | PIN_MODE_INPUT(GPIOG_PIN7) | PIN_MODE_INPUT(GPIOG_PIN8) | PIN_MODE_INPUT(GPIOG_PIN9) | PIN_MODE_INPUT(GPIOG_PIN10) | PIN_MODE_INPUT(GPIOG_PIN11) | PIN_MODE_INPUT(GPIOG_PIN12) | PIN_MODE_INPUT(GPIOG_PIN13) | PIN_MODE_INPUT(GPIOG_PIN14) | PIN_MODE_INPUT(GPIOG_PIN15)) | ||
| 415 | #define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_PIN0) | PIN_OTYPE_PUSHPULL(GPIOG_PIN1) | PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | PIN_OTYPE_PUSHPULL(GPIOG_PIN6) | PIN_OTYPE_PUSHPULL(GPIOG_PIN7) | PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | PIN_OTYPE_PUSHPULL(GPIOG_PIN15)) | ||
| 416 | #define VAL_GPIOG_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOG_PIN0) | PIN_OSPEED_VERYLOW(GPIOG_PIN1) | PIN_OSPEED_VERYLOW(GPIOG_PIN2) | PIN_OSPEED_VERYLOW(GPIOG_PIN3) | PIN_OSPEED_VERYLOW(GPIOG_PIN4) | PIN_OSPEED_VERYLOW(GPIOG_PIN5) | PIN_OSPEED_VERYLOW(GPIOG_PIN6) | PIN_OSPEED_VERYLOW(GPIOG_PIN7) | PIN_OSPEED_VERYLOW(GPIOG_PIN8) | PIN_OSPEED_VERYLOW(GPIOG_PIN9) | PIN_OSPEED_VERYLOW(GPIOG_PIN10) | PIN_OSPEED_VERYLOW(GPIOG_PIN11) | PIN_OSPEED_VERYLOW(GPIOG_PIN12) | PIN_OSPEED_VERYLOW(GPIOG_PIN13) | PIN_OSPEED_VERYLOW(GPIOG_PIN14) | PIN_OSPEED_VERYLOW(GPIOG_PIN15)) | ||
| 417 | #define VAL_GPIOG_PUPDR (PIN_PUPDR_PULLUP(GPIOG_PIN0) | PIN_PUPDR_PULLUP(GPIOG_PIN1) | PIN_PUPDR_PULLUP(GPIOG_PIN2) | PIN_PUPDR_PULLUP(GPIOG_PIN3) | PIN_PUPDR_PULLUP(GPIOG_PIN4) | PIN_PUPDR_PULLUP(GPIOG_PIN5) | PIN_PUPDR_PULLUP(GPIOG_PIN6) | PIN_PUPDR_PULLUP(GPIOG_PIN7) | PIN_PUPDR_PULLUP(GPIOG_PIN8) | PIN_PUPDR_PULLUP(GPIOG_PIN9) | PIN_PUPDR_PULLUP(GPIOG_PIN10) | PIN_PUPDR_PULLUP(GPIOG_PIN11) | PIN_PUPDR_PULLUP(GPIOG_PIN12) | PIN_PUPDR_PULLUP(GPIOG_PIN13) | PIN_PUPDR_PULLUP(GPIOG_PIN14) | PIN_PUPDR_PULLUP(GPIOG_PIN15)) | ||
| 418 | #define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_PIN0) | PIN_ODR_HIGH(GPIOG_PIN1) | PIN_ODR_HIGH(GPIOG_PIN2) | PIN_ODR_HIGH(GPIOG_PIN3) | PIN_ODR_HIGH(GPIOG_PIN4) | PIN_ODR_HIGH(GPIOG_PIN5) | PIN_ODR_HIGH(GPIOG_PIN6) | PIN_ODR_HIGH(GPIOG_PIN7) | PIN_ODR_HIGH(GPIOG_PIN8) | PIN_ODR_HIGH(GPIOG_PIN9) | PIN_ODR_HIGH(GPIOG_PIN10) | PIN_ODR_HIGH(GPIOG_PIN11) | PIN_ODR_HIGH(GPIOG_PIN12) | PIN_ODR_HIGH(GPIOG_PIN13) | PIN_ODR_HIGH(GPIOG_PIN14) | PIN_ODR_HIGH(GPIOG_PIN15)) | ||
| 419 | #define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_PIN0, 0) | PIN_AFIO_AF(GPIOG_PIN1, 0) | PIN_AFIO_AF(GPIOG_PIN2, 0) | PIN_AFIO_AF(GPIOG_PIN3, 0) | PIN_AFIO_AF(GPIOG_PIN4, 0) | PIN_AFIO_AF(GPIOG_PIN5, 0) | PIN_AFIO_AF(GPIOG_PIN6, 0) | PIN_AFIO_AF(GPIOG_PIN7, 0)) | ||
| 420 | #define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0) | PIN_AFIO_AF(GPIOG_PIN9, 0) | PIN_AFIO_AF(GPIOG_PIN10, 0) | PIN_AFIO_AF(GPIOG_PIN11, 0) | PIN_AFIO_AF(GPIOG_PIN12, 0) | PIN_AFIO_AF(GPIOG_PIN13, 0) | PIN_AFIO_AF(GPIOG_PIN14, 0) | PIN_AFIO_AF(GPIOG_PIN15, 0)) | ||
| 421 | |||
| 422 | /* | ||
| 423 | * GPIOH setup: | ||
| 424 | * | ||
| 425 | * PH0 - PIN0 (input pullup). | ||
| 426 | * PH1 - PIN1 (input pullup). | ||
| 427 | * PH2 - PIN2 (input pullup). | ||
| 428 | * PH3 - PIN3 (input pullup). | ||
| 429 | * PH4 - PIN4 (input pullup). | ||
| 430 | * PH5 - PIN5 (input pullup). | ||
| 431 | * PH6 - PIN6 (input pullup). | ||
| 432 | * PH7 - PIN7 (input pullup). | ||
| 433 | * PH8 - PIN8 (input pullup). | ||
| 434 | * PH9 - PIN9 (input pullup). | ||
| 435 | * PH10 - PIN10 (input pullup). | ||
| 436 | * PH11 - PIN11 (input pullup). | ||
| 437 | * PH12 - PIN12 (input pullup). | ||
| 438 | * PH13 - PIN13 (input pullup). | ||
| 439 | * PH14 - PIN14 (input pullup). | ||
| 440 | * PH15 - PIN15 (input pullup). | ||
| 441 | */ | ||
| 442 | #define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_PIN0) | PIN_MODE_INPUT(GPIOH_PIN1) | PIN_MODE_INPUT(GPIOH_PIN2) | PIN_MODE_INPUT(GPIOH_PIN3) | PIN_MODE_INPUT(GPIOH_PIN4) | PIN_MODE_INPUT(GPIOH_PIN5) | PIN_MODE_INPUT(GPIOH_PIN6) | PIN_MODE_INPUT(GPIOH_PIN7) | PIN_MODE_INPUT(GPIOH_PIN8) | PIN_MODE_INPUT(GPIOH_PIN9) | PIN_MODE_INPUT(GPIOH_PIN10) | PIN_MODE_INPUT(GPIOH_PIN11) | PIN_MODE_INPUT(GPIOH_PIN12) | PIN_MODE_INPUT(GPIOH_PIN13) | PIN_MODE_INPUT(GPIOH_PIN14) | PIN_MODE_INPUT(GPIOH_PIN15)) | ||
| 443 | #define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_PIN0) | PIN_OTYPE_PUSHPULL(GPIOH_PIN1) | PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | PIN_OTYPE_PUSHPULL(GPIOH_PIN15)) | ||
| 444 | #define VAL_GPIOH_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOH_PIN0) | PIN_OSPEED_VERYLOW(GPIOH_PIN1) | PIN_OSPEED_VERYLOW(GPIOH_PIN2) | PIN_OSPEED_VERYLOW(GPIOH_PIN3) | PIN_OSPEED_VERYLOW(GPIOH_PIN4) | PIN_OSPEED_VERYLOW(GPIOH_PIN5) | PIN_OSPEED_VERYLOW(GPIOH_PIN6) | PIN_OSPEED_VERYLOW(GPIOH_PIN7) | PIN_OSPEED_VERYLOW(GPIOH_PIN8) | PIN_OSPEED_VERYLOW(GPIOH_PIN9) | PIN_OSPEED_VERYLOW(GPIOH_PIN10) | PIN_OSPEED_VERYLOW(GPIOH_PIN11) | PIN_OSPEED_VERYLOW(GPIOH_PIN12) | PIN_OSPEED_VERYLOW(GPIOH_PIN13) | PIN_OSPEED_VERYLOW(GPIOH_PIN14) | PIN_OSPEED_VERYLOW(GPIOH_PIN15)) | ||
| 445 | #define VAL_GPIOH_PUPDR (PIN_PUPDR_PULLUP(GPIOH_PIN0) | PIN_PUPDR_PULLUP(GPIOH_PIN1) | PIN_PUPDR_PULLUP(GPIOH_PIN2) | PIN_PUPDR_PULLUP(GPIOH_PIN3) | PIN_PUPDR_PULLUP(GPIOH_PIN4) | PIN_PUPDR_PULLUP(GPIOH_PIN5) | PIN_PUPDR_PULLUP(GPIOH_PIN6) | PIN_PUPDR_PULLUP(GPIOH_PIN7) | PIN_PUPDR_PULLUP(GPIOH_PIN8) | PIN_PUPDR_PULLUP(GPIOH_PIN9) | PIN_PUPDR_PULLUP(GPIOH_PIN10) | PIN_PUPDR_PULLUP(GPIOH_PIN11) | PIN_PUPDR_PULLUP(GPIOH_PIN12) | PIN_PUPDR_PULLUP(GPIOH_PIN13) | PIN_PUPDR_PULLUP(GPIOH_PIN14) | PIN_PUPDR_PULLUP(GPIOH_PIN15)) | ||
| 446 | #define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_PIN0) | PIN_ODR_HIGH(GPIOH_PIN1) | PIN_ODR_HIGH(GPIOH_PIN2) | PIN_ODR_HIGH(GPIOH_PIN3) | PIN_ODR_HIGH(GPIOH_PIN4) | PIN_ODR_HIGH(GPIOH_PIN5) | PIN_ODR_HIGH(GPIOH_PIN6) | PIN_ODR_HIGH(GPIOH_PIN7) | PIN_ODR_HIGH(GPIOH_PIN8) | PIN_ODR_HIGH(GPIOH_PIN9) | PIN_ODR_HIGH(GPIOH_PIN10) | PIN_ODR_HIGH(GPIOH_PIN11) | PIN_ODR_HIGH(GPIOH_PIN12) | PIN_ODR_HIGH(GPIOH_PIN13) | PIN_ODR_HIGH(GPIOH_PIN14) | PIN_ODR_HIGH(GPIOH_PIN15)) | ||
| 447 | #define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_PIN0, 0) | PIN_AFIO_AF(GPIOH_PIN1, 0) | PIN_AFIO_AF(GPIOH_PIN2, 0) | PIN_AFIO_AF(GPIOH_PIN3, 0) | PIN_AFIO_AF(GPIOH_PIN4, 0) | PIN_AFIO_AF(GPIOH_PIN5, 0) | PIN_AFIO_AF(GPIOH_PIN6, 0) | PIN_AFIO_AF(GPIOH_PIN7, 0)) | ||
| 448 | #define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0) | PIN_AFIO_AF(GPIOH_PIN9, 0) | PIN_AFIO_AF(GPIOH_PIN10, 0) | PIN_AFIO_AF(GPIOH_PIN11, 0) | PIN_AFIO_AF(GPIOH_PIN12, 0) | PIN_AFIO_AF(GPIOH_PIN13, 0) | PIN_AFIO_AF(GPIOH_PIN14, 0) | PIN_AFIO_AF(GPIOH_PIN15, 0)) | ||
| 449 | |||
| 450 | /* | ||
| 451 | * USB bus activation macro, required by the USB driver. | ||
| 452 | */ | ||
| 453 | // #define usb_lld_connect_bus(usbp) | ||
| 454 | #define usb_lld_connect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_ALTERNATE(14))) | ||
| 455 | // #define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT) | ||
| 456 | /* | ||
| 457 | * USB bus de-activation macro, required by the USB driver. | ||
| 458 | */ | ||
| 459 | // #define usb_lld_disconnect_bus(usbp) | ||
| 460 | #define usb_lld_disconnect_bus(usbp) \ | ||
| 461 | (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_OUTPUT_PUSHPULL)); \ | ||
| 462 | palClearPad(GPIOA, GPIOA_USB_DP) | ||
| 463 | // #define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12) | ||
| 464 | |||
| 465 | #if !defined(_FROM_ASM_) | ||
| 466 | # ifdef __cplusplus | ||
| 467 | extern "C" { | ||
| 468 | # endif | ||
| 469 | void boardInit(void); | ||
| 470 | # ifdef __cplusplus | ||
| 471 | } | ||
| 472 | # endif | ||
| 473 | #endif /* _FROM_ASM_ */ | ||
| 474 | |||
| 475 | #endif /* _BOARD_H_ */ | ||
diff --git a/drivers/boards/GENERIC_STM32_F303XC/board.mk b/drivers/boards/GENERIC_STM32_F303XC/board.mk deleted file mode 100644 index 43377629a..000000000 --- a/drivers/boards/GENERIC_STM32_F303XC/board.mk +++ /dev/null | |||
| @@ -1,5 +0,0 @@ | |||
| 1 | # List of all the board related files. | ||
| 2 | BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC/board.c | ||
| 3 | |||
| 4 | # Required include directories | ||
| 5 | BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC | ||
diff --git a/drivers/boards/GENERIC_STM32_F303XC/bootloader_defs.h b/drivers/boards/GENERIC_STM32_F303XC/bootloader_defs.h deleted file mode 100644 index 3b0e9d20a..000000000 --- a/drivers/boards/GENERIC_STM32_F303XC/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: | ||
| 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 0x1FFFD800 | ||
diff --git a/drivers/boards/IC_TEENSY_3_1/board.c b/drivers/boards/IC_TEENSY_3_1/board.c deleted file mode 100644 index 63e3f6492..000000000 --- a/drivers/boards/IC_TEENSY_3_1/board.c +++ /dev/null | |||
| @@ -1,146 +0,0 @@ | |||
| 1 | /* | ||
| 2 | ChibiOS - Copyright (C) 2015 RedoX https://github.com/RedoXyde | ||
| 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 | #include "hal.h" | ||
| 17 | |||
| 18 | #if HAL_USE_PAL || defined(__DOXYGEN__) | ||
| 19 | /** | ||
| 20 | * @brief PAL setup. | ||
| 21 | * @details Digital I/O ports static configuration as defined in @p board.h. | ||
| 22 | * This variable is used by the HAL when initializing the PAL driver. | ||
| 23 | */ | ||
| 24 | const PALConfig pal_default_config = { | ||
| 25 | .ports = | ||
| 26 | { | ||
| 27 | { | ||
| 28 | /* | ||
| 29 | * PORTA setup. | ||
| 30 | * | ||
| 31 | * PTA4 - PIN33 | ||
| 32 | * PTA5 - PIN24 | ||
| 33 | * PTA12 - PIN3 | ||
| 34 | * PTA13 - PIN4 | ||
| 35 | * | ||
| 36 | * PTA18/19 crystal | ||
| 37 | * PTA0/3 SWD | ||
| 38 | */ | ||
| 39 | .port = IOPORT1, | ||
| 40 | .pads = | ||
| 41 | { | ||
| 42 | PAL_MODE_ALTERNATIVE_7, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_ALTERNATIVE_7, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_INPUT_ANALOG, PAL_MODE_INPUT_ANALOG, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 43 | }, | ||
| 44 | }, | ||
| 45 | { | ||
| 46 | /* | ||
| 47 | * PORTB setup. | ||
| 48 | * | ||
| 49 | * PTB0 - PIN16 | ||
| 50 | * PTB1 - PIN17 | ||
| 51 | * PTB2 - PIN19 | ||
| 52 | * PTB3 - PIN18 | ||
| 53 | * PTB16 - PIN0 - UART0_TX | ||
| 54 | * PTB17 - PIN1 - UART0_RX | ||
| 55 | * PTB18 - PIN32 | ||
| 56 | * PTB19 - PIN25 | ||
| 57 | */ | ||
| 58 | .port = IOPORT2, | ||
| 59 | .pads = | ||
| 60 | { | ||
| 61 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_ALTERNATIVE_3, PAL_MODE_ALTERNATIVE_3, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 62 | }, | ||
| 63 | }, | ||
| 64 | { | ||
| 65 | /* | ||
| 66 | * PORTC setup. | ||
| 67 | * | ||
| 68 | * PTC0 - PIN15 | ||
| 69 | * PTC1 - PIN22 | ||
| 70 | * PTC2 - PIN23 | ||
| 71 | * PTC3 - PIN9 | ||
| 72 | * PTC4 - PIN10 | ||
| 73 | * PTC5 - PIN13 | ||
| 74 | * PTC6 - PIN11 | ||
| 75 | * PTC7 - PIN12 | ||
| 76 | * PTC8 - PIN28 | ||
| 77 | * PTC9 - PIN27 | ||
| 78 | * PTC10 - PIN29 | ||
| 79 | * PTC11 - PIN30 | ||
| 80 | */ | ||
| 81 | .port = IOPORT3, | ||
| 82 | .pads = | ||
| 83 | { | ||
| 84 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 85 | }, | ||
| 86 | }, | ||
| 87 | { | ||
| 88 | /* | ||
| 89 | * PORTD setup. | ||
| 90 | * | ||
| 91 | * PTD0 - PIN2 | ||
| 92 | * PTD1 - PIN14 | ||
| 93 | * PTD2 - PIN7 | ||
| 94 | * PTD3 - PIN8 | ||
| 95 | * PTD4 - PIN6 | ||
| 96 | * PTD5 - PIN20 | ||
| 97 | * PTD6 - PIN21 | ||
| 98 | * PTD7 - PIN5 | ||
| 99 | */ | ||
| 100 | .port = IOPORT4, | ||
| 101 | .pads = | ||
| 102 | { | ||
| 103 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 104 | }, | ||
| 105 | }, | ||
| 106 | { | ||
| 107 | /* | ||
| 108 | * PORTE setup. | ||
| 109 | * | ||
| 110 | * PTE0 - PIN31 | ||
| 111 | * PTE1 - PIN26 | ||
| 112 | */ | ||
| 113 | .port = IOPORT5, | ||
| 114 | .pads = | ||
| 115 | { | ||
| 116 | PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, | ||
| 117 | }, | ||
| 118 | }, | ||
| 119 | }, | ||
| 120 | }; | ||
| 121 | #endif | ||
| 122 | |||
| 123 | // NOTE: This value comes from kiibohd/controller and is the location of a value | ||
| 124 | // which needs to be checked before disabling the watchdog (which happens in | ||
| 125 | // k20x_clock_init) | ||
| 126 | #define WDOG_TMROUTL *(volatile uint16_t *)0x40052012 | ||
| 127 | |||
| 128 | /** | ||
| 129 | * @brief Early initialization code. | ||
| 130 | * @details This initialization must be performed just after stack setup | ||
| 131 | * and before any other initialization. | ||
| 132 | */ | ||
| 133 | void __early_init(void) { | ||
| 134 | // This is a dirty hack and should only be used as a temporary fix until this | ||
| 135 | // is upstreamed. | ||
| 136 | while (WDOG_TMROUTL < 2) | ||
| 137 | ; // Must wait for WDOG timer if already running, before jumping | ||
| 138 | |||
| 139 | k20x_clock_init(); | ||
| 140 | } | ||
| 141 | |||
| 142 | /** | ||
| 143 | * @brief Board-specific initialization code. | ||
| 144 | * @todo Add your board-specific code, if any. | ||
| 145 | */ | ||
| 146 | void boardInit(void) {} | ||
diff --git a/drivers/boards/IC_TEENSY_3_1/board.h b/drivers/boards/IC_TEENSY_3_1/board.h deleted file mode 100644 index c8259ab0c..000000000 --- a/drivers/boards/IC_TEENSY_3_1/board.h +++ /dev/null | |||
| @@ -1,295 +0,0 @@ | |||
| 1 | /* | ||
| 2 | ChibiOS - Copyright (C) 2015 RedoX https://github.com/RedoXyde | ||
| 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 | #ifndef _BOARD_H_ | ||
| 18 | #define _BOARD_H_ | ||
| 19 | |||
| 20 | /* | ||
| 21 | * Setup for the PJRC Teensy 3.1 board. | ||
| 22 | */ | ||
| 23 | |||
| 24 | /* | ||
| 25 | * Board identifier. | ||
| 26 | */ | ||
| 27 | #define BOARD_PJRC_TEENSY_3_1 | ||
| 28 | #define BOARD_NAME "PJRC Teensy 3.1" | ||
| 29 | |||
| 30 | /* External 16 MHz crystal */ | ||
| 31 | #define KINETIS_XTAL_FREQUENCY 16000000UL | ||
| 32 | |||
| 33 | /* Use internal capacitors for the crystal */ | ||
| 34 | #define KINETIS_BOARD_OSCILLATOR_SETTING OSC_CR_SC8P | OSC_CR_SC2P | ||
| 35 | |||
| 36 | /* | ||
| 37 | * MCU type | ||
| 38 | */ | ||
| 39 | #define K20x7 | ||
| 40 | |||
| 41 | /* | ||
| 42 | * IO pins assignments. | ||
| 43 | */ | ||
| 44 | #define PORTA_PIN0 0 | ||
| 45 | #define PORTA_PIN1 1 | ||
| 46 | #define PORTA_PIN2 2 | ||
| 47 | #define PORTA_PIN3 3 | ||
| 48 | #define TEENSY_PIN33 4 | ||
| 49 | #define TEENSY_PIN24 5 | ||
| 50 | #define PORTA_PIN6 6 | ||
| 51 | #define PORTA_PIN7 7 | ||
| 52 | #define PORTA_PIN8 8 | ||
| 53 | #define PORTA_PIN9 9 | ||
| 54 | #define PORTA_PIN10 10 | ||
| 55 | #define PORTA_PIN11 11 | ||
| 56 | #define TEENSY_PIN3 12 | ||
| 57 | #define TEENSY_PIN4 13 | ||
| 58 | #define PORTA_PIN14 14 | ||
| 59 | #define PORTA_PIN15 15 | ||
| 60 | #define PORTA_PIN16 16 | ||
| 61 | #define PORTA_PIN17 17 | ||
| 62 | #define PORTA_PIN18 18 | ||
| 63 | #define PORTA_PIN19 19 | ||
| 64 | #define PORTA_PIN20 20 | ||
| 65 | #define PORTA_PIN21 21 | ||
| 66 | #define PORTA_PIN22 22 | ||
| 67 | #define PORTA_PIN23 23 | ||
| 68 | #define PORTA_PIN24 24 | ||
| 69 | #define PORTA_PIN25 25 | ||
| 70 | #define PORTA_PIN26 26 | ||
| 71 | #define PORTA_PIN27 27 | ||
| 72 | #define PORTA_PIN28 28 | ||
| 73 | #define PORTA_PIN29 29 | ||
| 74 | #define PORTA_PIN30 30 | ||
| 75 | #define PORTA_PIN31 31 | ||
| 76 | |||
| 77 | #define TEENSY_PIN3_IOPORT IOPORT1 | ||
| 78 | #define TEENSY_PIN4_IOPORT IOPORT1 | ||
| 79 | #define TEENSY_PIN24_IOPORT IOPORT1 | ||
| 80 | #define TEENSY_PIN33_IOPORT IOPORT1 | ||
| 81 | |||
| 82 | #define TEENSY_PIN16 0 | ||
| 83 | #define TEENSY_PIN17 1 | ||
| 84 | #define TEENSY_PIN19 2 | ||
| 85 | #define TEENSY_PIN18 3 | ||
| 86 | #define PORTB_PIN4 4 | ||
| 87 | #define PORTB_PIN5 5 | ||
| 88 | #define PORTB_PIN6 6 | ||
| 89 | #define PORTB_PIN7 7 | ||
| 90 | #define PORTB_PIN8 8 | ||
| 91 | #define PORTB_PIN9 9 | ||
| 92 | #define PORTB_PIN10 10 | ||
| 93 | #define PORTB_PIN11 11 | ||
| 94 | #define PORTB_PIN12 12 | ||
| 95 | #define PORTB_PIN13 13 | ||
| 96 | #define PORTB_PIN14 14 | ||
| 97 | #define PORTB_PIN15 15 | ||
| 98 | #define TEENSY_PIN0 16 | ||
| 99 | #define TEENSY_PIN1 17 | ||
| 100 | #define TEENSY_PIN32 18 | ||
| 101 | #define TEENSY_PIN25 19 | ||
| 102 | #define PORTB_PIN20 20 | ||
| 103 | #define PORTB_PIN21 21 | ||
| 104 | #define PORTB_PIN22 22 | ||
| 105 | #define PORTB_PIN23 23 | ||
| 106 | #define PORTB_PIN24 24 | ||
| 107 | #define PORTB_PIN25 25 | ||
| 108 | #define PORTB_PIN26 26 | ||
| 109 | #define PORTB_PIN27 27 | ||
| 110 | #define PORTB_PIN28 28 | ||
| 111 | #define PORTB_PIN29 29 | ||
| 112 | #define PORTB_PIN30 30 | ||
| 113 | #define PORTB_PIN31 31 | ||
| 114 | |||
| 115 | #define TEENSY_PIN0_IOPORT IOPORT2 | ||
| 116 | #define TEENSY_PIN1_IOPORT IOPORT2 | ||
| 117 | #define TEENSY_PIN16_IOPORT IOPORT2 | ||
| 118 | #define TEENSY_PIN17_IOPORT IOPORT2 | ||
| 119 | #define TEENSY_PIN18_IOPORT IOPORT2 | ||
| 120 | #define TEENSY_PIN19_IOPORT IOPORT2 | ||
| 121 | #define TEENSY_PIN25_IOPORT IOPORT2 | ||
| 122 | #define TEENSY_PIN32_IOPORT IOPORT2 | ||
| 123 | |||
| 124 | #define TEENSY_PIN15 0 | ||
| 125 | #define TEENSY_PIN22 1 | ||
| 126 | #define TEENSY_PIN23 2 | ||
| 127 | #define TEENSY_PIN9 3 | ||
| 128 | #define TEENSY_PIN10 4 | ||
| 129 | #define TEENSY_PIN13 5 | ||
| 130 | #define TEENSY_PIN11 6 | ||
| 131 | #define TEENSY_PIN12 7 | ||
| 132 | #define TEENSY_PIN28 8 | ||
| 133 | #define TEENSY_PIN27 9 | ||
| 134 | #define TEENSY_PIN29 10 | ||
| 135 | #define TEENSY_PIN30 11 | ||
| 136 | #define PORTC_PIN12 12 | ||
| 137 | #define PORTC_PIN13 13 | ||
| 138 | #define PORTC_PIN14 14 | ||
| 139 | #define PORTC_PIN15 15 | ||
| 140 | #define PORTC_PIN16 16 | ||
| 141 | #define PORTC_PIN17 17 | ||
| 142 | #define PORTC_PIN18 18 | ||
| 143 | #define PORTC_PIN19 19 | ||
| 144 | #define PORTC_PIN20 20 | ||
| 145 | #define PORTC_PIN21 21 | ||
| 146 | #define PORTC_PIN22 22 | ||
| 147 | #define PORTC_PIN23 23 | ||
| 148 | #define PORTC_PIN24 24 | ||
| 149 | #define PORTC_PIN25 25 | ||
| 150 | #define PORTC_PIN26 26 | ||
| 151 | #define PORTC_PIN27 27 | ||
| 152 | #define PORTC_PIN28 28 | ||
| 153 | #define PORTC_PIN29 29 | ||
| 154 | #define PORTC_PIN30 30 | ||
| 155 | #define PORTC_PIN31 31 | ||
| 156 | |||
| 157 | #define TEENSY_PIN9_IOPORT IOPORT3 | ||
| 158 | #define TEENSY_PIN10_IOPORT IOPORT3 | ||
| 159 | #define TEENSY_PIN11_IOPORT IOPORT3 | ||
| 160 | #define TEENSY_PIN12_IOPORT IOPORT3 | ||
| 161 | #define TEENSY_PIN13_IOPORT IOPORT3 | ||
| 162 | #define TEENSY_PIN15_IOPORT IOPORT3 | ||
| 163 | #define TEENSY_PIN22_IOPORT IOPORT3 | ||
| 164 | #define TEENSY_PIN23_IOPORT IOPORT3 | ||
| 165 | #define TEENSY_PIN27_IOPORT IOPORT3 | ||
| 166 | #define TEENSY_PIN28_IOPORT IOPORT3 | ||
| 167 | #define TEENSY_PIN29_IOPORT IOPORT3 | ||
| 168 | #define TEENSY_PIN30_IOPORT IOPORT3 | ||
| 169 | |||
| 170 | #define TEENSY_PIN2 0 | ||
| 171 | #define TEENSY_PIN14 1 | ||
| 172 | #define TEENSY_PIN7 2 | ||
| 173 | #define TEENSY_PIN8 3 | ||
| 174 | #define TEENSY_PIN6 4 | ||
| 175 | #define TEENSY_PIN20 5 | ||
| 176 | #define TEENSY_PIN21 6 | ||
| 177 | #define TEENSY_PIN5 7 | ||
| 178 | #define PORTD_PIN8 8 | ||
| 179 | #define PORTD_PIN9 9 | ||
| 180 | #define PORTD_PIN10 10 | ||
| 181 | #define PORTD_PIN11 11 | ||
| 182 | #define PORTD_PIN12 12 | ||
| 183 | #define PORTD_PIN13 13 | ||
| 184 | #define PORTD_PIN14 14 | ||
| 185 | #define PORTD_PIN15 15 | ||
| 186 | #define PORTD_PIN16 16 | ||
| 187 | #define PORTD_PIN17 17 | ||
| 188 | #define PORTD_PIN18 18 | ||
| 189 | #define PORTD_PIN19 19 | ||
| 190 | #define PORTD_PIN20 20 | ||
| 191 | #define PORTD_PIN21 21 | ||
| 192 | #define PORTD_PIN22 22 | ||
| 193 | #define PORTD_PIN23 23 | ||
| 194 | #define PORTD_PIN24 24 | ||
| 195 | #define PORTD_PIN25 25 | ||
| 196 | #define PORTD_PIN26 26 | ||
| 197 | #define PORTD_PIN27 27 | ||
| 198 | #define PORTD_PIN28 28 | ||
| 199 | #define PORTD_PIN29 29 | ||
| 200 | #define PORTD_PIN30 30 | ||
| 201 | #define PORTD_PIN31 31 | ||
| 202 | |||
| 203 | #define TEENSY_PIN2_IOPORT IOPORT4 | ||
| 204 | #define TEENSY_PIN5_IOPORT IOPORT4 | ||
| 205 | #define TEENSY_PIN6_IOPORT IOPORT4 | ||
| 206 | #define TEENSY_PIN7_IOPORT IOPORT4 | ||
| 207 | #define TEENSY_PIN8_IOPORT IOPORT4 | ||
| 208 | #define TEENSY_PIN14_IOPORT IOPORT4 | ||
| 209 | #define TEENSY_PIN20_IOPORT IOPORT4 | ||
| 210 | #define TEENSY_PIN21_IOPORT IOPORT4 | ||
| 211 | |||
| 212 | #define TEENSY_PIN31 0 | ||
| 213 | #define TEENSY_PIN26 1 | ||
| 214 | #define PORTE_PIN2 2 | ||
| 215 | #define PORTE_PIN3 3 | ||
| 216 | #define PORTE_PIN4 4 | ||
| 217 | #define PORTE_PIN5 5 | ||
| 218 | #define PORTE_PIN6 6 | ||
| 219 | #define PORTE_PIN7 7 | ||
| 220 | #define PORTE_PIN8 8 | ||
| 221 | #define PORTE_PIN9 9 | ||
| 222 | #define PORTE_PIN10 10 | ||
| 223 | #define PORTE_PIN11 11 | ||
| 224 | #define PORTE_PIN12 12 | ||
| 225 | #define PORTE_PIN13 13 | ||
| 226 | #define PORTE_PIN14 14 | ||
| 227 | #define PORTE_PIN15 15 | ||
| 228 | #define PORTE_PIN16 16 | ||
| 229 | #define PORTE_PIN17 17 | ||
| 230 | #define PORTE_PIN18 18 | ||
| 231 | #define PORTE_PIN19 19 | ||
| 232 | #define PORTE_PIN20 20 | ||
| 233 | #define PORTE_PIN21 21 | ||
| 234 | #define PORTE_PIN22 22 | ||
| 235 | #define PORTE_PIN23 23 | ||
| 236 | #define PORTE_PIN24 24 | ||
| 237 | #define PORTE_PIN25 25 | ||
| 238 | #define PORTE_PIN26 26 | ||
| 239 | #define PORTE_PIN27 27 | ||
| 240 | #define PORTE_PIN28 28 | ||
| 241 | #define PORTE_PIN29 29 | ||
| 242 | #define PORTE_PIN30 30 | ||
| 243 | #define PORTE_PIN31 31 | ||
| 244 | |||
| 245 | #define TEENSY_PIN26_IOPORT IOPORT5 | ||
| 246 | #define TEENSY_PIN31_IOPORT IOPORT5 | ||
| 247 | |||
| 248 | #define LINE_PIN1 PAL_LINE(TEENSY_PIN1_IOPORT, TEENSY_PIN1) | ||
| 249 | #define LINE_PIN2 PAL_LINE(TEENSY_PIN2_IOPORT, TEENSY_PIN2) | ||
| 250 | #define LINE_PIN3 PAL_LINE(TEENSY_PIN3_IOPORT, TEENSY_PIN3) | ||
| 251 | #define LINE_PIN4 PAL_LINE(TEENSY_PIN4_IOPORT, TEENSY_PIN4) | ||
| 252 | #define LINE_PIN5 PAL_LINE(TEENSY_PIN5_IOPORT, TEENSY_PIN5) | ||
| 253 | #define LINE_PIN6 PAL_LINE(TEENSY_PIN6_IOPORT, TEENSY_PIN6) | ||
| 254 | #define LINE_PIN7 PAL_LINE(TEENSY_PIN7_IOPORT, TEENSY_PIN7) | ||
| 255 | #define LINE_PIN8 PAL_LINE(TEENSY_PIN8_IOPORT, TEENSY_PIN8) | ||
| 256 | #define LINE_PIN9 PAL_LINE(TEENSY_PIN9_IOPORT, TEENSY_PIN9) | ||
| 257 | #define LINE_PIN10 PAL_LINE(TEENSY_PIN10_IOPORT, TEENSY_PIN10) | ||
| 258 | #define LINE_PIN11 PAL_LINE(TEENSY_PIN11_IOPORT, TEENSY_PIN11) | ||
| 259 | #define LINE_PIN12 PAL_LINE(TEENSY_PIN12_IOPORT, TEENSY_PIN12) | ||
| 260 | #define LINE_PIN13 PAL_LINE(TEENSY_PIN13_IOPORT, TEENSY_PIN13) | ||
| 261 | #define LINE_PIN14 PAL_LINE(TEENSY_PIN14_IOPORT, TEENSY_PIN14) | ||
| 262 | #define LINE_PIN15 PAL_LINE(TEENSY_PIN15_IOPORT, TEENSY_PIN15) | ||
| 263 | #define LINE_PIN16 PAL_LINE(TEENSY_PIN16_IOPORT, TEENSY_PIN16) | ||
| 264 | #define LINE_PIN17 PAL_LINE(TEENSY_PIN17_IOPORT, TEENSY_PIN17) | ||
| 265 | #define LINE_PIN18 PAL_LINE(TEENSY_PIN18_IOPORT, TEENSY_PIN18) | ||
| 266 | #define LINE_PIN19 PAL_LINE(TEENSY_PIN19_IOPORT, TEENSY_PIN19) | ||
| 267 | #define LINE_PIN20 PAL_LINE(TEENSY_PIN20_IOPORT, TEENSY_PIN20) | ||
| 268 | #define LINE_PIN21 PAL_LINE(TEENSY_PIN21_IOPORT, TEENSY_PIN21) | ||
| 269 | #define LINE_PIN22 PAL_LINE(TEENSY_PIN22_IOPORT, TEENSY_PIN22) | ||
| 270 | #define LINE_PIN23 PAL_LINE(TEENSY_PIN23_IOPORT, TEENSY_PIN23) | ||
| 271 | #define LINE_PIN24 PAL_LINE(TEENSY_PIN24_IOPORT, TEENSY_PIN24) | ||
| 272 | #define LINE_PIN25 PAL_LINE(TEENSY_PIN25_IOPORT, TEENSY_PIN25) | ||
| 273 | #define LINE_PIN25 PAL_LINE(TEENSY_PIN25_IOPORT, TEENSY_PIN25) | ||
| 274 | #define LINE_PIN26 PAL_LINE(TEENSY_PIN26_IOPORT, TEENSY_PIN26) | ||
| 275 | #define LINE_PIN27 PAL_LINE(TEENSY_PIN27_IOPORT, TEENSY_PIN27) | ||
| 276 | #define LINE_PIN28 PAL_LINE(TEENSY_PIN28_IOPORT, TEENSY_PIN28) | ||
| 277 | #define LINE_PIN29 PAL_LINE(TEENSY_PIN29_IOPORT, TEENSY_PIN29) | ||
| 278 | #define LINE_PIN30 PAL_LINE(TEENSY_PIN30_IOPORT, TEENSY_PIN30) | ||
| 279 | #define LINE_PIN31 PAL_LINE(TEENSY_PIN31_IOPORT, TEENSY_PIN31) | ||
| 280 | #define LINE_PIN32 PAL_LINE(TEENSY_PIN32_IOPORT, TEENSY_PIN32) | ||
| 281 | #define LINE_PIN33 PAL_LINE(TEENSY_PIN33_IOPORT, TEENSY_PIN33) | ||
| 282 | |||
| 283 | #define LINE_LED LINE_PIN13 | ||
| 284 | |||
| 285 | #if !defined(_FROM_ASM_) | ||
| 286 | # ifdef __cplusplus | ||
| 287 | extern "C" { | ||
| 288 | # endif | ||
| 289 | void boardInit(void); | ||
| 290 | # ifdef __cplusplus | ||
| 291 | } | ||
| 292 | # endif | ||
| 293 | #endif /* _FROM_ASM_ */ | ||
| 294 | |||
| 295 | #endif /* _BOARD_H_ */ | ||
diff --git a/drivers/boards/IC_TEENSY_3_1/board.mk b/drivers/boards/IC_TEENSY_3_1/board.mk deleted file mode 100644 index 62f5b751c..000000000 --- a/drivers/boards/IC_TEENSY_3_1/board.mk +++ /dev/null | |||
| @@ -1,5 +0,0 @@ | |||
| 1 | # List of all the board related files. | ||
| 2 | BOARDSRC = $(BOARD_PATH)/boards/IC_TEENSY_3_1/board.c | ||
| 3 | |||
| 4 | # Required include directories | ||
| 5 | BOARDINC = $(BOARD_PATH)/boards/IC_TEENSY_3_1 | ||
diff --git a/drivers/boards/STM32_F103_STM32DUINO/board.c b/drivers/boards/STM32_F103_STM32DUINO/board.c deleted file mode 100644 index 8c5a87f35..000000000 --- a/drivers/boards/STM32_F103_STM32DUINO/board.c +++ /dev/null | |||
| @@ -1,56 +0,0 @@ | |||
| 1 | /* | ||
| 2 | ChibiOS - Copyright (C) 2006..2015 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 | #include "hal.h" | ||
| 18 | |||
| 19 | // Value to place in RTC backup register 10 for persistent bootloader mode | ||
| 20 | #define RTC_BOOTLOADER_FLAG 0x424C | ||
| 21 | |||
| 22 | /** | ||
| 23 | * @brief PAL setup. | ||
| 24 | * @details Digital I/O ports static configuration as defined in @p board.h. | ||
| 25 | * This variable is used by the HAL when initializing the PAL driver. | ||
| 26 | */ | ||
| 27 | #if HAL_USE_PAL || defined(__DOXYGEN__) | ||
| 28 | const PALConfig pal_default_config = | ||
| 29 | { | ||
| 30 | {VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH}, | ||
| 31 | {VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH}, | ||
| 32 | {VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH}, | ||
| 33 | {VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH}, | ||
| 34 | {VAL_GPIOEODR, VAL_GPIOECRL, VAL_GPIOECRH}, | ||
| 35 | }; | ||
| 36 | #endif | ||
| 37 | |||
| 38 | /* | ||
| 39 | * Early initialization code. | ||
| 40 | * This initialization must be performed just after stack setup and before | ||
| 41 | * any other initialization. | ||
| 42 | */ | ||
| 43 | void __early_init(void) { | ||
| 44 | |||
| 45 | stm32_clock_init(); | ||
| 46 | } | ||
| 47 | |||
| 48 | /* | ||
| 49 | * Board-specific initialization code. | ||
| 50 | */ | ||
| 51 | void boardInit(void) { | ||
| 52 | //JTAG-DP Disabled and SW-DP Enabled | ||
| 53 | AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE; | ||
| 54 | //Set backup register DR10 to enter bootloader on reset | ||
| 55 | BKP->DR10 = RTC_BOOTLOADER_FLAG; | ||
| 56 | } | ||
diff --git a/drivers/boards/STM32_F103_STM32DUINO/board.h b/drivers/boards/STM32_F103_STM32DUINO/board.h deleted file mode 100644 index 09d182d6c..000000000 --- a/drivers/boards/STM32_F103_STM32DUINO/board.h +++ /dev/null | |||
| @@ -1,166 +0,0 @@ | |||
| 1 | /* | ||
| 2 | ChibiOS - Copyright (C) 2006..2015 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 | #ifndef _BOARD_H_ | ||
| 18 | #define _BOARD_H_ | ||
| 19 | |||
| 20 | /* | ||
| 21 | * Setup for a Generic STM32F103 board. | ||
| 22 | */ | ||
| 23 | |||
| 24 | /* | ||
| 25 | * Board identifier. | ||
| 26 | */ | ||
| 27 | #define BOARD_STM32_F103_STM32DUINO | ||
| 28 | #define BOARD_NAME "GENERIC STM32F103C8T6 board - stm32duino bootloader" | ||
| 29 | |||
| 30 | /* | ||
| 31 | * Board frequencies. | ||
| 32 | */ | ||
| 33 | #define STM32_LSECLK 32768 | ||
| 34 | #define STM32_HSECLK 8000000 | ||
| 35 | |||
| 36 | /* | ||
| 37 | * MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h. | ||
| 38 | */ | ||
| 39 | #define STM32F103xB | ||
| 40 | |||
| 41 | /* | ||
| 42 | * IO pins assignments | ||
| 43 | */ | ||
| 44 | |||
| 45 | /* on-board */ | ||
| 46 | |||
| 47 | #define GPIOA_LED 8 | ||
| 48 | #define GPIOD_OSC_IN 0 | ||
| 49 | #define GPIOD_OSC_OUT 1 | ||
| 50 | |||
| 51 | /* In case your board has a "USB enable" hardware | ||
| 52 | controlled by a pin, define it here. (It could be just | ||
| 53 | a 1.5k resistor connected to D+ line.) | ||
| 54 | */ | ||
| 55 | /* | ||
| 56 | #define GPIOB_USB_DISC 10 | ||
| 57 | */ | ||
| 58 | |||
| 59 | /* | ||
| 60 | * I/O ports initial setup, this configuration is established soon after reset | ||
| 61 | * in the initialization code. | ||
| 62 | * | ||
| 63 | * The digits have the following meaning: | ||
| 64 | * 0 - Analog input. | ||
| 65 | * 1 - Push Pull output 10MHz. | ||
| 66 | * 2 - Push Pull output 2MHz. | ||
| 67 | * 3 - Push Pull output 50MHz. | ||
| 68 | * 4 - Digital input. | ||
| 69 | * 5 - Open Drain output 10MHz. | ||
| 70 | * 6 - Open Drain output 2MHz. | ||
| 71 | * 7 - Open Drain output 50MHz. | ||
| 72 | * 8 - Digital input with PullUp or PullDown resistor depending on ODR. | ||
| 73 | * 9 - Alternate Push Pull output 10MHz. | ||
| 74 | * A - Alternate Push Pull output 2MHz. | ||
| 75 | * B - Alternate Push Pull output 50MHz. | ||
| 76 | * C - Reserved. | ||
| 77 | * D - Alternate Open Drain output 10MHz. | ||
| 78 | * E - Alternate Open Drain output 2MHz. | ||
| 79 | * F - Alternate Open Drain output 50MHz. | ||
| 80 | * Please refer to the STM32 Reference Manual for details. | ||
| 81 | */ | ||
| 82 | |||
| 83 | /* | ||
| 84 | * Port A setup. | ||
| 85 | * Everything input with pull-up except: | ||
| 86 | * PA2 - Alternate output (USART2 TX). | ||
| 87 | * PA3 - Normal input (USART2 RX). | ||
| 88 | * PA9 - Alternate output (USART1 TX). | ||
| 89 | * PA10 - Normal input (USART1 RX). | ||
| 90 | */ | ||
| 91 | #define VAL_GPIOACRL 0x88884B88 /* PA7...PA0 */ | ||
| 92 | #define VAL_GPIOACRH 0x888884B8 /* PA15...PA8 */ | ||
| 93 | #define VAL_GPIOAODR 0xFFFFFFFF | ||
| 94 | |||
| 95 | /* | ||
| 96 | * Port B setup. | ||
| 97 | * Everything input with pull-up except: | ||
| 98 | * PB10 - Push Pull output (USB switch). | ||
| 99 | */ | ||
| 100 | #define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */ | ||
| 101 | #define VAL_GPIOBCRH 0x88888388 /* PB15...PB8 */ | ||
| 102 | #define VAL_GPIOBODR 0xFFFFFFFF | ||
| 103 | |||
| 104 | /* | ||
| 105 | * Port C setup. | ||
| 106 | * Everything input with pull-up except: | ||
| 107 | * PC13 - Push Pull output (LED). | ||
| 108 | */ | ||
| 109 | #define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */ | ||
| 110 | #define VAL_GPIOCCRH 0x88388888 /* PC15...PC8 */ | ||
| 111 | #define VAL_GPIOCODR 0xFFFFFFFF | ||
| 112 | |||
| 113 | /* | ||
| 114 | * Port D setup. | ||
| 115 | * Everything input with pull-up except: | ||
| 116 | * PD0 - Normal input (XTAL). | ||
| 117 | * PD1 - Normal input (XTAL). | ||
| 118 | */ | ||
| 119 | #define VAL_GPIODCRL 0x88888844 /* PD7...PD0 */ | ||
| 120 | #define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */ | ||
| 121 | #define VAL_GPIODODR 0xFFFFFFFF | ||
| 122 | |||
| 123 | /* | ||
| 124 | * Port E setup. | ||
| 125 | * Everything input with pull-up except: | ||
| 126 | */ | ||
| 127 | #define VAL_GPIOECRL 0x88888888 /* PE7...PE0 */ | ||
| 128 | #define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */ | ||
| 129 | #define VAL_GPIOEODR 0xFFFFFFFF | ||
| 130 | |||
| 131 | /* | ||
| 132 | * USB bus activation macro, required by the USB driver. | ||
| 133 | */ | ||
| 134 | /* The point is that most of the generic STM32F103* boards | ||
| 135 | have a 1.5k resistor connected on one end to the D+ line | ||
| 136 | and on the other end to some pin. Or even a slightly more | ||
| 137 | complicated "USB enable" circuit, controlled by a pin. | ||
| 138 | That should go here. | ||
| 139 | |||
| 140 | However on some boards (e.g. one that I have), there's no | ||
| 141 | such hardware. In which case it's better to not do anything. | ||
| 142 | */ | ||
| 143 | /* | ||
| 144 | #define usb_lld_connect_bus(usbp) palClearPad(GPIOB, GPIOB_USB_DISC) | ||
| 145 | */ | ||
| 146 | #define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT); | ||
| 147 | |||
| 148 | /* | ||
| 149 | * USB bus de-activation macro, required by the USB driver. | ||
| 150 | */ | ||
| 151 | /* | ||
| 152 | #define usb_lld_disconnect_bus(usbp) palSetPad(GPIOB, GPIOB_USB_DISC) | ||
| 153 | */ | ||
| 154 | #define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12); | ||
| 155 | |||
| 156 | #if !defined(_FROM_ASM_) | ||
| 157 | #ifdef __cplusplus | ||
| 158 | extern "C" { | ||
| 159 | #endif | ||
| 160 | void boardInit(void); | ||
| 161 | #ifdef __cplusplus | ||
| 162 | } | ||
| 163 | #endif | ||
| 164 | #endif /* _FROM_ASM_ */ | ||
| 165 | |||
| 166 | #endif /* _BOARD_H_ */ | ||
diff --git a/drivers/boards/STM32_F103_STM32DUINO/board.mk b/drivers/boards/STM32_F103_STM32DUINO/board.mk deleted file mode 100644 index 81141bdfd..000000000 --- a/drivers/boards/STM32_F103_STM32DUINO/board.mk +++ /dev/null | |||
| @@ -1,5 +0,0 @@ | |||
| 1 | # List of all the board related files. | ||
| 2 | BOARDSRC = $(BOARD_PATH)/boards/STM32_F103_STM32DUINO/board.c | ||
| 3 | |||
| 4 | # Required include directories | ||
| 5 | BOARDINC = $(BOARD_PATH)/boards/STM32_F103_STM32DUINO | ||
diff --git a/drivers/boards/ld/MKL26Z64.ld b/drivers/boards/ld/MKL26Z64.ld deleted file mode 100644 index c4ca8b874..000000000 --- a/drivers/boards/ld/MKL26Z64.ld +++ /dev/null | |||
| @@ -1,105 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2013-2016 Fabio Utzig, http://fabioutzig.com | ||
| 3 | * (C) 2016 flabbergast <s3+flabbergast@sdfeu.org> | ||
| 4 | * | ||
| 5 | * Permission is hereby granted, free of charge, to any person obtaining | ||
| 6 | * a copy of this software and associated documentation files (the "Software"), | ||
| 7 | * to deal in the Software without restriction, including without limitation | ||
| 8 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
| 9 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 10 | * Software is furnished to do so, subject to the following conditions: | ||
| 11 | * | ||
| 12 | * The above copyright notice and this permission notice shall be included in | ||
| 13 | * all copies or substantial portions of the Software. | ||
| 14 | * | ||
| 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
| 16 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| 21 | * SOFTWARE. | ||
| 22 | */ | ||
| 23 | |||
| 24 | /* | ||
| 25 | * KL26Z64 memory setup. | ||
| 26 | */ | ||
| 27 | MEMORY | ||
| 28 | { | ||
| 29 | flash0 : org = 0x00000000, len = 0x100 | ||
| 30 | flash1 : org = 0x00000400, len = 0x10 | ||
| 31 | flash2 : org = 0x00000410, len = 62k - 0x410 | ||
| 32 | flash3 : org = 0x0000F800, len = 2k | ||
| 33 | flash4 : org = 0x00000000, len = 0 | ||
| 34 | flash5 : org = 0x00000000, len = 0 | ||
| 35 | flash6 : org = 0x00000000, len = 0 | ||
| 36 | flash7 : org = 0x00000000, len = 0 | ||
| 37 | ram0 : org = 0x1FFFF800, len = 8k | ||
| 38 | ram1 : org = 0x00000000, len = 0 | ||
| 39 | ram2 : org = 0x00000000, len = 0 | ||
| 40 | ram3 : org = 0x00000000, len = 0 | ||
| 41 | ram4 : org = 0x00000000, len = 0 | ||
| 42 | ram5 : org = 0x00000000, len = 0 | ||
| 43 | ram6 : org = 0x00000000, len = 0 | ||
| 44 | ram7 : org = 0x00000000, len = 0 | ||
| 45 | } | ||
| 46 | |||
| 47 | /* Flash region for the configuration bytes.*/ | ||
| 48 | SECTIONS | ||
| 49 | { | ||
| 50 | .cfmprotect : ALIGN(4) SUBALIGN(4) | ||
| 51 | { | ||
| 52 | KEEP(*(.cfmconfig)) | ||
| 53 | } > flash1 | ||
| 54 | } | ||
| 55 | |||
| 56 | /* For each data/text section two region are defined, a virtual region | ||
| 57 | and a load region (_LMA suffix).*/ | ||
| 58 | |||
| 59 | /* Flash region to be used for exception vectors.*/ | ||
| 60 | REGION_ALIAS("VECTORS_FLASH", flash0); | ||
| 61 | REGION_ALIAS("VECTORS_FLASH_LMA", flash0); | ||
| 62 | |||
| 63 | /* Flash region to be used for constructors and destructors.*/ | ||
| 64 | REGION_ALIAS("XTORS_FLASH", flash2); | ||
| 65 | REGION_ALIAS("XTORS_FLASH_LMA", flash2); | ||
| 66 | |||
| 67 | /* Flash region to be used for code text.*/ | ||
| 68 | REGION_ALIAS("TEXT_FLASH", flash2); | ||
| 69 | REGION_ALIAS("TEXT_FLASH_LMA", flash2); | ||
| 70 | |||
| 71 | /* Flash region to be used for read only data.*/ | ||
| 72 | REGION_ALIAS("RODATA_FLASH", flash2); | ||
| 73 | REGION_ALIAS("RODATA_FLASH_LMA", flash2); | ||
| 74 | |||
| 75 | /* Flash region to be used for various.*/ | ||
| 76 | REGION_ALIAS("VARIOUS_FLASH", flash2); | ||
| 77 | REGION_ALIAS("VARIOUS_FLASH_LMA", flash2); | ||
| 78 | |||
| 79 | /* Flash region to be used for RAM(n) initialization data.*/ | ||
| 80 | REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2); | ||
| 81 | |||
| 82 | /* RAM region to be used for Main stack. This stack accommodates the processing | ||
| 83 | of all exceptions and interrupts.*/ | ||
| 84 | REGION_ALIAS("MAIN_STACK_RAM", ram0); | ||
| 85 | |||
| 86 | /* RAM region to be used for the process stack. This is the stack used by | ||
| 87 | the main() function.*/ | ||
| 88 | REGION_ALIAS("PROCESS_STACK_RAM", ram0); | ||
| 89 | |||
| 90 | /* RAM region to be used for data segment.*/ | ||
| 91 | REGION_ALIAS("DATA_RAM", ram0); | ||
| 92 | REGION_ALIAS("DATA_RAM_LMA", flash2); | ||
| 93 | |||
| 94 | /* RAM region to be used for BSS segment.*/ | ||
| 95 | REGION_ALIAS("BSS_RAM", ram0); | ||
| 96 | |||
| 97 | /* RAM region to be used for the default heap.*/ | ||
| 98 | REGION_ALIAS("HEAP_RAM", ram0); | ||
| 99 | |||
| 100 | __eeprom_workarea_start__ = ORIGIN(flash3); | ||
| 101 | __eeprom_workarea_size__ = LENGTH(flash3); | ||
| 102 | __eeprom_workarea_end__ = __eeprom_workarea_start__ + __eeprom_workarea_size__; | ||
| 103 | |||
| 104 | /* Generic rules inclusion.*/ | ||
| 105 | INCLUDE rules.ld | ||
diff --git a/drivers/boards/ld/STM32F103x8_stm32duino_bootloader.ld b/drivers/boards/ld/STM32F103x8_stm32duino_bootloader.ld deleted file mode 100644 index d0688ef60..000000000 --- a/drivers/boards/ld/STM32F103x8_stm32duino_bootloader.ld +++ /dev/null | |||
| @@ -1,88 +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 | * ST32F103xB memory setup for use with the maplemini bootloader. | ||
| 19 | * You will have to | ||
| 20 | * #define CORTEX_VTOR_INIT 0x5000 | ||
| 21 | * in your projects chconf.h | ||
| 22 | */ | ||
| 23 | MEMORY | ||
| 24 | { | ||
| 25 | flash0 : org = 0x08002000, len = 64k - 0x2000 | ||
| 26 | flash1 : org = 0x00000000, len = 0 | ||
| 27 | flash2 : org = 0x00000000, len = 0 | ||
| 28 | flash3 : org = 0x00000000, len = 0 | ||
| 29 | flash4 : org = 0x00000000, len = 0 | ||
| 30 | flash5 : org = 0x00000000, len = 0 | ||
| 31 | flash6 : org = 0x00000000, len = 0 | ||
| 32 | flash7 : org = 0x00000000, len = 0 | ||
| 33 | ram0 : org = 0x20000000, len = 20k | ||
| 34 | ram1 : org = 0x00000000, len = 0 | ||
| 35 | ram2 : org = 0x00000000, len = 0 | ||
| 36 | ram3 : org = 0x00000000, len = 0 | ||
| 37 | ram4 : org = 0x00000000, len = 0 | ||
| 38 | ram5 : org = 0x00000000, len = 0 | ||
| 39 | ram6 : org = 0x00000000, len = 0 | ||
| 40 | ram7 : org = 0x00000000, len = 0 | ||
| 41 | } | ||
| 42 | |||
| 43 | /* For each data/text section two region are defined, a virtual region | ||
| 44 | and a load region (_LMA suffix).*/ | ||
| 45 | |||
| 46 | /* Flash region to be used for exception vectors.*/ | ||
| 47 | REGION_ALIAS("VECTORS_FLASH", flash0); | ||
| 48 | REGION_ALIAS("VECTORS_FLASH_LMA", flash0); | ||
| 49 | |||
| 50 | /* Flash region to be used for constructors and destructors.*/ | ||
| 51 | REGION_ALIAS("XTORS_FLASH", flash0); | ||
| 52 | REGION_ALIAS("XTORS_FLASH_LMA", flash0); | ||
| 53 | |||
| 54 | /* Flash region to be used for code text.*/ | ||
| 55 | REGION_ALIAS("TEXT_FLASH", flash0); | ||
| 56 | REGION_ALIAS("TEXT_FLASH_LMA", flash0); | ||
| 57 | |||
| 58 | /* Flash region to be used for read only data.*/ | ||
| 59 | REGION_ALIAS("RODATA_FLASH", flash0); | ||
| 60 | REGION_ALIAS("RODATA_FLASH_LMA", flash0); | ||
| 61 | |||
| 62 | /* Flash region to be used for various.*/ | ||
| 63 | REGION_ALIAS("VARIOUS_FLASH", flash0); | ||
| 64 | REGION_ALIAS("VARIOUS_FLASH_LMA", flash0); | ||
| 65 | |||
| 66 | /* Flash region to be used for RAM(n) initialization data.*/ | ||
| 67 | REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0); | ||
| 68 | |||
| 69 | /* RAM region to be used for Main stack. This stack accommodates the processing | ||
| 70 | of all exceptions and interrupts.*/ | ||
| 71 | REGION_ALIAS("MAIN_STACK_RAM", ram0); | ||
| 72 | |||
| 73 | /* RAM region to be used for the process stack. This is the stack used by | ||
| 74 | the main() function.*/ | ||
| 75 | REGION_ALIAS("PROCESS_STACK_RAM", ram0); | ||
| 76 | |||
| 77 | /* RAM region to be used for data segment.*/ | ||
| 78 | REGION_ALIAS("DATA_RAM", ram0); | ||
| 79 | REGION_ALIAS("DATA_RAM_LMA", flash0); | ||
| 80 | |||
| 81 | /* RAM region to be used for BSS segment.*/ | ||
| 82 | REGION_ALIAS("BSS_RAM", ram0); | ||
| 83 | |||
| 84 | /* RAM region to be used for the default heap.*/ | ||
| 85 | REGION_ALIAS("HEAP_RAM", ram0); | ||
| 86 | |||
| 87 | /* Generic rules inclusion.*/ | ||
| 88 | INCLUDE rules.ld | ||
