|
KallistiOS git master
Independent SDK for the Sega Dreamcast
|
Macros to help dealing with register fields. More...
#include <kos/cdefs.h>Go to the source code of this file.
Macros | |
| #define | BIT(bit) |
| Create a 32-bit mask with a bit set. | |
| #define | BITLL(bit) |
| Create a 64-bit mask with a bit set. | |
| #define | GENMASK(h, l) |
| Create a mask with a range of bits set. | |
| #define | FIELD_GET(var, field) |
| Extract a field value from a variable. | |
| #define | FIELD_PREP(field, value) |
| Prepare a field with a given value. | |
Macros to help dealing with register fields.
| #define BIT | ( | bit | ) |
Create a 32-bit mask with a bit set.
| bit | The bit to set (from 0 to 31) |
Referenced by arch_dcache_wback_all().
| #define BITLL | ( | bit | ) |
Create a 64-bit mask with a bit set.
| bit | The bit to set (from 0 to 63) |
Referenced by udiv_set_divider().
| #define FIELD_GET | ( | var, | |
| field ) |
Extract a field value from a variable.
| var | The 32-bit variable containing the field |
| field | A 32-bit mask that corresponds to the field |
| #define FIELD_PREP | ( | field, | |
| value ) |
Prepare a field with a given value.
| field | A 32-bit mask that corresponds to the field |
| value | The value to be put in the field |
| #define GENMASK | ( | h, | |
| l ) |