Helper macros for bitwise flag manipulation.
More...
#define vtm_flag_set |
( |
|
VAL, |
|
|
|
FLAG |
|
) |
| (VAL) |= (FLAG) |
Set bits
- Parameters
-
VAL | the value where bits should be set |
FLAG | bits which should be set to 1 |
#define vtm_flag_unset |
( |
|
VAL, |
|
|
|
FLAG |
|
) |
| (VAL) &= ~(FLAG) |
Unset bits
- Parameters
-
VAL | the value where bits should unset |
FLAG | bits which should be set to 0 |
#define vtm_flag_is_set |
( |
|
VAL, |
|
|
|
FLAG |
|
) |
| ((VAL) & (FLAG)) == (FLAG) |
Check if bits are set
- Parameters
-
VAL | the value where bits should be checked |
FLAG | bits which should be tested |