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
-
| MSB | Leftmost bit index in range (highest). |
| LSB | Rightmost bit index in range (lowest). |
- Returns
- Bit mask.