Structure of a character attribute consists of 4 bit fore- and 3 bit background color, and a single blink bit.
More...
#include <machine/textmode.h>
Structure of a character attribute consists of 4 bit fore- and 3 bit background color, and a single blink bit.
Bit fields can notably simplify the access and code readability.
- Note
- Type punning is indeed undefined behavior in C++. However, gcc explicitly allows this construct as a language extension. Some compilers (other than gcc might allow this feature only by disabling strict aliasing (
-fno-strict-aliasing
). In StuBS we use this feature extensively due to the improved code readability.
◆ Attribute()
Attribute constructor (with default values)
- Todo:
- Complete constructor
- Parameters
-
foreground | Foreground color (Default: LIGHT_GREY) |
background | Background color (Default: BLACK) |
blink | Blink if true (default: no blinking) |
◆ [struct]
◆ value
The documentation for this union was generated from the following file: