bitmask_t Struct Reference
|
yasimavr
|
Loading...
Searching...
No Matches
bitmask_t Struct Reference
Bit mask structure for bitwise operations on 8-bits registers. More...
#include <sim_types.h>
Public Member Functions | |
| constexpr | bitmask_t (uint8_t m=0) |
| constexpr uint8_t | replace (uint8_t reg, uint8_t value) const |
| constexpr uint8_t | set_from (uint8_t reg) const |
| constexpr uint8_t | clear_from (uint8_t reg) const |
| constexpr bitmask_t | operator| (const bitmask_t &bm) const |
| constexpr bitmask_t | operator& (const bitmask_t &bm) const |
| constexpr bitmask_t | operator^ (const bitmask_t &bm) const |
| constexpr bitmask_t | operator~ () const |
| bitmask_t & | operator|= (const bitmask_t &bm) |
| bitmask_t & | operator&= (const bitmask_t &bm) |
| bitmask_t & | operator^= (const bitmask_t &bm) |
| constexpr uint8_t | operator& (uint8_t v) const |
| constexpr unsigned int | bitcount () const |
| Returns the number of bits set in the mask. | |
| constexpr bool | bit (unsigned int i) const |
| Returns the state of the bit i. | |
Public Attributes | |
| uint8_t | mask |
Detailed Description
Bit mask structure for bitwise operations on 8-bits registers.
Constructor & Destructor Documentation
◆ bitmask_t()
|
inlineconstexpr |
Member Function Documentation
◆ bit()
|
inlineconstexpr |
Returns the state of the bit i.
◆ bitcount()
|
inlineconstexpr |
Returns the number of bits set in the mask.
◆ clear_from()
|
inlineconstexpr |
Performs a bitwise NEG-AND between the reg value and the bitmask
◆ operator&() [1/2]
◆ operator&() [2/2]
|
inlineconstexpr |
◆ operator&=()
◆ operator^()
◆ operator^=()
◆ operator|()
◆ operator|=()
◆ operator~()
|
inlineconstexpr |
◆ replace()
|
inlineconstexpr |
◆ set_from()
|
inlineconstexpr |
Performs a bitwise OR between the reg value and the bitmask
Member Data Documentation
◆ mask
| uint8_t bitmask_t::mask |
The documentation for this struct was generated from the following file:
Generated by