I have several pins relabeled using the #define directive in a header file called "gpio.h". Several files reference this file. In main.c I reference this file with the fallowing command:
#include "gpio.h"
The gpio.h file has the following structure:
#ifndef __gpio_H#define __gpio_H#define FW_PROBE_DIG_1_Pin GPIO_PIN_12#define FW_PROBE_DIG_1_GPIO_Port GPIOE#define FW_PROBE_DIG_2_Pin GPIO_PIN_13#define FW_PROBE_DIG_2_GPIO_Port GPIOE#endif /* __gpio_H */
My code in "main.c" works when using the value "GPIOE" but doesn't work when using "FW_PROBE_DIG_1_GPIO_Port". The code compiles but the "GPIO" hardware pin only responds when I use the "GPIOE" in my function call.
Any ideas?
Most compilers allow to keep intermediate files. In your case the preprocessed one.