Bitfields
:M..N
is the bitfield formatting parameter.
The bitfield argument is expected to be a unsigned integer that's large enough to contain the bitfields.
For example, if bitfield ranges only cover up to bit 11
(e.g. =8..12
) then the argument must be at least u16
.
When paired with a positional parameter it can be used to display the bitfields of a register.
Bitfields are not range inclusive, e.g. following statement will evaluate to 5
(0b110
):
⚠️ You can not reuse the same argument in a bitfield- and a non bitfield parameter.
This will not compile: