MACRO
OMNI_IS_N_BIT_SET - Test if a specific bit is set in a value
SYNOPSIS top
A helper macro that utilizes bit shifts to test if a specific bit is set in the value passed in.
A helper macro that utilizes bit shifts to test if a specific bit is set in the value passed in.
DESCRIPTION top
A helper macro that utilizes bit shifts to test if a specific bit is set in the value passed in. Defined as the following:
Where
Example:
A helper macro that utilizes bit shifts to test if a specific bit is set in the value passed in. Defined as the following:
#define OMNI_IS_N_BIT_SET(val, n) ((val & (1 << n)) == (1 << n))
val is the numeric value and n is the bit position (0 based from the right) to test.Example:
s