cancel
Showing results for 
Search instead for 
Did you mean: 

Error in the type definition of ''GPIO_InitTypeDef''

rm2399
Associate III
Posted on August 12, 2014 at 20:55

In stm32f4xx_hal_gpio.h (

delete

comment

)

typedef struct

{

  uint32_t Pin;

  uint32_t Mode;

  uint32_t Pull;

  uint32_t Speed;

  uint32_t Alternate;

}GPIO_InitTypeDef;

But

to select the

alternate function

you need

64 bits

(

4 bits

for each

GPIO

). The register are GPIOx_AFRL and GPIOx_AFRH.

Or have I got

something wrong

?

I work with the

latest

version

STM32CubeMX

.

#gpio-init
1 REPLY 1
Posted on August 12, 2014 at 21:58

Or have I got

something wrong

?

This is a configuration structure, not a peripheral register.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..