2.3 Bit Masks, Bit Group Masks and Group Configuration Masks
The user can access any register using the structure configuration of the modules. The ADC can be fully configured using the steps found in the data sheet, in the module’s description specific section. For example, the recommended steps to initialize the ADC are presented in ADC - Analog-to-Digital Converter → Functional Description → Initialization. Register bits can be manipulated using bit masks or bit position masks, which are defined in the header file. The predefined masks are either related to individual bits, in which case they are called bit masks, or to a group of bits (bit field), in which case they are called a bit group mask, or a group mask. For example, the ADC0 module can be enabled and configured to start a conversion cycle by using bit masks.