Bitmask operation functions
Operations on bit masks.
value = bitRead(mask, bit); // returns 1 if bit is set in the mask, otherwise 0
bitSet(mask, bit); // sets bit to 1 in the mask
bitClear(mask, bit); // sets bit to 0 in the mask
bitWrite(mask, bit, bitvalue); // set bit to bitvalue in the mask
mask
number representing bit mask (BYTE for 8 bits, WORD for 16 bits or DWORDfor 32 bits)
bit
bit to deal with (non-negative integer number)
bitvalue
any expresstion evaluated to TRUE or FALSE