Question
Why did I get this error "conflicting types for 'GPIO_RegDef_t'"?
I'm beginner and trying to write a driver for GPIO and received this error when compiling code.
What do I do wrong when creating a structure?
A library #include <stdint.h> at the beginning of the code included!
typedef struct // RM -> Table 39. GPIO register map and reset values
{
volatile uint32_t MODER; // Address offset: 0x00
volatile uint32_t OTYPER; // Address offset: 0x04
volatile uint32_t OSPEEDR; // Address offset: 0x08
volatile uint32_t PUPDR; // Address offset: 0x0c
volatile uint32_t IDR; // Address offset: 0x10
volatile uint32_t ODR; // Address offset: 0x14
volatile uint32_t BSRR; // Address offset: 0x18
volatile uint32_t LCKR; // Address offset: 0x1c
volatile uint32_t AFR[2]; // Address offset: 0x20-0x24 GPIO alternate function LOW register AF[1]: GPIO alternate function HIGH register AF[2]:
} GPIO_RegDef_t; 