Arduino Bit Manipulation Macro Error

I'm using Arduino 1.0

My issue is in a header file being included from my .ino file. This macro works properly in the .ino file and I can't figure out why its not working in the header file.

#define BIT_SET(p,b)                (p |= (1<<b))
// heres the usage of the macro


The error:

COI.h:281: error: lvalue required as left operand of assignment


Any thoughts?

EDIT: I'm an idiot and was trying to set a bit on a defined value...

-
What and where is the definition of CMD_LEDS and SET_ADVANCE_LED (particularly the former)? – Kevin Vermeer Dec 31 '11 at 2:57
Also, rather than defining your own BIT_SET macro, consider using the ordinary _BV() macro and friends to be compatible with other AVR code and familiar to other programmers. See the documentation, FAQ entry, and sfr_defs.h source on nongnu.org/avr-libc for more info. – Kevin Vermeer Dec 31 '11 at 3:02
Aghhh thanks so much Kevin. CMD_LEDS is a define statement... it should have been LEDS_STATE which is a uint8_t. Wow, need some sleep I guess. – Michael Dillon Dec 31 '11 at 3:03
And will do, thanks so much. Wish I could check mark you up as helping me out. – Michael Dillon Dec 31 '11 at 3:05
Without knowing the answer to that comment, it was only speculation and a request for clarification, which should be a comment. I might write an answer about the many varieties of lvalue required errors later, but for now I'm signing off. Glad I could finish the day by helping somebody! – Kevin Vermeer Dec 31 '11 at 3:12