cancel
Showing results for 
Search instead for 
Did you mean: 

14: error: expected declaration specifiers or '...' before

noval
Associate II
Posted on November 21, 2016 at 08:53

i get 14: error: expected declaration specifiers or '...' before 'GPIO_Init'

and its my source code :

void Init_IO(GPIO_Init* GPIOx, uint32_t Pin, GPIOMode_TypeDef Mode, GPIOPuPd_TypeDef Pupd, GPIOSpeed_TypeDef Speed)

{

GPIO_InitTypeDef IO_Init;

if(GPIOx == GPIOA) RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA,ENABLE);

else if(GPIOx == GPIOB) RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOB,ENABLE);

else if(GPIOx == GPIOC) RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOC,ENABLE);

.

.

.

.

.

.

}

somebody can help me?

#stm32
2 REPLIES 2
slimen
Senior
Posted on November 21, 2016 at 15:17

Hello,

Probably you should check and rearrange the contents of the header files and your declarations.

You can take, as start point, a working example within your available library to have more idea about implementation, initialization code and related functions. Then make required updates according to your needs.

Regards

noval
Associate II
Posted on November 22, 2016 at 03:35

thank's 

and now that's problem solved

but i have one question

how to save the answer of serial communicate ?

from RX