23 #include "stm32_gpio.h"
37 #if defined(STM32F1XX)
42 const PALConfig pal_default_config = {
69 #if STM32_HAS_GPIOA || defined(__DOXYGEN__)
72 #if STM32_HAS_GPIOB || defined(__DOXYGEN__)
75 #if STM32_HAS_GPIOC || defined(__DOXYGEN__)
78 #if STM32_HAS_GPIOD || defined(__DOXYGEN__)
81 #if STM32_HAS_GPIOE || defined(__DOXYGEN__)
84 #if STM32_HAS_GPIOF || defined(__DOXYGEN__)
87 #if STM32_HAS_GPIOG || defined(__DOXYGEN__)
90 #if STM32_HAS_GPIOH || defined(__DOXYGEN__)
93 #if STM32_HAS_GPIOI || defined(__DOXYGEN__)
96 #if STM32_HAS_GPIOJ || defined(__DOXYGEN__)
99 #if STM32_HAS_GPIOK || defined(__DOXYGEN__)
183 gpiop->OTYPER =
config->otyper;
184 gpiop->OSPEEDR =
config->ospeedr;
185 gpiop->PUPDR =
config->pupdr;
187 gpiop->AFRL =
config->afrl;
188 gpiop->AFRH =
config->afrh;
189 gpiop->MODER =
config->moder;
197 #if defined(STM32H7XX)
198 rccResetAHB4(STM32_GPIO_EN_MASK);
199 rccEnableAHB4(STM32_GPIO_EN_MASK,
true);
200 #elif defined(STM32F3XX)
201 rccResetAHB(STM32_GPIO_EN_MASK);
202 rccEnableAHB(STM32_GPIO_EN_MASK,
true);
204 rccResetAHB1(STM32_GPIO_EN_MASK);
205 rccEnableAHB1(STM32_GPIO_EN_MASK,
true);
264 #if defined(STM32H7XX)
270 #if HAL_USE_SDC || defined(__DOXYGEN__)
274 bool sdc_lld_is_card_inserted(
SDCDriver *sdcp)
283 bool sdc_lld_is_write_protected(
SDCDriver *sdcp)
291 #if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
295 bool mmc_lld_is_card_inserted(MMCDriver *mmcp)
305 bool mmc_lld_is_write_protected(MMCDriver *mmcp)
319 #if defined(AFIO_MAPR_VAL)
#define VAL_GPIOB_OSPEEDR
#define VAL_GPIOJ_OSPEEDR
#define VAL_GPIOK_OSPEEDR
#define VAL_GPIOC_OSPEEDR
#define VAL_GPIOE_OSPEEDR
#define VAL_GPIOD_OSPEEDR
#define VAL_GPIOI_OSPEEDR
#define VAL_GPIOH_OSPEEDR
#define VAL_GPIOG_OSPEEDR
#define VAL_GPIOF_OSPEEDR
#define VAL_GPIOA_OSPEEDR
void __early_init(void)
Early initialization code.
void boardInit(void)
Board-specific initialization code.
static void stm32_gpio_init(void)
static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config)
static const gpio_config_t gpio_default_config
STM32 GPIO static initialization data.
Type of STM32 GPIO initialization data.
Type of STM32 GPIO port setup.
#define AFIO_MAPR_VAL
Remap several IO pins.
struct SDCDriver SDCDriver
static const struct usb_config_descriptor config
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.