Thomas D. Dean wrote:
Thanks,
I re-read 'info cpp' and think I may actually understand it.
BTW, I use a different trick for pin access macros that has been posted
before on this list (can't find the reference now, sorry).
I use the attached include file. Then I define my hardware pins like
Thanks,
That is close to what I have. I like a couple of your names better.
I will change.
tomdean
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Thomas D. Dean wrote:
Thanks,
That is close to what I have. I like a couple of your names better.
I will change.
Hummm it didn't seem close to what you've shown. The main difference
is this:
#define LEFT_MOTOR_DIR_PORT PORT(C)
#define LEFT_MOTOR_DIR_PIN PIN(3)
#define
I have a question about preprocessor syntax.
I want to declare som macros that ease controlling port assignments.
in the include file, I have
#define GLUE(a, b) (a##b)
#define PORT(x)(GLUE(PORT, x))
#define PIN(x) (_BV((x)))
#define DDR(x) (GLUE(DDR, x))
#define
Thomas D. Dean wrote:
I have a question about preprocessor syntax.
I want to declare som macros that ease controlling port assignments.
in the include file, I have
#define GLUE(a, b) (a##b)
#define PORT(x)(GLUE(PORT, x))
#define PIN(x) (_BV((x)))
#define DDR(x)