I'm trying to do
#define LEDPIN PORTB,1 #define SETBIT(reg,bit) (reg |= (1<<bit)) { SETBIT(LEDPIN); }
But it gives me an error saying "macro "SETBIT" requires 2 arguments, but only 1 given"
Does the preprocessor look at the macro defines first? Is there anyway to what I want?
Edward