FireSync API
 All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
#define kField_ToMask_ (   MSB,
  LSB 
)
related

Creates a bit mask from a 32-bit range.

WARNING: this macro can generate masks only as wide as the number of bits in the integral type of the MSB operand, minus one. E.g., if the MSB operand is of type k32u, this macro can generate a mask of up 31 bits (i.e., 0xFFFFFFFE or 0x7FFFFFFF). This limitation is due to undefined behavior in the C language for bits shifts greater than or equal to the width of an integral type.

Parameters
MSBLeftmost bit index in range (highest).
LSBRightmost bit index in range (lowest).
Returns
Bit mask.