Syntax
#define bitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit))
ContentsIndex
PreviousUpNext
bitWrite
Syntax
#define bitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit))
Description

Writes a bit of a numeric variable.

Parameters
Parameters 
Description 
the numeric variable to which to write
 
which bit of the number to write, starting at 0 for the least-significant (rightmost) bit
 
the value to write to the bit (0 or 1)  
Returns

the value of the bit

File

wiring_constants.h

Group