Represents a single bit field in an integer, useable with EXPECT_* macros defined in this file. More...
#include <sw/device/lib/base/mock_mmio_test_utils.h>
Data Fields | |
uintptr_t | offset |
uintptr_t | value |
Represents a single bit field in an integer, useable with EXPECT_* macros defined in this file.
An integer can be expressed as a list of BitField values, and can be more convenient to use than 0b or 0x literals in some cases. For example, the integer 0b0000'0000'1100'0101 could be expressed as {{0x0, 1}, {0x2, 1}, {0x4, 12}} This form makes it clearer to the reader that 0x0, 0x2, and 04 are indices to bitfields, which are set to particular values.
In practice, this might use generated register constants, and look like {{FIELD_FOO_OFFSET, 1}, {FIELD_BAR_OFFSET, 1}, {FIELD_BAZ_OFFSET, 12}}
This type does not specify the lengths of bitfields; MaskedBitField should be used for that, instead.
Definition at line 37 of file mock_mmio_test_utils.h.
uintptr_t mock_mmio::BitField::offset |
Definition at line 38 of file mock_mmio_test_utils.h.
uintptr_t mock_mmio::BitField::value |
Definition at line 39 of file mock_mmio_test_utils.h.