/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / error. undeclared. something with my #include.

Username:     
Password:     
             

Forum

# 1   2014-07-23 14:13:18 error. undeclared. something with my #include.

matise
New member
Registered: 2014-07-23
Posts: 2

error. undeclared. something with my #include.

Hm, i get this error for all my #define.
What is it my stm32 want from me?

16: error: 'GPIO_PIN_9' undeclared (first use in this function)


#include <stm32f10x.h>
#include <stm32f10x_rcc.h>
#include <stm32f10x_gpio.h>

#define W_CLK  GPIO_PIN_9
#define FQ_UD  GPIO_PIN_8
#define DATA   GPIO_PIN_7
#define RESET  GPIO_PIN_6
#define PORT   GPIOC

Some #include or is it some #define missing here?
Anyone has a clue?

I just dont know what to do.

Offline

 

# 2   2014-07-24 07:38:26 error. undeclared. something with my #include.

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: error. undeclared. something with my #include.

GIO_PIN_9 is well declared in stm32f10x_gpio.h, but as : #define GPIO_Pin_9

Be careful with the sensitive case of the declaration, depending on the library, so depending on the micro-controller family you use.

Offline

 

# 3   2014-07-24 18:50:43 error. undeclared. something with my #include.

matise
New member
Registered: 2014-07-23
Posts: 2

Re: error. undeclared. something with my #include.

Ah, thats it.
It solved the problem.

Very big thanks for your help!

Offline

 

Board footer