How do I do defines visible in included header files
Posted: Sat Nov 16, 2013 8:41 pm
I have a main.c file, in which I define some common things, e. g.:
And in bmp085.h which I incude I do the following:
Guess what? That little piece of code is never defined.
How do I make this define visible to included bmp085.h?
Code: Select all
#define BMP085_I2CD I2CD1
And in bmp085.h which I incude I do the following:
Code: Select all
#ifndef BMP085_I2CD
#error "bmp085 c**p undefined!!!11"
#endif
Guess what? That little piece of code is never defined.
How do I make this define visible to included bmp085.h?