Struct bitmask_t
Defined in File sim_types.h
Struct Documentation
-
struct bitmask_t
Bit mask structure for bitwise operations on 8-bits registers.
Public Functions
-
explicit bitmask_t(uint8_t b, uint8_t m)
-
explicit bitmask_t(uint8_t b)
-
bitmask_t()
-
inline uint8_t extract(uint8_t value) const
Extracts the field value from the register value
-
inline uint8_t set_to(uint8_t reg, uint8_t value = 0xFF) const
Performs a bitwise OR between the register value and the field value
-
inline uint8_t clear_from(uint8_t reg, uint8_t value = 0xFF) const
Performs a bitwise NEG-AND between the register value and the field value
-
inline uint8_t replace(uint8_t reg, uint8_t value) const
Replace the field value within the register value
-
int bitcount() const
Returns the number of bits in the field
-
explicit bitmask_t(uint8_t b, uint8_t m)