3v0, I think that '!' can't be used as a bitwise operator with BoostC, hence the larger code.
Mike, I wrote my functions that do bitwise operations for Hi-Tech PICC - that did not (and probably still does not) have built-in functions for the task - and they do work with BoostC too.
Mike, I wrote my functions that do bitwise operations for Hi-Tech PICC - that did not (and probably still does not) have built-in functions for the task - and they do work with BoostC too.
Code:
#define bitset(var,bitno) var|=(1<<bitno)
#define bitclr(var,bitno) var&=~(1<<bitno)
#define bittoggle(var,bitno) var^=(1<<bitno)
Attachments
Last edited: