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
BIT_SET(CMD_LEDS, SET_ADVANCE_LED);
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...
_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:02lvalue requirederrors 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