I've got a header file that defines what pins of the AVR of the AVR go where. This changes from revision A to revision B of the board and so on. As such, the header file is called "rev_a.h" or "rev_b.h" etc...
This header file needs to be included in the source file for the ethernet driver and the source file for the main code (that links to the ethernet driver). This means I need to change two files if I want to compile for a different revision of the board.
Is there any way to have it in one place? I tried to define it in the makefile and pass it using the cdefs line like so:
BOARD_REVISION = rev_a.h CDEFS = -DF_CPU=$(F_CPU)UL -DBOARD_REVISION=$(BOARD_REVISION)
And then I have it as an include in my c files:
#include "BOARD_REVISION"
Problem is, I get a compile error: "error: BOARD_REVISION: No such file or directory" I've tried adding commas, quotes and so on in various places but no joy.
Anyone know how to handle this?